pbls/.gitignore
agent.develop d2cf64dd7f fix(pbls): 修复 Bug Yr4Gv908T4B6yhA7DtE_0(第9轮 3/5 绿)种子注入段 async 调用缺陷 + QC 退回 #1/#2 收口
【1】Bug Yr4Gv908T4B6yhA7DtE_0 根因(a):build.sh 第 12 步种子注入段以同步方式调用
async def seed_all(modules/pbl_appcodes/pbl_appcodes/seed.py:460)→
RuntimeWarning: coroutine 'seed_all' was never awaited + TypeError: Object of type
coroutine is not JSON serializable,r12 BUILD_RC=1,种子未注入 → 应用未起 → 9380 无
LISTEN → healthz=000(本轮红项①②)。修法:asyncio.run() 驱动协程,两轮各自独立事件
循环,幂等对比口径不变。

【2】连带缺陷:原断言用 groups_inserted/items_inserted/idempotent 三个键,而 seed_all
真实返回契约(seed.py:494-499)是 ok/groups/items/inserted/updated/skipped/per_group
→ 协程修好后必然 KeyError。改按真实返回键断言(第1轮 8组74项、第2轮 inserted==0 且
updated==0),幂等语义不变。

【3】QC 退回 #1:build.sh.r11bak 系误提交(149dd5c 中为 A 状态,实测 4 files changed /
879 insertions,此前摘要声称「未纳入 / 3 files 451 insertions」与实测矛盾)。处置:
git rm --cached 移出仓库(本地文件保留供排障),.gitignore 新增 *.bak / *.r[0-9]*bak /
*.orig / *.rej / *.old / *.tmp 六条模式,一并清出历史遗留的 build.sh.r4bak、
build.sh.r8bak、requirements.txt.r4bak、requirements.txt.r6bak、
scripts/ddl/pbls_tables.sql.bak、scripts/ddl/pbls_tables.sql.r11bak(共 7 个)。

【4】QC 退回 #2:收口 build.sh 工作区未提交变更(种子段 asyncio.run 补丁),交付摘要
按实测字节/行数如实填写,不再声称「全部已收口」。

【5】同类问题全仓扫描(任务要求「不能只修报出来的那一个」):AST 提取 490 个 async def
函数名,扫全部 apps/*/build.sh、*.sh、modules/*/*.sh 内嵌 python heredoc 的裸同步调用
→ 命中 modules/pbls/build.sh:377,379 同型缺陷(同一仓库的第二工作副本),已同步修复;
apps/scense/build.sh:129 与 scripts/fix_scense_access.sh:53 的 main() 是 shell 函数定义
非 python 调用,误报排除。修复后两副本去注释代码行 diff 为空(CODE_IDENTICAL_OK)。

【自检】bash -n apps/pbls/build.sh OK;bash -n modules/pbls/build.sh OK;两副本内嵌
PYEOF 块(各 2 块)ast.parse 全 OK;硬门禁 6.6 PASS(2 个 requirements 文件 / 20 项声明
/ 基座 7 包与 wheelhouse 逐字一致 / 40 个模块 pyproject 零幻影依赖,rc=0);DDL 表数
grep -c 'CREATE TABLE IF NOT EXISTS' = 37(期望 37)。

【责任边界·不造假声明】未声称已部署、未声称 healthz=200、未声称 37 表已落库、未声称
测试通过。红项①②的执行落地(以 pbl 身份跑 build.sh 建 venv → DDL → 种子 → 起进程监听
9380 → 自证 healthz=200)属 agent.deploy_test 职责,develop 无部署机执行权限。
2026-09-26 11:04:16 +08:00

27 lines
726 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

__pycache__/
*.pyc
*.pyo
.pytest_cache/
.coverage
.DS_Store
*.log
node_modules/
dist/
build/
.venv/
venv/
# build.sh「8c. 模块 wwwroot 挂载」生成的模块前端软链(构建产物,不入库)。
# 注意:软链条目在 git 里不是目录,模式不能带结尾斜杠(wwwroot/pbl_*/ 匹配不到软链)。
# 应用仓自带的 wwwroot/pbl_overlay/(pbl_overlay.js 为跟踪文件)仍保持跟踪,故显式反排除。
wwwroot/pbl_*
!wwwroot/pbl_overlay/
# 备份/临时副本不入库(QC 退回 #1:build.sh.r11bak 曾被误提交进 149dd5c)。
# 备份是本地排障工作文件,非交付产物;入库会污染仓库并让 diff stat 失真。
*.bak
*.r[0-9]*bak
*.orig
*.rej
*.old
*.tmp