Skip to content

feat(unified-console): bind #home/#pipeline/#runtime to coordinator runtime truth via shared poller(unified-console-runtime-truth slice 1) - #700

Merged
monkey1sai merged 35 commits into
mainfrom
codex/openspec/unified-console-runtime-truth-s1
Aug 26, 2026
Merged

monkey1sai merged 35 commits into
mainfrom
codex/openspec/unified-console-runtime-truth-s1

Conversation

@monkey1sai

@monkey1sai monkey1sai commented Aug 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • OpenSpec change unified-console-runtime-truth slice 1(§1 真值綁定+§5 測試/設計閘對齊;owner 2026-08-25 口令執行,D1=P)。/ui 預設殼層 UnifiedConsole 的 #home(四 KPI+六 svc-dot)、#pipeline(五段+治理/報表列)、#runtime(Kit instance/GPU 未取得/服務健康/事件誠實停用)與頂列 GPU chip 改綁 coordinator :8004 的十個既有端點(/api/runtime/status、/api/conversion/records、/api/minio/objects、/api/external/minio-watch/status、/api/callback-outbox/summary、/api/kit/health、/api/kit/instances/current、/api/governance/issues、/api/governance/rule-runs、/api/external/ifc-ready),經共用 poller store coordinatorStatusStore(每端點單一 in-flight、指數退避 ≤60s、document.hidden 暫停)。不新增端點、不新 HTTP client。
  • 誠實模型:data-prov 只用 canonical 七值;data-state ∈ {live, unavailable, offline, error};只有 live 顯示數字,offline 顯示 —+未連線,永不以 0 佔位;字面 82%/14.6/24 與原型固定值退出 production 顯示路徑(fixtureNotInProduction.test.ts 符號層守門+ratchet)。六個假資料 export 移到 test-only;initialIssues 與 docks/WorkspacePage 消費的 4 個 export 留在 production 為 §2/§3 切片欠帳(ratchet 釘住)。
  • 設計閘:e2e/design-system-semantic-cases.ts 改為誠實狀態斷言(case id 不變);home/pipeline/runtime.ops 三屏 golden 依 owner 明示改為產品面誠實 offline 截圖(baseline_provenance.authority=canonical_product_surface,比照 PR test(design): reapprove canonical A4 baseline #429),其餘 10 屏與 workspace.a4.default digest 不變;本機 design gate 13/13 passed(pixel diff 三屏 0)。揭露:design.md §1.2 假設雙旗標 capture 腳本可重拍出產品 offline 態,實際該腳本只重拍設計原型(origin 未變 → golden 不變),故改用產品面升格機制;R-A2 偏離已在此揭露。
  • 既有測試翻轉:EdgeConsole.sharedstatus.test.tsx(#home 經共用 poller 呼叫 runtimeStatus)、a1DockLive.test.tsx 解凍、unified.test.tsx KPI 斷言改 mock 值+offline;新增 12 個 unified 測試檔。
  • coordinatorClient.ts:加性擴充 CoordinatorHttpError(與 slice 2 後端 PR 逐字相同,避免 merge 衝突)、kitHealth/governanceIssues/governanceRuleRuns;jsonGet 改丟該型別、message 逐字不變(GitNexus impact HIGH:16 個同檔 caller、0 process;補強=既有 client 測試全綠)。
  • tasks.md §1/§5:只加「本機綠,待 181」子彈、不打勾(UI task 只憑 canonical-linux 181 證據勾選);openspec/lifecycle-ledger.json/docs/plans/NOW.md 未動。
  • spec-to-done:run unified-console-runtime-truth-s1(P1 wf_893ec66a-827、P3 wf_891c0e12-73b/wf_ab83125c-ad1:5 tasks、final review 8 findings → coordinator 修 f1(initialIssues 移回 production,修復 a3 semantic failure case 迴歸)/f4/f2/f3;續跑 run s1-r2:P4 attempt 2 wf_858af6b3-7ae、P5 round 1/2 wf_fad3e444-2b6/wf_da4dd3f7-191(見 Validation);P4 首輪 wf_ab3ba806-652)→ owner 授權續跑 s1-r2(併 main;P4 wf_2d7339a5-892;P5 wf_fad3e444-2b6:round 1/2 見 Validation 表(fix_now 全閉合;殘 5 項 taxonomy 形式與設計裁決如實揭露))。state:artifacts/spec-to-done/unified-console-runtime-truth-s1{,-r2}-state.md。

AI Coding Governance

Item Result
Change lane S
Behavior contract changed yes
Linked issue none — owner directive 2026-08-25(/spec-to-done 執行 unified-console-runtime-truth §1)
Requirement source superpowers spec: docs/superpowers/specs/2026-08-25-unified-console-runtime-truth-s1-design.md(切片自 OpenSpec change unified-console-runtime-truth:design.md §3–§6、tasks.md §1/§5、specs/unified-console-runtime-truth/spec.md「預設入口真值」「十端點綁定+共用 poller」「設計閘相容」+ MODIFIED unified-governance-console/edge-console-operator-frontend scenario)
CODEOWNERS / owner review requested
GitNexus evidence impact: jsonGet HIGH(16 同檔 caller、0 process,追認)、getL/Dict/UnifiedStateShape MEDIUM、其餘 LOW;per-task impact 已記;detect_changes(--scope compare --base-ref main,index=e6d0213): 44 files/145 symbols(含 origin/main 合併帶入的 governance docs 與 scripts/agent-tooling 測試)、risk high=新共用 poller 的扇出(HomePage/PipelinePage/OpsPage → poll/schedule/emit/retain/isHidden,15 個 execution flows),非 auth/session 核心;per-task detect 皆 pass 或 fallback(linked worktree 已知坑,已揭露)
Browser E2E evidence Playwright — web-viewer-sample/e2e/unified-console-runtime-truth.spec.ts 7 passed ×2(P4 attempt 2 於 88608cb:run A 空 stack→handoff-none;run B executor 以真 API 種入一個 review session→handoff-link;隔離 HEAD stack:本 worktree host-native coordinator :8006+HEAD dist-ui,非 canonical :8004 亦非 181);summary.json 如實列 15 項 not-observed;截圖/summary 見 Frontend Verification
Agent workflow changed? no
Required checks expected CI / Agent Governance / PR Metadata Contract / design-semantic-visual / functional-runtime-conv

Frontend Verification

Item Result
Frontend route /ui#home(總覽)、/ui#pipeline(模型資料與轉檔)、/ui#runtime(Runtime / Kit·GPU)——UnifiedConsole 預設殼層;頂列 GPU chip
Main button(s) tested #home KPI 卡「活躍 Sessions」(data-action=nav → #sessions,已點擊);KPI 卡 轉檔中/未結 Issue/Outbox 待送(nav);「進入生產線 →」;頂列 chips Coordinator/Governance/Kit Runtime/GPU;#pipeline handoff anchor(/ui/open?session=<id>,target=_blank);「觸發轉檔」disabled(不發請求,附「需 allowlist 來源」原因);#runtime 事件列 disabled 附原因
Fixture used none in production path — 全部值來自共用 poller;斷言無 2026-07-14/990_model.ifc/82% 等固定值;本切片未改的殼層靜態字串(頂列 Demo Project – A1 Tower、側欄容器 data-prov="fixture"、頁腳 :8004/ui)與 A1–A4 badge 屬 §2.3 切片,列 Known gaps
Backend API called GET /api/runtime/status、/api/conversion/records?limit=100、/api/minio/objects、/api/external/minio-watch/status、/api/callback-outbox/summary?limit=200、/api/kit/health、/api/kit/instances/current、/api/governance/issues、/api/governance/rule-runs、/api/external/ifc-ready(皆真 coordinator process,非 mock;每端點初次+每 10s 一輪、無重疊 in-flight)
Runtime action 共用 poller 輪詢十端點(P4 attempt 2 觀測 runtime id:sessionId=review_session_410bb21f549c(executor 以真 API 種入,#pipeline handoff-link /ui/open?session=review_session_410bb21f549c)、kit id=kit_local_001(/api/kit/instances/current);run A 空 stack 對照=handoff-none);/api/** 503 → 全部 KPI —/未連線、chips 未連線;解除後於退避上限內恢復 live(18–21s);loading 時先顯示 —(永不以 0 佔位);KPI nav 導向 legacy 真頁
Visible success state loading(載入):首次回應前 KPI 顯示 —/未連線、data-state=offline(永不以 0 佔位,P4 loading 截圖);success(成功):KPI 值帶 data-prov=asbuilt data-state=live+最後更新 hh:mm:ss、chips Coordinator OK/GPU 未取得(unavailable)、六 svc-dot ok/unknown、#pipeline 顯示 kit_local_001(Kit instance)與 review_session_410bb21f549c · active(executor 以真 API 種入的 seed session,非產品流程產生)、#runtime GPU 未取得(非數字);failure(失敗/錯誤):/api/** 503 → 全部 KPI —/未連線、chips Coordinator 未連線(offline 截圖);retry(重試):503 解除後共用 poller 以指數退避(≤60s)自動重試,18–21s 內恢復 live(recovered 截圖)
E2E command cd web-viewer-sample && npx playwright test e2e/unified-console-runtime-truth.spec.ts(viewer 由 config 於 :5180 起;coordinator=本 worktree bim-review-coordinator 以 tsx src/index.ts 於 :8006 起並服務 HEAD dist-ui;E2E_REQUIRE_REAL=1 在此 spec 設計下不可用,skip-free 以 JSON report stats 驗:expected 7/skipped 0)
Screenshot / trace artifacts/e2e/unified-console-runtime-truth-s1-{home,pipeline,runtime,offline,loading,recovered,sessions-nav}.png+artifacts/e2e/unified-console-runtime-truth-s1-trace/(7 trace.zip)+artifacts/e2e/unified-console-runtime-truth-s1-summary.json;tracked 抽樣:docs/evidence/unified-console-runtime-truth-s1/(summary.json+home/pipeline/runtime/offline)
Design gate status mixed
Design screen(s) workspace.a1.default, workspace.a2.default, workspace.a3.default, workspace.a4.default, concept.a5.default, concept.a6.default, concept.a7.default, concept.a8.default, concept.a9.default, concept.a10.default
Reference-missing route(s) / surface(s) #home, #pipeline, #runtime, #issues, #reports, #viewer, #gpu, #conv, #sessions, #instances, #minio, #admin, #spec, #review
Full completion claimed no
Design reference manifest docs/plans/design-system-reference.manifest.json
Visual fidelity result CI output artifacts/e2e/design-system-visual-result.json
Visual comparison Chromium DPR 1; 1440x900 + 1920x1080; pixel diff <=1%; semantic parity 100%
Visual artifacts CI output artifacts/e2e/design-system-visual/<screen>/<viewport>-actual.png + -diff.png
Manual test steps 開 /ui#home → 四 KPI 應顯示 最後更新 hh:mm:ss 與真值(無 2026-07-14);停 coordinator → KPI 轉 —/未連線;恢復後 60s 內回 live;#runtime GPU 顯示「未取得」非數字;#pipeline 有 session 時 handoff anchor 指向 /ui/open?session=<id>
Known gaps (1) canonical-linux 181 與本機 :8004 docker 皆仍服務舊 bundle——UI task 勾選留 §6 部署驗收;(2) 空資料狀態未觀測:conversion record 列、governance issue/rule-run id、MinIO watch 啟用、未取得 截斷分支;handoff 分支只以 seed session(無 artifact/participants)走到,/ui/open 目標頁未驗;(3) 殼層靜態字串(Demo Project – A1 Tower、側欄 data-prov="fixture"、頁腳 :8004/ui)與 A1–A4 LIVE badge 屬 §2.3 切片;(4) #pipeline 逐物件 has_source_ifc 列表隨 §2.4(D2 token 輸入)落地;(5) 4 個 docks/WorkspacePage 假資料 export 留 §2/§3(ratchet);(6) bootstrap ledger 未登記(Get-SelfReferentialMechanismPaths 不含 e2e/**,且 ledger 有 open entry)——spec 5.4 字面未滿足,需 successor 修 spec 措辭或機制清單;(7) 3D/GPU:本切片無 3D 路由,不宣稱任何 3D 完成;(4) design-system reference_missing 路由(無 pixel golden,gate 誠實列出,非 pass):#home, #pipeline, #runtime, #issues, #reports, #viewer, #gpu, #conv, #sessions, #instances, #minio, #admin, #spec, #review——#home/#pipeline/#runtime 由三段路線第 3 段重新核准 PR 補回,其餘為既有欠帳

Deploy Path Verification

Item Result
Affects runtime / docker / Kit / viewer / ports / env? yes — viewer /ui bundle(canonical 部署於 docker build 內 build:ui 重建);無 env/port/Kit/compose 變更
Canonical deploy path updated? verified — scripts/deploy.ps1 與 Dockerfile 未改;npm run build:ui 本機成功(dist-ui 不含 GPU/Stream 82%)
New root script added? no
Deploy dry-run command not needed — deploy mechanism unchanged(UI 由既有 build 步驟產出)
Full deploy tested not available — canonical-linux 部署屬 merge 後 §6(owner inventory scripts/dev/rebuild-test-deploy.ps1)
Verify command cd web-viewer-sample && npx tsc --noEmit && npm run lint:baseline && npx vitest run && npm run test:visual:design-system
Frontend URL verified http://127.0.0.1:8006/ui#home/#pipeline/#runtime(隔離 HEAD stack;截圖見上)
Evidence path docs/evidence/unified-console-runtime-truth-s1/summary.json

Self-Referential Bootstrap

Item Result
Self-referential bootstrap no
Bootstrap ledger entry not applicable
Bootstrap reason not applicable

Validation

Check Result
npx tsc --noEmit(web-viewer-sample) exit 0
npm run lint:baseline trusted=18 baseline=18 current=18 regressions=0
npx vitest run(web-viewer-sample) 89 test files/1175 tests passed
npm run test:visual:design-system(乾淨樹,head 88608cb,#698 之後) passed — 10 screens(#home/#pipeline/#runtime 為 reference_missing,無 pixel 比對;第三段重新核准 PR 補回)
npm run test:visual:design-system(乾淨樹,head 4e73c10,#698 之前、以升格 golden) passed — 13 screens;home/pipeline/runtime.ops diff 0;其餘 ≤0.21%(歷史紀錄)
pwsh scripts/tests/verify-design-system-reference.ps1 -VerifyOrigin(88608cb) passed — 10 screens, 20 golden files(main 現況,#698)
Playwright e2e/unified-console-runtime-truth.spec.ts(P4 attempt 2,88608cb) 7 passed ×2(空 stack/種入 session;隔離 HEAD stack :8006;JSON stats expected 7/skipped 0/unexpected 0)
spec-to-done P5 round 1(wf_fad3e444-2b6,續跑 run s1-r2) 14 registry+critic 9:fix_now f1/g1/e4/c1/c2/c3 → 修於 5e6d7ce(launcher data-prov=demo、E2E 檔頭誠實、tasks 1.8/5.4/5.5/5.6 同步、golden 移出本 PR);follow_up f4/f5/f7/e5/e7/e8/c4/c5/c6/c7/c9;known_gap f8/e2;c8 unverified(證據不在 range)
spec-to-done P4 attempt 2(wf_858af6b3-7ae,88608cb) Playwright 7 passed ×2(空 stack/種入 session);verticalSliceOk;notObserved 15 項如實列於 summary.json(機械 held=no_browser_evidence,coordinator 裁決揭露)
spec-to-done P5 round 2(wf_da4dd3f7-191,5876bb1) fix_now=0、external_blocker=0;round 1 六項 fix 全部複驗閉合(f1/g1/e4/c1/c3/c8 refuted)、5.5 三段路線敘述逐項核實;殘餘 5 項因 taxonomy(in_scope 不得為 follow_up/known_gap)機械 review_unverified:HomePage.tsx:6 註解矛盾(已修於後續 commit)、殼層 chrome 既有 fixture 標記(base 已存在、§2.3 欠帳)、e9 loading 與 offline 不可區分(設計裁決交 owner)、tasks 5.4 引用未 tracked 輸出+過期句(已修)
CI functional-runtime-conv(hifi-token-authority.spec) 769b682/d973a79 紅:unified-home.png 與 fixture 時代 baseline diff 2.73%(#home 改綁真值後預期)→ 以該 CI run 的 actual 重設 baseline(artifacts/e2e/hifi-token-authority/unified-home.png,非 docs/plans reference authority);token-authority 斷言未動
git diff --cached --check clean

Known Risks

  • jsonGet 改丟 CoordinatorHttpError(HIGH:16 同檔 caller)——message 逐字不變、既有 client 測試全綠;與後端 PR(slice 2a)逐字相同的 class 定義,先合者落地、後合者為相同 hunk。
  • 三段 golden 路線(owner 核准 2026-08-26):test(design): demote home/pipeline/runtime.ops baselines to reference_missing(unified-console-runtime-truth 3-PR route step 1) #698 已把 #home/#pipeline/#runtime 降為 reference_missing(本 PR 期間三屏無 pixel golden,gate 誠實列出);本 PR 合併後由重新核准 PR 以合併後產品面升格 canonical_product_surface(未完成前缺口持續);未來版面變動需再走升格流程。
  • HomePage/PipelinePage 仍直讀 rt.sessions.*(RuntimeStatus 型別宣告必存在;serviceRows 已防禦);200 但缺欄位時可能拋錯(P3 f4,低機率)。
  • 後補 commit(P4 attempt 2 證據之後,皆非渲染輸出變更):769b682 HomePage 註解/tasks 5.4 措辭;d973a79 測試 mock 把 http://127.0.0.1:49101 改為非 listener 佔位(production-boundary gate);hifi unified-home.png baseline 以 CI actual 重設。spec-to-done state 於 5876bb1 停在 HELD@P5 review_unverified,owner 2026-08-26 選 A(接受 coordinator 裁決開 PR)。
  • Full completion claimed = no(本 PR 為 slice 1;UI task 待 181 驗收)。

🤖 Generated with Claude Code

https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE

monkey1sai and others added 30 commits August 25, 2026 17:59
…定+§5 測試對齊)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…ask)

- 共用 poller store(單一 in-flight/退避 ≤60s/hidden 暫停)+ ConsoleDataProvider
- #home/#pipeline/#runtime/頂列 GPU chip/側欄 badge 綁十個既有端點,data-state 四值誠實渲染
- 假資料 export 移 test-only(D1=P),docks/WorkspacePage 四個欠帳以 ratchet 釘住
- 5.1–5.4 既有測試與 semantic cases 翻轉為誠實狀態斷言;Playwright E2E 打真後端 :8004
- 收官 gate、tasks.md 只加「本機綠,待 181」子彈;blocker 八點交 coordinator 裁決

Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
reviewer(task-decomposition,major):原 Task 3 把三種可獨立成立的 scope 揉進同一個
12-step/713 行/單一 commit,且 Step 10 對四個既有測試檔只給文字位置描述、無逐檔測試
檢查點。依同一份 plan 對 Task 4/5/6 建立的粒度基準拆解:

- Task 3a:既有 unified-mount 測試前置防護 sweep(aliasRedirect/dockLiveLink/a1DockLive
  三檔),每個 patch 給 old/new 逐字片段,每改完一檔立刻單檔 vitest 檢查點;不改斷言,
  sweep 前後全量同綠;獨立 commit `task#3a:`。
- Task 3b:真值投影純函式 runtimeTruth.ts+狀態文案 key+mock builders,不動 production
  元件;獨立 commit `task#3b:`。
- Task 3c:UnifiedShell 整檔重寫(tasks 1.7)+5.1 翻轉;plan 內附證據說明 5.1 為何必須與
  殼層同 commit(現況 EdgeConsole.sharedstatus.test.tsx:67 `expect(spy).not.toHaveBeenCalled()`
  會在殼層改輪詢當下變紅,拆開會讓該 commit 帶紅燈);獨立 commit `task#3c:`。

同時修正原 Step 10 兩個會壞事的指示:incomingHandoff.test.tsx 經 `rg -n "EdgeConsole"`
核實 0 命中(不掛殼層,poller 不會啟動),照原指示插 spy 會覆蓋該檔自身的 runtimeStatus
mock 而使四案退化,故改為「核實後不改」並保留反例警告;aliasRedirect 的 helper 必須插在
該檔既有 vi.spyOn 之前,否則 503 會蓋掉它刻意設定的空值 stub。

另同步:Global Constraints commit 前綴、檔案結構表、Task 4 對 Task 3c 的回指、Task 10
的 commit 清單改為十二個。需求未刪,tasks §1/§5 範圍不變。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nceIssues/governanceRuleRuns)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
plan 1A Step 1 規定「任一為 HIGH/CRITICAL → 停止並回報 coordinator」(本檔 line 147),
repo CLAUDE.md GitNexus 政策同樣要求 HIGH/CRITICAL 必須先警示、不得忽略。實跑
`gitnexus impact jsonGet -d upstream -r AI-BIM-governance` 為 risk=HIGH/impactedCount=16,
但當輪 implementer 未停止、未回報 coordinator,於 ignored 的 artifacts/slice1-impact.txt
自記續行理由後打勾,並完成 Step 2–6(157a4aa,CoordinatorHttpError 落地)。

本 commit 只補流程缺口,不改任何 production code:
- 1A Step 1 下方加「實跑偏離」註記:載明停點未履行、`[x]` 僅代表 impact 已實跑並抄錄、
  不代表停點已依規履行,並附 fixer 覆核證據。
- 「Blocker/裁決點」新增第 9 項(未裁):交 coordinator 事後追認或要求回退,
  並要求 PR body blast radius 段逐字揭露 jsonGet=HIGH(16) 與未裁狀態。

fixer 覆核(2026-08-25 本 session 實跑):impact 仍 HIGH/16,16 筆 caller 的 filePath
全為 web-viewer-sample/src/console/coordinatorClient.ts 同檔既有方法,皆以 await jsonGet<T>()
消費、未檢查 error.constructor/Object.getPrototypeOf,message 逐字不變;
coordinatorClient.test.ts(42)+conversions-history(2)+runtimeTruth(4)+coordinatorStatusStore(8)
共 56 passed,npx tsc --noEmit exit 0。技術面未觀察到退化,不等於流程停點已合規。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
必修 gap:1A Step 1「任一為 HIGH/CRITICAL → 停止並回報 coordinator」(本檔 line 147)
未履行。前一輪 605327a 已補記事實並列 Blocker #9,但 (a) Step 1 仍掛 [x],
與「停點未履行」的事實矛盾;(b) 六筆 impact 數值只存在 ignored 的
artifacts/slice1-impact.txt(.gitignore:248 artifacts/*.txt),不隨 PR 留存,
coordinator 無可 commit 的正本可據以裁決。

本 commit 仍不改任何 production code,只補流程與紀錄:
- 1A Step 1:[x] → [ ],標 HELD,載明「impact 已實跑並抄錄」為真但停點未履行,
  待 coordinator 追認後方可勾回。
- 1A Step 1 註記新增「第二輪 fixer 覆核+停點回報」:六筆 impact 逐筆數值入檔,
  並區分停點的兩半 —— 回報半邊已補行、停止半邊無法回溯補行。
- Blocker #9 補本輪處置;本項維持「未裁」。

本 session 獨立實跑(非轉抄):
- npx gitnexus@1.6.9 impact -d upstream -r AI-BIM-governance 六筆 ——
  jsonGet = HIGH/16;coordinatorClient = LOW/0;UnifiedShell = LOW/2;
  HomePage = LOW/2;PipelinePage = LOW/2;OpsPage = LOW/2。
- cd web-viewer-sample; npx vitest run(coordinatorClient.test.ts 42+
  conversions-history 2+runtimeTruth 4+coordinatorStatusStore 8)= 56 passed。
- cd web-viewer-sample; npx tsc --noEmit = exit 0。

detect-changes 標 skipped:本 commit 純 docs/plan,無 code 改動;
已改跑 git diff --name-only --cached 自查 scope(僅該 plan 檔)+ git diff --cached --check 無輸出。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…記錄後續行、CRITICAL 才停

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…態文案 key+mock builders

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ller;5.1 同步翻轉

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… fixture 固定值

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… 的 #minio

IMPORTANT #1(eslint-baseline required gate 紅燈)
- 修前 `check-eslint-baseline.mjs` 回 trusted=18 baseline=18 current=20 regressions=2(policy=shrink-only,exit 1)。
- 兩筆 react-refresh/only-export-components 迴歸的檔案在 origin/main 皆不存在(同屬本分支新檔),故由本 PR 整體負責:
  - ServiceHealthList.tsx:`ServiceRow`/`deriveServiceRows` 移入新檔 `serviceRows.ts`,.tsx 只留元件。
  - ConsoleDataProvider.tsx:context 與 `useConsoleData` 移入新檔 `consoleData.ts`,.tsx 只留 Provider 元件。
- 比照既有 `runtimeTruth.ts`/`coordinatorStatusStore.ts` 純模組慣例;三個 importer(HomePage/PipelinePage/UnifiedShell)改指向 `./consoleData`。
- 修後 regressions=0(exit 0)。未改 `scripts/eslint-baseline.json`:`--trusted-baseline` 比對會把新增 finding 判為迴歸,加白名單必然 fail-closed。

IMPORTANT #2(Home outbox KPI 導向偏離 canonical design)
- design.md §4 明定 #home 四 KPI 導向 `#conv`/`#sessions`/`#issues`/`#minio`;實作為 `#pipeline`,既無註記也無測試覆蓋。
- 依 spec 自述衝突規則「與 OpenSpec change 衝突時一律以 change 為準」,改 code 對齊 `#minio`,不擅自改動 OpenSpec design.md。
- 新增 `kpi-outbox` 導向斷言(與既有 `kpi-sess` 並列)鎖住行為;TDD 先見紅 `expected '#pipeline' to be '#minio'` 再實作。

驗證(本 session 於 worktree 實跑)
- npx tsc --noEmit → exit 0
- npx vitest run → 87 files / 1166 tests passed(較修前 +1=新增的 kpi-outbox 導向測試)
- npm run lint:baseline → trusted=18 baseline=18 current=18 regressions=0,exit 0
- npm run build:ui → built,exit 0
- gitnexus detect-changes --scope staged → 8 files/2 symbols(HomePage、PipelinePage)、risk low、affected processes 0
- git diff --cached --check → 無輸出

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…rkspace badge),case id 不變

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…照、handoff anchor、offline→retry、loading、單一 in-flight)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…CF dock 種入(a3 semantic failure case 迴歸修復,ratchet 釘住);serviceRows 防禦讀取 runtimeStatus 子欄位;tasks.md 1.1/1.7 措辭誠實化

P3 final review(wf_ab83125c-ad1)f1:workspace.a3.default failure case(issues-open-red-chip/issues-firerating-issue-title)在 af88ecd 把 initialIssues 移到 test-only 後空掉,
不是 pre-existing——改回 production 種入(docks.tsx 屬 §2 範圍不動),SLICE2_DEBT 加 UnifiedShell.tsx:[initialIssues],prototypeFixtures 改 re-export。
f4:serviceRows.ts 對 configured_endpoints/service 用 ?. 防禦(缺欄位標 —/unknown,不崩潰)。f2/f3:tasks.md 1.1 揭露 jsonGet HIGH(追認)、1.7 的 82% 說法限定 production 檔。
驗證:npx tsc --noEmit 0;npm run lint:baseline regressions=0;npx vitest run 89 files/1175 tests 綠。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…den(owner 明示 2026-08-25,D1=P;canonical_product_surface 比照 PR #429)

雙旗標 capture 腳本只重拍設計原型(authoring origin,未變),無法表達產品在 /api 503 stub 下的 offline/empty 狀態;
改以 design-system-visual.spec.ts 於 d9b40de 的 actual 截圖為 golden,三屏 baseline_provenance.authority=canonical_product_surface,
approval 記 owner 2026-08-25 明示;workspace.a4.default 與其餘 9 屏 golden 未動;manifest captured_at_utc 為同日 origin 重拍時間戳。
verify-design-system-reference.ps1 -VerifyOrigin:passed — 13 screens, 26 golden files。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…olated HEAD stack :8006;summary+home/pipeline/runtime/offline 抽樣截圖;not-observed 項如實列於 summary)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
… isolated HEAD stack :8006 with API-seeded review session;summary 如實列 not-observed)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…ical 七值)、E2E 檔頭誠實敘述 require-real 不可用、tasks.md 1.4/1.8/5.4/5.5/5.6 與 ratchet 標題同步(6 個 export、a3 迴歸為本 slice 造成並已修、rebaseline 落地實況與 PR 切分揭露);golden/manifest 移出產品 PR

change-scope 政策(reference_authority_mixed_fail_closed)禁止產品與 golden 同 PR:三屏 golden 與 manifest 還原為 origin/main 內容,
升格改走獨立 reference PR(先降級為 reference_missing → 本 PR → 以合併後產品截圖重新核准)。
P5 round 1(wf_fad3e444-2b6):f6/g2/e1 refuted;f1/g1/e4/c1/c2/c3 fix_now 已修;f7/e5/e7/e8/c4–c9 follow_up/known_gap 進 PR body。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
- 5.5 落地實況:reference-first 換 golden(#697)在 CI 以產品 offline golden 比對 main
  fixture UI 而紅(manifest/baseline 屬 full_dispatch_globs);改走三段:(1) #698 降級三屏為
  reference_missing(10 屏/20 golden,-VerifyOrigin 於 main passed — 10 screens)→(2) 本產品 PR
  (scope mixed、10 屏比對;#home/#pipeline/#runtime 此刻無 pixel golden)→(3) 重新核准 PR
  (合併後產品面升格 canonical_product_surface,待做)。標明「13 screens/13/13」數字是 #698 之前
  在 4e73c10 的本機驗證,不是 main 現況。
- 5.6 本機列同樣標明時間點(4e73c10,#698 之前)與 #698 之後的 10 屏比對結果改看 PR body。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
monkey1sai and others added 2 commits August 26, 2026 07:48
… 修補之後重取)

Playwright e2e/unified-console-runtime-truth.spec.ts 7 passed ×2(run A 空 stack→handoff-none;
run B 以真 API 種入 review_session 走 handoff-link),隔離 HEAD stack:host-native coordinator :8006
+HEAD dist-ui(bundle index-BPjskEUF.js),非 canonical :8004(docker 仍 pre-slice bundle)亦非 181。
summary.json supersedes 6cd0074 版;home/pipeline 截圖為 HEAD 版(offline/runtime 位元相同)。
notObserved 15 項如實列出(181/:8004 部署、conversion 列、governance ids、GPU session、
back-off 上限、document.hidden、MinIO watch…);executor 另指出 gaps e1–e9(含 e5 殼層靜態字串
data-prov 標示、e9 loading 與 offline 不可區分)交 P5 round 2 裁決。UI task 仍待 181 驗收。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
… 證據引用

- HomePage.tsx:6 註解仍寫「維持 data-prov=\"fixture\"」,與 :98(P5 c1 修為 data-prov=\"demo\")矛盾;
  改為如實描述(容器 demo、badge 文字尚未改綁真值)。註解僅開發者可見,不改變 bundle/渲染輸出
  (P5 round 2 verifier 判定;本次 commit 在 P4 attempt 2 證據之後,state 驗證器將視為 evidence_stale,
  已於 PR body 揭露)。
- tasks.md 5.4:h1——「見 artifacts/slice1-gates.txt」引用的是 .gitignore 排除、永不入 range 的本機輸出,
  改為明示不可查證、承重驗證為 CI required check design-semantic-visual;h2——「pixel 三屏預期紅(待 5.5
  owner rebaseline)」補上時間點(57d29d3、#698 之前)與現況(三屏 reference_missing,見 5.5)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
monkey1sai and others added 3 commits August 26, 2026 09:11
…y.base_url in the coordinator mock

scripts/lib/production-boundary-contract.ps1 rejects any added
http(s)://…:49xxx literal in browser source (the __testdata__ directory is not
one of its test-path exclusions), and the new __testdata__/coordinatorMocks.ts
carried the real host-native value http://127.0.0.1:49101. The mock now uses
http://conversion-authority.test; serviceRows only echoes the string into the
"無探測端點 · 未取得" detail, and no unified test asserts the literal
(vitest src/console/unified: 10 files / 52 tests pass).

Test-only; rendered production output and the P4 attempt-2 evidence are
unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE
…ntime-truth #home

e2e/hifi-token-authority.spec.ts pins a tracked pixel baseline for /ui#home
(artifacts/e2e/hifi-token-authority/unified-home.png, maxDiffPixelRatio 0.01).
Slice 1 rebinds #home to coordinator runtime truth, so the fixture-era
baseline now differs by 2.73% (CI functional-runtime-conv on 769b682 /
d973a79: KPI cells render live/offline truth — 轉檔中 1, sessions 0, 未結
ISSUE "—/未連線" because the harness runs no governance-service, outbox 0;
service-health rows show the harness stub endpoints).

New baseline = the CI actual from run 32917797981 (windows-2025, artifact
functional-runtime-conv-769b6824…-attempt-1, _output/hifi-token-authority/
unified-home-actual.png), reviewed by the coordinator as the expected honest
state. The spec's token-authority assertions (AB token effective, theme keys
not written) are unchanged; only the content baseline moves. Path is
artifacts/e2e/** (non-product for the design-system gate; not part of
docs/plans reference authority).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE

@monkey1sai-blip monkey1sai-blip left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{"kind":"ai-bim-automated-approve-only","version":1,"automated":true,"repo":"monkey1sai/AI-BIM-governance","prNumber":700,"headOid":"a246130784d91606ca84a0efd8dc9b7820b2c9c4","baseOid":"e775595479fed594a39ad4766328a95e2ee8b207","action":"approve-only"}

@monkey1sai
monkey1sai merged commit d5f2d77 into main Aug 26, 2026
25 checks passed
@monkey1sai
monkey1sai deleted the codex/openspec/unified-console-runtime-truth-s1 branch August 26, 2026 01:31
monkey1sai added a commit that referenced this pull request Aug 26, 2026
…ical product surface(unified-console-runtime-truth 3-PR route step 3) (#701)

Reference-authority-only change (no product paths). Re-inserts console.home.default,
pipeline.default and runtime.ops.default into docs/plans/design-system-reference.manifest.json
(demoted to reference_missing by #698) with goldens captured from the merged product surface:
main d5f2d77 (= #700 slice 1 merged) rendered by web-viewer-sample/e2e/design-system-visual.spec.ts
under the harness /api 503 stub, i.e. the honest offline/empty state the routes now show
(1440x900 + 1920x1080, Chromium DPR 1). Each entry carries
baseline_provenance.authority=canonical_product_surface (canonical_route #home/#pipeline/#runtime,
capture_runner design-system-visual.spec.ts, approval = owner rebaseline 2026-08-25 + 3-PR route
2026-08-26), per-file sha256 and baseline_snapshot_sha256 recomputed; route_inventory restores
status=approved + screen_id and routes_without_approved_pixel_reference drops the three routes.
The other 10 screens / 20 goldens are byte-identical to main.

Capture method (disclosed): the screens were first restored with their pre-demotion goldens
(14a6ac6) so the spec would enumerate them; that run failed on exactly the three screens
(diff 1.0–3.5%) and wrote the product actuals, which were promoted to goldens; a second run
passes 13/13. capture-design-system-reference.mjs --rebaseline only re-shoots the authoring
origin and cannot express product state (R-A2 deviation, existing debt D-15, per PR #429).

Verified: pwsh scripts/tests/verify-design-system-reference.ps1 -VerifyOrigin → passed,
13 screens, 26 golden files; npm run test:visual:design-system → 13 screens passed.


Claude-Session: https://claude.ai/code/session_0134ZvBvDDUpHSjzjvDZXEBE

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants