chore(governance): close the orphan-kit-liveness-preflight bootstrap entry - #658
Merged
Merged
Conversation
…entry Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GSyeoncjEm8rcfRDgnS6CB
monkey1sai-blip
approved these changes
Aug 20, 2026
monkey1sai-blip
left a comment
Collaborator
There was a problem hiding this comment.
{"kind":"ai-bim-automated-approve-only","version":1,"automated":true,"repo":"monkey1sai/AI-BIM-governance","prNumber":658,"headOid":"df3e6dd152c2bb6a231592c16f050a7dbf256c68","baseOid":"88b7fb868c9837c560cf7fd87aa4039696d15708","action":"approve-only"}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
變更摘要
關閉
scripts/self-referential-bootstrap-ledger.json唯一一筆openentry:orphan-kit-liveness-preflight(#653 讓孤兒 Kit 對 liveness 可見,並讓 Phase 4c 對「沒有任何 live pid file 認領、卻仍在 LISTEN」的 streaming port fail closed)。ledger 回到 0 open,完成docs/agents/self-referential-bootstrap.md§2 義務 3 的 merge 後 fixpoint。orphan-kit-liveness-preflightcb92a2b0修改原因
docs/agents/self-referential-bootstrap.md§2 義務 3:merge 後必須以變更後的正規機制重跑該 entry 凍結的 contract 並把結果 commit 回 ledger。#653 的 opening reason 指出,canonical deploy path 只在「一次真實部署正在對已 merge 的origin/main內容執行」的那一刻才決定「是否已有 instance 在跑、能不能安全啟動下一個」,而該 PR 改的行為只存在於那一刻:<Name>.portsclaim 由 liveStart-HostNativeService寫出,Phase 4c 的拒絕只對「launcher 已死、child 仍握著真實 LISTEN socket」的孤兒 Kit 觸發;這兩種狀態在變更抵達origin/main之前無法由 canonical 機制在 branch 上製造。本 PR 即在 merge 後的 first-parent mainline commitcb92a2b上完成該重驗,並補上該真實部署週期已發生的證據。Mechanism commit 綁定:
cb92a2bf99a4cbb7ba3c67ec17bfcf2996721972,subjectMerge pull request #653 from monkey1sai/fix/orphan-kit-liveness-preflight,位於origin/mainfirst-parent mainline(git rev-list --first-parent origin/main命中一次),first-parent diff touch 全部三個 declaredverification_mechanism_paths(scripts/deploy.ps1、scripts/lib/host-native-launcher.ps1、scripts/self-referential-bootstrap-ledger.json)。本 entry 以 merge commit 落地,未使用任何 squash 前懸空 subject,也未開任何 rebind PR。驗證方式
依 contract
orphan-kit-liveness-preflight/v1(aaf83a00…)凍結順序重放全部 5 個 command,全部 exit0(指令對照取自scripts/tests/test-self-referential-bootstrap.ps1的 immutable command map,本 contract 五個 command 皆無<…>佔位參數):test-host-native-launcher([PASS] orphaned listener detection is fail-closed and tree-aware (#640)/=== test-host-native-launcher.ps1: ALL PASSED ===,41s)、test-deploy-governance-static(PASS deploy governance static checks,7s)、test-self-referential-bootstrap(all assertions passed,32s)、test-pr-body-evidence(all assertions passed,11s)、invoke-powershell-static(passed,5s)。Contract digest 獨立重算核對:以
New-VerificationContract的規範形式(contract id 與 command_ids 以 LF 串接、UTF-8 無 BOM 取 SHA-256)重算得aaf83a0022155d2b8858e98570bbf15ead369b298ce8360402982a6e0c149223,與 ledger 記載 byte-exact 相符。重驗環境:
git worktreedetached checkout 恰為 mechanism commitcb92a2b本身,tracked 檔 0 dirty、untracked 0,置於非 Temp 路徑;本機 pwsh 7.5.4(Windows 11)。重驗時間 2026-08-19T13:44:15Z–13:45:51Z(UTC 實測,reverified_at取結束時刻)。改完 ledger 後另跑:
test-self-referential-bootstrap(all assertions passed)、test-pr-body-evidence(all assertions passed)、test-agent-governance-check(46 pass / 0 fail,all assertions passed)、invoke-powershell-static(passed)、git diff --cached --check(clean)。真實部署週期證據(回答 opening reason 的循環)
entry 之所以開,就是因為 merge 前拿不到「真實 canonical 部署跑過新 Phase 4c 孤兒 preflight」的證據。該週期已於 2026-08-19 發生(coordinator 主導的 canonical 部署,時點在 #653 於 11:58:44Z merge 之後):
88b7fb868c9837c560cf7fd87aa4039696d15708(origin/maintip;git merge-base --is-ancestor cb92a2b 88b7fb8為真,部署樹確實含本 entry 的 mechanism),wrapperdeploy_exit=0。deploy-20260819-639227436548274529-004→88b7fb8…(annotated,messagedeploy target=canonical-linux exit=0 snapshot=20260819T134054Z-effective-env.json deployed=88b7fb8…),已 push,git fetch --tags後本機可解析。:8004/health、:8004/ui、viewer:5173、conversion:49101/health皆 HTTP 200;kit:49100TCP 可達。cb92a2b版本):remote transport 每次都把部署 checkoutgit reset --hard到新鮮 fetch 的目標 commit,再跑pwsh … scripts/deploy.ps1 -Build(無-SkipKit);Kit runtime signature 含-Revision $resolvedDeployRevision(=部署 checkout 的git rev-parse --verify HEAD),而今日 deploy tag 鏈顯示 deployed revision 每次都變(-002→b6ccc3c…、-003→cb92a2b…、-004→88b7fb8…),因此-004必定走Phase 4c restarting host-native Kit because runtime parameters changed而非 skip 分支;該分支在Start-HostNativeKit之前呼叫新的Get-HostNativeOrphanListener,一旦偵測到未被認領的 LISTEN 就Print-FinalSummary -ExitCode 4並exit 4(硬停)。所以「部署樹含 mechanism」+「deploy_exit=0」蘊含 preflight 在 canonical-linux 上實跑並走了 pass path。.portsclaim 同理:Start-HostNativeKit以-ListenPorts呼叫Start-HostNativeService,後者在Start-Process之前寫下<Name>.ports。誠實界定:REFUSAL 分支未在真實部署中觸發(部署環境乾淨、沒有孤兒 Kit),該分支目前只由
test-host-native-launcher.ps1的 5 個#640fixture 案例釘住(本次重放全綠;Windows CI 上為 #653 merged head0724397的rebuild/test-deploy contractsjob,run32249873467success)。remote host 上的.portssidecar 內容未被 operator 直接檢視,其產生是 code-path 蘊含而非直接觀察。preflight 的 pass path 沒有專屬輸出行。部署 log 與去識別化 effective-env 快照皆屬 operator 本機、未 commit 進本 repo;端點抽查為 coordinator session 當下觀察,未附主機資訊。本地重放為 pwsh 7.5.4,hosted runner 綠燈由本 PR 自己的 required checks 提供。補充旁證(屬已由 #652 關閉的
remote-deploy-tag-origin-main-syncentry,本 PR 不重開它):同日較早的中間部署 tagdeploy-20260819-639227435444539723-003→cb92a2b…已 push 且可見;該次部署期間origin/main被並行 merge(#657)推進,refs/heads/main的 non-fast-forward push 被拒,wrapper 逐字浮出remote_deploy_transport: deploy tag ... was pushed, but origin/main could not be synced to the deployed commit ...並以非 0 結束,且未回收已推出的 tag——正是 #652 summary 列為「未由真實部署驗證過」的 rejection 分支被真實觀察到一次。風險與影響
無 code/runtime 變更;closure 在 mechanism surface 內只動 ledger(另加兩個 fixpoint evidence 檔)。本 PR 落地後 ledger 無 open debt。
governance-base-audit在取得那一票計數 approve 之前預期為紅,屬既知地板,不是本 PR 的變更缺陷。回滾方式
Revert 本 commit。
AI Coding Governance
Frontend Verification
本 PR 非 user-facing,未變更 frontend product surface。
docs/plans/design-system-reference.manifest.jsonDeploy Path Verification
Self-Referential Bootstrap
🤖 Generated with Claude Code
https://claude.ai/code/session_01GSyeoncjEm8rcfRDgnS6CB