test(deploy): 補齊預設匯入探測成功與失敗動態覆蓋 - #525
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe host-native launcher tests now cover successful, failed, and hung Python import probes. They verify marker output, bounded failures, service-start suppression, descendant-process cleanup, and restoration of the marker-file environment variable. ChangesHost-native import-probe regression coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…robe-dynamic-success-failure
|
{"kind":"ai-bim-single-owner-approval","version":1,"repo":"monkey1sai/AI-BIM-governance","prNumber":525,"headOid":"fd886afe4947f2305e49fed149fed0d210881d44","baseOid":"c152c79d57fbbcf05276e3c1a9bbbaa3ce0d07c3","action":"merge-elevated"} |
變更摘要
補齊
Start-HostNativeKitManager預設ImportProbeFn的真實 Python subprocess 成功與失敗動態覆蓋,並保留既有 timeout/descendant cleanup 案例。本 PR 是使用者指定的
WP-20260811-001-import-probe-dynamicfollow-on test slice。Issue #493 已由 PR #502 的 timeout coverage 關閉;本 PR 不重新關閉 #493,也不宣稱 #489、#513 或完整 work package 已完成。修改原因
目前
origin/main已動態驗證預設 probe timeout,但 success 與 non-zero failure 仍缺少真實 child-process 證據。這個缺口可能讓import fastapi, uvicorn的執行順序、失敗阻擋或 service-start wiring 回歸而未被 focused test 發現。主要變更
scripts/tests/test-host-native-launcher.ps1,production code 零變更。fastapi.py/uvicorn.pyshim 與 ordered marker 證明兩個 import 都在真實 child interpreter 執行,且 service 僅啟動一次。fastapi.py寫 marker 後 raise,證明 documented blocker 被傳遞、service 不啟動、uvicorn不會被 import。finally還原。Change Classification
WP-20260811-001-import-probe-dynamicAI Coding Governance
WP-20260811-001-import-probe-dynamicmonkey1sai-blipexact-head approval required;尚未取得驗證方式
Exact base/head:
c152c79d57fbbcf05276e3c1a9bbbaa3ce0d07c3fd886afe4947f2305e49fed149fed0d210881d44已執行:
pwsh -NoProfile -NonInteractive -File scripts/tests/test-host-native-launcher.ps1→ALL PASSED;commit 後 exact head 重新執行通過。fastapi,新 marker 斷言如預期失敗;還原後 focused test 重新通過,production blob 與 HEAD 相同。pwsh -NoProfile -NonInteractive -File scripts/verify-all.ps1 -PlanOnly -ChangedPath scripts/tests/test-host-native-launcher.ps1→ affected plan 產生成功。python -m pytest tests -q -p no:cacheprovider→483 passed, 9 skipped。pwsh -NoProfile -NonInteractive -File scripts/tests/invoke-powershell-static.ps1→ passed。pwsh -NoProfile -NonInteractive -File scripts/tests/test-agent-governance-check.ps1→ all assertions passed。pwsh -NoProfile -NonInteractive -File scripts/tests/scan-secret-patterns.ps1→ passed。pwsh -NoProfile -NonInteractive -File scripts/tests/verify-security-exceptions.ps1→ valid,count=0。main後,node --test scripts/tests/test-openspec-machine-truth.mjs→24 passed, 0 failed。main後,node --test scripts/tests/test-ai-coding-metrics.mjs→13 passed, 0 failed。git diff --check→ clean。Hosted CI:
fd886afe4947f2305e49fed149fed0d210881d44的CIworkflow 已通過:changed-path classifier、Linux platform adapter、root contracts/fakes、agent governance contracts、PowerShell static 與 secret scan 均為 success;不適用的 service jobs 依 classifier skip。Agent Governance / agent-governance已通過,包含 OpenSpec machine-truth、PR body evidence、self-referential bootstrap、Windows platform adapter、host-native child-launch regression、remote deploy transport、host-native preflight 與 Windows verification scope。PR Metadata Contract / pr-metadata-contract-diagnostic已通過。test-host-native-launcher.ps1;本 PR 不把本機 focused pass 誤報成 hosted required gate。main(c152c79);本 branch 以 merge commitfd886af吸收,fresh local machine-truth24/24與 hosted Agent Governance 均通過。重複且已成零 diff 的 chore(openspec): rebind migrate-console-to-hifi-design row to the landed #507 squash #523 已關閉為 superseded。Governance Base Audit依 repo 契約是 diagnostic;目前 reason 為缺少monkey1sai-blip對fd886af的 exact-head approval,會在 review submitted 時重跑。本 PR 不把它繞過或誤報為已通過。風險與影響
PYTHONPATH與 environment variable 傳遞 sandbox path,避免 PowerShell/Python path escaping;Windows 已實跑,Linux runtime 尚未觀察。main納入 branch history;PR 對 current main 的實際 diff 仍只有scripts/tests/test-host-native-launcher.ps1。scripts/**依 repo merge governance 屬 elevated scope;本 PR 不繞過 CODEOWNER 或外部 merge authority。回滾方式
若需撤回,revert 本 PR 的單一 test commit 即可;沒有 production state 或資料需要復原。
後續建議
monkey1sai-blip對最終 exact head 提交人工 approval;agent/GitHub App review 只能作證據,不能代替該票。mainmerge 進 PR fix(deploy,verify,launcher): mechanism-hardening-2 bundle (#490 #491 #489-B) #513,不 rebase/force-push,並重新取得 fix(deploy,verify,launcher): mechanism-hardening-2 bundle (#490 #491 #489-B) #513 的 exact-head gate 與 approval。WP-20260811-001containment 工作仍由 fix(streaming): contain the Kit process tree on converter timeout (#489 PR-A) #509/fix(deploy,verify,launcher): mechanism-hardening-2 bundle (#490 #491 #489-B) #513 與其 fixpoint 流程處理,本 PR 不宣稱完成。