Skip to content

test(design): reapprove canonical A4 baseline - #429

Merged
monkey1sai merged 2 commits into
mainfrom
fix/a4-canonical-baseline
Jul 29, 2026
Merged

monkey1sai merged 2 commits into
mainfrom
fix/a4-canonical-baseline

Conversation

@monkey1sai

@monkey1sai monkey1sai commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Reapprove the A4 golden baseline against the canonical semantic surface at #workspace?dock=a4.
  • Keep the upstream design snapshot read-only; this PR changes only the two A4 golden images and their pinned manifest hashes/provenance.

Change Classification

Label Value
Change lane G
Behavior contract changed no
Requirement source existing contract; explicit user-authorized A4 baseline reapproval

AI Coding Governance

Label Value
Linked issue PR #422 closeout dependency
Requirement source existing contract; explicit user-authorized A4 baseline reapproval
CODEOWNERS / owner review Required: design/reference authority owner review before merge
GitNexus evidence Structural index available; FTS extension loader unavailable on Windows (libfts.lbug_extension dependency load failure), so keyword-search evidence is explicitly gated unavailable. No code symbols changed.
Browser E2E evidence npm run test:visual:design-system — 13 approved screens passed; A4 semantic parity 100%.
Agent workflow changed? no
Required checks expected PR body evidence, design-semantic-visual, design-reference verifier, viewer build

Validation

  • pwsh -NoProfile -NonInteractive -File .\scripts\tests\verify-design-system-reference.ps1 -VerifyOrigin — passed (13 screens, 26 golden files).
  • npm run test:visual:design-system — passed (13 screens; canonical A4 semantic surface).
  • pwsh -NoProfile -NonInteractive -File .\scripts\tests\verify-design-system-visual-result.ps1 -TargetCommit HEAD -AllowUntrackedArtifacts — passed (26 comparisons).
  • npm run build — passed; existing Vite chunk-size warning remains.

Summary by CodeRabbit

  • Chores
    • Updated design reference baseline metadata and image snapshots.
    • Recorded additional baseline provenance details for the A4 workspace screen.

Copilot AI review requested due to automatic review settings July 29, 2026 11:15
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: be48a857-228a-4ffc-9e44-ed468b2d9b0f

📥 Commits

Reviewing files that changed from the base of the PR and between 13033cb and 21241ac.

⛔ Files ignored due to path filters (2)
  • docs/plans/design-system-baseline/workspace.a4.default/1440x900.png is excluded by !**/*.png
  • docs/plans/design-system-baseline/workspace.a4.default/1920x1080.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/plans/design-system-reference.manifest.json

📝 Walkthrough

Walkthrough

The design-system reference manifest adds provenance metadata for the A4 default screen and updates its baseline image and snapshot SHA256 digests.

Changes

Baseline manifest

Layer / File(s) Summary
A4 baseline provenance and digests
docs/plans/design-system-reference.manifest.json
Adds canonical baseline provenance and rebaseline approval metadata, updates the 1440x900 and 1920x1080 image digests, and refreshes the top-level snapshot digest.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: reapproving the canonical A4 design baseline.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/a4-canonical-baseline

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21241acb9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +426 to +428
"authority": "canonical_product_surface",
"canonical_route": "#workspace?dock=a4",
"capture_runner": "web-viewer-sample/e2e/design-system-visual.spec.ts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore the A4 golden to the approved design authority

When the A4 visual job runs, design-system-visual.spec.ts renders the production route and compares it with these baseline files, so declaring that same product surface as the baseline authority makes the comparison circular. The newly pinned images capture the raw/table-only production A4 page rather than the approved authoring-origin design, allowing a substantially off-design A4 screen to report a ≤1% diff. Generate the golden through capture-design-system-reference.mjs --rebaseline --confirm-rebaseline against the read-only design origin, or mark the surface reference-missing instead of approving the current implementation.

AGENTS.md reference: AGENTS.md:L39-L39

Useful? React with 👍 / 👎.

},
"baseline_provenance": {
"authority": "canonical_product_surface",
"canonical_route": "#workspace?dock=a4",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Register the canonical A4 route in the operative fields

When CI produces A4 evidence, this new canonical_route value is ignored: design-system-visual.spec.ts navigates screen.production_routes[0], which remains the legacy #a4 alias, and the result verifier likewise accepts only production_routes. Consequently the supposedly canonical reapproval still records #a4 as the tested production route and never performs direct navigation to #workspace?dock=a4; update the operative screen mapping, route inventory, and verifier grammar rather than adding an unused provenance-only route.

AGENTS.md reference: AGENTS.md:L43-L44

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reapproves the A4 design-system golden baseline (workspace.a4.default) against the canonical product surface at #workspace?dock=a4. It is a governance-scoped (Lane G) design-reference change that touches only the pinned manifest: it updates the two A4 golden image hashes and their aggregate snapshot hash, and adds an informational provenance block documenting the reapproval. No application/runtime code symbols change.

I verified the surrounding machinery: verify-design-system-reference.ps1 requires each baselines[*].sha256 to match the actual PNG bytes and baseline_snapshot_sha256 to equal the canonical digest over all baseline descriptors (path/bytes/sha256), so the per-file and aggregate hash updates must be mutually consistent. The new baseline_provenance field is inert metadata — it is not consumed or validated by the verifier, the visual spec, or any code, and the old hashes are not referenced anywhere else. The A4 route model is also consistent: #a4 redirects to the canonical #workspace?dock=a4 surface (A4SemanticSearchPage) per EdgeConsole.tsx.

The changes cannot be fully validated by automated review because the golden PNG images are binary (pixel correctness is only provable in the design-fidelity CI gate on a Windows runner), and the reapproval asserts a product-surface authority that diverges from the canonical baseline-capture pipeline (capture-design-system-reference.mjs still sources baselines from the read-only design root), which is a design/reference-authority judgment the PR itself flags for owner review.

Changes:

  • Update the A4 golden hashes for both viewports and the aggregate baseline_snapshot_sha256.
  • Add an A4-only baseline_provenance block recording authority, canonical route, capture runner, and approval note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@monkey1sai
monkey1sai enabled auto-merge (squash) July 29, 2026 11:38
@monkey1sai
monkey1sai merged commit 2b9573e into main Jul 29, 2026
20 of 21 checks passed
@monkey1sai
monkey1sai deleted the fix/a4-canonical-baseline branch July 29, 2026 11:42
monkey1sai added a commit that referenced this pull request Jul 29, 2026
…e-evidence 紅燈

baseline 前進(13033cb → bfcc433,含 #430/#429/#422)後依三個重跑輪驗證者
(X1 引用存活/X2 spec 保全/X3 未竟提問)與答案輪雙驗證者(Y1 事實/Y2
治理形式)的交叉結果做 L3 仲裁。

#429 事件(test(design): reapprove canonical A4 baseline)帶來的事實更新:
- D-1 改列歷史(CI 三連證 failure→success→success);「rebaseline 關不掉
  這個紅燈」節改寫為 v2,誠實記錄 v1 結論被 #429 實證推翻,含 v1 論證 #1
  在 13033cb 當下即可被 DESIGN_SYSTEM_SCREEN_IDS 證偽的查證疏漏。
- D-13 拆分:對 A4 失效(golden 改溯產品面),對其餘 12 screens 仍成立;
  manifest 混合權威與 A4 entry 內部不一致記入新增之 D-15。
- D-3 風險反轉:未套 token 的產品面已被固化進 golden,日後套 token 會反紅。
- D-4 緊急度歸零(#429 的第四條路不觸發三道牆;斷言本身仍成立)。
- 新增 D-14(harness/fakeReviewSocket 證據面,含雙閘門與 design gate 已走
  harness route 的精確描述)、D-15(#429 provenance 切換:使用者授權、非
  R-A2 雙旗標路徑、四項待收編)、D-16(spectator 裸連結安全模型,提權前提
  精確化:primary 空缺或 TTL 45s 過期時)、D-17(ledger 92/93 vs 66/71 漂移)。
- X1 行號更新表全數套用(viewerLeaseStore 348-360、app.ts 1275-1282、
  Window.tsx 1882-1886 等 18 處);六處路徑補全;D-12 自我指涉修正。

Q1–Q8 委任裁決落地(新增「使用者委任 AI 裁決」節):
- 節首 provenance 三 qualifier(非使用者原話/可單方推翻/不構成 canon 或
  requirement);A1/A3/A6/A7/A8 照案通過,A2/A4/A5 依 Y1 修正——
  A5 為最重修正:viewer-viewport:24「spectator SHALL 不內嵌於 console」無
  scope 限定,使用者裁決的 A5–A10 內嵌 spectator 在 MODIFIED delta 收窄
  console 措辭前屬 spec-nonconforming;MODIFIED delta 是必要前提。
- U 表原地標記不改寫不重編號:U-8/U-9 關閉(分標 AI-裁決/事實更正)、
  U-6+U-12 合併(參 D-9/D-11;仍待使用者裁決)、U-2 記 #429 實質處置、
  U-7/U-10 部分回答。A1–A10 節補 F-1 更正(兩份 approved spec 對照)與
  C-3 重定性(spec 要求不 unmount vs 現況 key={page} 落差)。

spec 增補(純加強,6 條 Requirement 原文未動,核心裁決保全):
- R5 新增 harness 揭露 Scenario(揭露+不得跨界引用,不開 fake 白名單);
  tasks 新增 3.6 對應;proposal What Changes 同步一句;ledger total 29→30。

修 merge-evidence 紅燈(fix ci):
- required merge evidence 失敗根因=D-17 ledger 漂移:merge origin/main 後
  分支含 #422 更新的 cross-service-structured-log-baseline tasks.md(92/93)
  但 ledger 仍記 66/71,reconciliation fail。同步 ledger 至 openspec list
  機器真值(92/93、subject bfcc433)。

Verification: openspec validate change --strict PASS;--all --strict 70/70;
test-ai-coding-metrics 13/0;ledger reconciliation PASS;git diff --check
clean;tasks 30 = ledger 30。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sfoZB7CAZJUxm9AuUBpM8
monkey1sai added a commit that referenced this pull request Jul 29, 2026
…離 stack browser E2E 契約 (#428)

* docs(openspec): 立 isolated-branch-stack-browser-e2e(A4 tasks 4.x 的隔離 stack browser E2E 契約)

a4-console-convergence tasks 4.1-4.4 把 A4 的全部 runtime evidence 押在「隔離
alt-port branch stack(coordinator :8005 / governance :49103)」,且 4.1 指向
docs/agents/product-operability-and-script-contract.md。實測 subject 13033cb:
該檔 206 行內 8005 / 49103 / 隔離 stack 出現 0 次,repo 內也沒有 launcher、
沒有 port 不相交檢查、沒有 machine check。指標是懸空的。

現況知識散在三處且都不是 product contract:
- web-viewer-sample/playwright.config.ts(註解 + fallback 常數)
- web-viewer-sample/e2e/a4-closeout.spec.ts(檔頭註解)
- .claude/skills/spec-to-done/ensure-host-native-ports-free.ps1
  (agent skill;openspec/config.yaml 明令 skill 不得作為 product source of truth)

兩個真實失效模式:打錯環境污染唯一測試部署區;a4-closeout.spec.ts 缺
A4_E2E_REQUIRE_REAL=1 時 conditional skip 後仍回報綠燈。

本 change 新增 capability isolated-branch-stack-verification(6 條 Requirement /
15 個 Scenario):未 merge branch 的 runtime evidence 一律在隔離 stack 取得;
port 集合與部署區及 Kit range 不相交且 fail closed;launcher 必須是 repo-owned
script 而非 agent skill;evidence 引用必須 require-real 且不得推論 design gate、
deploy path 或 3D/WebRTC 結論;契約需 machine check。

不承接 a4-console-convergence tasks 4.x 本身,不改任何 A4 實作,不碰凍結面。
capability 與 a4-semantic-search 不重疊,不觸發 NoSuccessorWhilePredecessorOpen。

驗證:
- npx openspec validate isolated-branch-stack-browser-e2e --strict -> valid
- npx openspec validate --all --strict -> 70 passed, 0 failed
- verify-openspec-lifecycle.ps1 -BaseRef main -> non_deferred=5(<=6), deferred=5
- test-agent-governance-check.ps1 -> 17/17 pass
- scan-secret-patterns.ps1 -> passed
- git diff --cached --check -> clean

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PbxS3tBaQ1o8yn5LnVoeJY

* docs(openspec): 將 design gate 唯讀查證結論整合進 isolated-branch-stack-browser-e2e

本 change 的 Non-goals 與 design.md §4 寫「不放寬 design gate;pixel/semantic 仍由既有
design-system 路徑判定」。該敘述成立,但不等於既有路徑健康。2026-07-29 對 subject
13033cb 的唯讀查證顯示 design gate 已為紅燈,成因與本 change 無關;此處揭露並指派 owner,
避免本 change 的 functional evidence 被誤讀為 design 覆蓋、也避免缺口變成無主債務。

新增 proposal.md「相鄰既有缺口」D-1~D-5:
- D-1 main design-semantic-visual FAILURE;唯一失敗項 workspace.a4.default
      (diff ratio 0.2794 / 0.3186 > max_diff_pixel_ratio 0.01);其餘 12 screens PASS
      且 semantic_parity = 1 → 純 pixel 失效
- D-2 成因為 route IA 遷移:UNIFIED_WS_KEYS 已移除 a4,#a4 改渲染 A4SemanticSearchPage,
      manifest 釘的 golden 描繪的 WorkspacePage A4 dock 已無路由可達
- D-3 A4SemanticSearchPage 未套 --ab-* 且 IA 偏離 Hi-Fi canon(canon 的 A4 是 3D
      工作區內的 dock)→ 需使用者裁決改 code 或依 R-A1 提案改 canon
- D-4 R-A2 治理缺口:雙旗標腳本只重算 hash,無法增刪 screens[] 或改 route 歸屬,
      route IA 變更後 manifest 無合法更新路徑(#349 先例早於 R-A2 落地的 #360)
- D-5 pinned origin 對 manifest.source.files 23/23 hash MATCH(rebaseline 對該面為
      no-op,不需設計側核准);但 repo 正本副本與 pinned 快照分歧,support.js 另違 R-A3

同時附上未實作 change 盤點(machine truth = lifecycle-ledger.json)作為 owner 指派依據。

其他變更:
- design.md §4 補「該路徑目前為紅」限定,§5 增兩列風險
- tasks.md 新增 6.6:PR body 逐字揭露 D-1~D-5 且證明 diff 未觸及 manifest/baseline/
  R-A1 手寫正本面
- lifecycle-ledger.json task_ledger.total 27 → 28
- NOW.md 增 design gate 現況揭露與變更紀錄列

本 commit 不修復任何一項缺口,不觸碰 design-system-reference.manifest.json、
design-system-baseline/** 或任何 R-A1 手寫正本面檔案。

Verification: npx openspec validate isolated-branch-stack-browser-e2e --strict PASS;
npx openspec validate --all --strict 70 passed / 0 failed;git diff --check clean。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017jRpqq8bEbss9pPyzngcXS

* docs(openspec): 三層交叉對抗驗證結果——撤回被推翻的裁決並補 D-6~D-13

依使用者指令對 D-1~D-5 衍生的設計問題執行三層交叉對抗驗證(L1 提案 →
L2 三個獨立 refute-by-default 驗證者從 code-truth / canon-governance /
runtime-capacity 三視角攻擊 → L3 仲裁)。基準 main 13033cb,全程唯讀。
結果:L1 多數裁決被推翻。本 commit 誠實記錄撤回,避免同批錯誤結論被後續
agent 從對話紀錄撿回重做。不新增 requirement、不改變 capability 範圍。

事實修正(前一 commit 已推送的錯誤):
- D-2 原寫「golden 描繪的 UI 已無任何路由可達」不精確。A4 dock tab 與
  A4Dock 元件兩者都仍在(fixtures.ts:178-184、WorkspacePage.tsx:159、
  unified.test.tsx:44-50 pin 住),只是面板被掏空為 data-prov="redirect"
  導流卡(docks.tsx:237-249)。不可達的是 golden 描繪的「已填充」版本。
- D-4 原寫的治理缺口為 latent 而非 active:結構性斷言目前全數仍成立,
  且封鎖是三道牆——capture 腳本、verify-design-system-reference.ps1:280
  的 hard-coded $expectedRoutes、ci.yml:386-390 的 base-approved screen
  fail-closed。原指派候選 owner align-frontend-design-system-reference
  已撤回(rebaseline ownership 是其解凍前必裁的四項互斥設計之一)。

被推翻並撤回的 L1 裁決(含機器證據):
- 「改 code 對齊 canon:A4 回 dock、viewport 改真 EmbeddedViewer」——與
  a4-console-convergence tasks 3.3/3.4 直接對撞(#427 落地的正是該 owner
  自己的 task);且 golden 由 authority.authoring_origin 擷取即 canon
  投影、畫面內含 fixture 數字,故無法閉合 D-1;改 viewport 是偏離 canon
  而非對齊,並會讓 a1/a2/a3 三個現行 PASS screen 一併轉紅。
- 「S3 已交付故 3D 高亮不是 vaporware」——偷換概念。producer 端在前端
  不存在,A4 頁 UI 文案逐字自陳停用且無 3D 按鈕。
- 「擴充 capture 腳本加第三旗標」——只動三道牆的第一道。
- 「spectator 預算固定為 1、保留 4 個給真人」——active canon 明令
  KIT_SPECTATOR_COUNT 預設 MUST 為 0;且 viewerLeaseStore 無名額記帳。
  原引用 .claude/skills/** 為依據違反 openspec/config.yaml:27-28。
- 「A5–A10 dashboard 殼可先做」——以 R3 當建置許可,違反 R2 三態。
- 「A1–A4 共用單一 primary lease」——降級為現況觀察。

新增缺口 D-6~D-13(皆不在本 change 範圍):A4 handoff producer 缺口、
KIT_SPECTATOR_COUNT canon-vs-deploy 衝突、canon 已具名的假複製 R3 違規
未修、spectator 名額無記帳、零 admission control、dedicated_instance
容量謊報、靜態縮圖能力零實作、golden 含 fixture 導致誠實化結構性不可能。

新增 U-1~U-9 待使用者裁決清單。根節點 U-1:canon 的 fixture 數字與 R3
誠實鐵律哪一邊讓步——價值取捨,工程判斷關不掉。

Verification: npx openspec validate isolated-branch-stack-browser-e2e
--strict PASS;git diff --check clean;tasks 仍為 28 項與 ledger 一致。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017jRpqq8bEbss9pPyzngcXS

* docs(openspec): 記錄 A1–A10 viewer 架構的使用者裁決、現況落差與 C-1~C-6 約束

依使用者 2026-07-29 指令,將 grill-me 第二題(A1–A10 viewer 架構)的結論
寫入本 change。前一 commit 只記錄了被推翻的裁決,遺漏了使用者自己的裁決與
架構層可用結論——本 commit 補上。記錄性質,不新增 requirement、不改變本
change 的 capability 範圍、不對 A1–A10 授權任何實作。

寫入本 change 的理由:本 harness 明文不在隔離 stack 內啟動 Kit/WebRTC/GPU,
因此所有 A1–A10 viewer 面都落在覆蓋邊界外。把邊界寫清楚,才不會有人拿隔離
stack 的 functional evidence 去推論 3D/串流已驗證。本節末新增一條與既有
evidence 標示同等強度的禁止句。

內容:
- 使用者陳述的目標架構(逐字保存)
- 使用者已裁決:「只有外殼相似,runtime 分級」——A5–A10 沿用同一套 viewport
  視覺語言但預設不起自己的 Kit session,有 session 時 spectator 唯讀掛入,
  無 session 時靜態縮圖並誠實停用。依 docs-plans-README §3.1 為最高權威。
- 目標 vs 現況落差表(唯讀查證 main 13033cb):A1–A4 dock 內無任何 WebRTC
  (viewport 是 data-prov="fixture" 的 PNG);唯一 EmbeddedViewer 硬編碼
  streamRole="primary" 且只在 legacy route;「邀請 Spectator」是 toast 假複製;
  A5–A10 現為靜態概念圖;全域單一 Kit 進程單一 stage;repo 未建置瀏覽器端
  非 WebRTC 的 3D viewer 能力。
- C-1~C-6 約束(經三層對抗驗證後仍成立,任何未來實作 SHALL 先滿足):
  spectator 唯讀鏡像無法當獨立 3D 視圖、跨 session 必重連且可能顯示假畫面、
  route 切換會 unmount viewer 且 repo 無 portal/hoist 機制、兩面各自 claim
  primary 會 409、A5–A10 資料須依 R2 三態、無 admission control 且容量承諾
  受 gpu-session-baseline 硬 gate 限制。

Verification: npx openspec validate isolated-branch-stack-browser-e2e
--strict PASS;git diff --check clean。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017jRpqq8bEbss9pPyzngcXS

* fix(governance)+docs(openspec): 修 agent-governance 紅燈並套用收斂輪三驗證者的更正

收斂輪對最終產出再跑一次三層驗證(W1 事實正確性/W2 治理形式/W3 完整性
批評),三份報告合計指出一個 required check 紅燈、兩處事實錯誤、四項殘留
越權與六個引用錯誤。本 commit 全部處理。

修 required check 紅燈(本 change 自己造成,原本無人認領):
- lifecycle-ledger 新增第 5 筆 active 撞上 test-ai-coding-metrics.mjs 對
  active-change-wip 的硬編碼期望值(4/3),使 agent-governance FAILURE。
- 改為由同一份 ledger 推導 activeChangeCount。兩處斷言驗的是「零觀測→null」
  與 held/completed 處理,WIP 數字對其為附帶值;硬編碼會讓每次新增或封存
  change 都誤觸紅燈。WIP 上限(≤6)的真正 gate 在
  verify-openspec-lifecycle.ps1,未受影響。
- tasks 6.2 擴為三步順序契約;proposal Impact 與 design.md §5 補記。
- 驗證:node --test test-ai-coding-metrics.mjs 13 pass / 0 fail;
  test-openspec-ledger-reconciliation.ps1 all assertions passed。

修事實錯誤:
- 「branch-protected gate」措辭全數移除(U-2/U-4/U-5)。design-semantic-visual
  不在 main 的 11 個 required contexts 內,該措辭會灌高緊急度。
- design.md §5 與 tasks 6.6 原稱本 PR 帶著 design gate 紅燈;實為 skipped
  (本 PR 只動 docs/plans 與 openspec,未觸發 frontend_visual_required)。
  6.6 改為據實描述 main failure vs 本 PR skipped 的差異。

撤回殘留越權:
- D-3 對 migrate-console-to-hifi-design 的 owner 指派(該 change tasks 為
  列舉式封閉清單,對 A4SemanticSearchPage 命中數 0)。
- D-6「非缺陷」裁決 → U-11(正本記 A4 含 3D 高亮,與 a4-console-convergence
  tasks 3.4/4.4 的 table-only 停用直接衝突,只能由使用者裁決)。
- D-10 對 gpu-session-baseline-and-idle-reclaim 的指派 → U-12(該 change
  「明確不做」逐字列出 primary 佇列)。
- 「不採用 Kit extension 作為 A5–A10 的 3D 路徑」→ U-10(對未建置之物做
  技術選型屬產品決定;且原依據是成本陳述而非否決依據)。
- NOW.md 的無條件 owner 指派句一併改為待裁決。
- D-8 反向調整:canon 已是 MUST、同 repo 有參考實作、修法 pixel-neutral,
  移出「待裁決」;並補上初版漏掉的兩處違規(PipelinePage.tsx:128/:123)。

修引用錯誤(W1 逐條核對):
- capture-design-system-reference.mjs 行號 40-45/43-46 → 43-47,並補記
  DESIGN_SYSTEM_REFERENCE_ROOT env 優先(此為 D-13 論證的唯一漏洞)。
- D-8 canon 引文補回被吞掉的「列入改寫說明」。
- D-12 的「全 repo 無 Pillow/PIL/sharp」限縮為產品目錄範圍(agent skill
  references 內確有 14 處)。
- D-7 由「canon 衝突」降級為「canon 記述與部署既成預設待對齊」:引文補回
  「(開啟=部署決策入部署說明)」,並揭露其父需求 R-B6 自陳實作 deferred、
  Scenario 規範對象是正本文字而非 deploy 層。
- D-10「409 不可達」限縮為「預設政策+預設 kit_profile 下不會因併發觸發」。
- 「R2 三態無一允許」過度絕對 → 改用逐元件判定(in-repo 可建面不得 mock
  過渡;外接依賴面 mock 合法且須掛 ProvTag,依 R-B5)。
- 另修 D-4 斷言性質、D-11 測試涵蓋、agent skill 鏡像數等四處次要措辭。

補使用者原始問題的直接回答:
- 新增「rebaseline 關不掉這個紅燈」節:capture 腳本無 per-screen scope
  (跑它必然重寫全部 26 張 golden 與三個 manifest 欄位)、baseline 自 canon
  擷取、canon 未變則重截等價 → 沒有「只補 A4 兩張圖」的合法捷徑。並標註
  a4-semantic-search-model-qa tasks.md:82 的「只重新 capture
  workspace.a4.default」以現行腳本不可執行,屬既有缺陷。

tasks 6.6 拆為 6.6/6.7(一個 outcome 一個 task);ledger total 28 → 29。

Verification: openspec validate --strict PASS;test-ai-coding-metrics 13/0;
ledger reconciliation PASS;git diff --check clean;tasks 29 = ledger 29。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017jRpqq8bEbss9pPyzngcXS

* docs(openspec)+fix(governance): 重跑輪收斂——#429 後事實更新、Q1–Q8 委任裁決落地、修 merge-evidence 紅燈

baseline 前進(13033cb → bfcc433,含 #430/#429/#422)後依三個重跑輪驗證者
(X1 引用存活/X2 spec 保全/X3 未竟提問)與答案輪雙驗證者(Y1 事實/Y2
治理形式)的交叉結果做 L3 仲裁。

#429 事件(test(design): reapprove canonical A4 baseline)帶來的事實更新:
- D-1 改列歷史(CI 三連證 failure→success→success);「rebaseline 關不掉
  這個紅燈」節改寫為 v2,誠實記錄 v1 結論被 #429 實證推翻,含 v1 論證 #1
  在 13033cb 當下即可被 DESIGN_SYSTEM_SCREEN_IDS 證偽的查證疏漏。
- D-13 拆分:對 A4 失效(golden 改溯產品面),對其餘 12 screens 仍成立;
  manifest 混合權威與 A4 entry 內部不一致記入新增之 D-15。
- D-3 風險反轉:未套 token 的產品面已被固化進 golden,日後套 token 會反紅。
- D-4 緊急度歸零(#429 的第四條路不觸發三道牆;斷言本身仍成立)。
- 新增 D-14(harness/fakeReviewSocket 證據面,含雙閘門與 design gate 已走
  harness route 的精確描述)、D-15(#429 provenance 切換:使用者授權、非
  R-A2 雙旗標路徑、四項待收編)、D-16(spectator 裸連結安全模型,提權前提
  精確化:primary 空缺或 TTL 45s 過期時)、D-17(ledger 92/93 vs 66/71 漂移)。
- X1 行號更新表全數套用(viewerLeaseStore 348-360、app.ts 1275-1282、
  Window.tsx 1882-1886 等 18 處);六處路徑補全;D-12 自我指涉修正。

Q1–Q8 委任裁決落地(新增「使用者委任 AI 裁決」節):
- 節首 provenance 三 qualifier(非使用者原話/可單方推翻/不構成 canon 或
  requirement);A1/A3/A6/A7/A8 照案通過,A2/A4/A5 依 Y1 修正——
  A5 為最重修正:viewer-viewport:24「spectator SHALL 不內嵌於 console」無
  scope 限定,使用者裁決的 A5–A10 內嵌 spectator 在 MODIFIED delta 收窄
  console 措辭前屬 spec-nonconforming;MODIFIED delta 是必要前提。
- U 表原地標記不改寫不重編號:U-8/U-9 關閉(分標 AI-裁決/事實更正)、
  U-6+U-12 合併(參 D-9/D-11;仍待使用者裁決)、U-2 記 #429 實質處置、
  U-7/U-10 部分回答。A1–A10 節補 F-1 更正(兩份 approved spec 對照)與
  C-3 重定性(spec 要求不 unmount vs 現況 key={page} 落差)。

spec 增補(純加強,6 條 Requirement 原文未動,核心裁決保全):
- R5 新增 harness 揭露 Scenario(揭露+不得跨界引用,不開 fake 白名單);
  tasks 新增 3.6 對應;proposal What Changes 同步一句;ledger total 29→30。

修 merge-evidence 紅燈(fix ci):
- required merge evidence 失敗根因=D-17 ledger 漂移:merge origin/main 後
  分支含 #422 更新的 cross-service-structured-log-baseline tasks.md(92/93)
  但 ledger 仍記 66/71,reconciliation fail。同步 ledger 至 openspec list
  機器真值(92/93、subject bfcc433)。

Verification: openspec validate change --strict PASS;--all --strict 70/70;
test-ai-coding-metrics 13/0;ledger reconciliation PASS;git diff --check
clean;tasks 30 = ledger 30。

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
monkey1sai added a commit that referenced this pull request Aug 12, 2026
PR #507 上 9 條 P2 review threads 逐條以現行原始碼獨立查證,全部成立,
逐條改判並重算總覽表使其與 66 個 Scenario 標題機械一致。

Part 1 `edge-console-operator-frontend`(4 條 HOLDS → STALE):
- R1 兩段式導覽:EdgeConsole.tsx:86,100 usePageHash() 無 hash 回 "home",
  324-326/203 先命中 renderUnified 的 UnifiedShell,LegacyEdgeConsole 不掛載,
  NAV_GROUPS(370-385) 只在 legacy 深連結渲染。
- R5 缺 mediaPort:App.tsx:74 mediaport: number、100/129 初始 0、360/374 直接餵
  AppStreamProps;spec 只描述 undefined 一種哨兵(AppStream.tsx:311-315 自承兩種)。
- R7 預設與 viewer 一致:coordinatorBase.ts:6-9 於 /ui 非 dev port 回 origin,
  config/env.ts:71-73 恆為 127.0.0.1:8004;coordinator-web-plane.Dockerfile:14
  的 build:ui 未帶任何 VITE_COORDINATOR_* build arg,same-origin 是唯一部署分支。
- R13 GPU/首幀未取得:#runtime 現由 EdgeConsole.tsx:205 掛 fixture-only OpsPage,
  68-70/93 畫出 82%/24%/14.6GB/first-frame 1840ms 而非「未取得」。

Part 2 `unified-governance-console`(3 條 → STALE、2 條 → UNVERIFIABLE):
- R12 mock viewport:MockViewport.tsx:196 未傳選取 callback 給 StructureStats,
  202-210 無 highlight echo/camera 欄位;原引用的 unified dock 測試零命中 MockViewport。
- R17 product console:UnifiedShell.tsx:199-209 無 Chat USD Agent side panel。
- R18 Operator opens A1:#a1 由 UNIFIED_WS_KEYS 掛 fixture WorkspacePage/A1Dock,
  unified/ 全目錄無 Excel;真正的 Excel 在 #issues 的 pages.tsx:1071-1072。
- R9 真實 IFC 切片:HOLDS-WITH-NOTE → UNVERIFIABLE(原 note 內容即 UNVERIFIABLE 定義)。
- R14 模型↔問題分頁:原證據僅一個 prop + 一個 CSS class;spec 要求 browser E2E,
  而 package.json:25 verify 不含 test:e2e,issues-tab.spec.ts:17 亦為條件 skip。

總覽重算(機械計數,與 66 個標題逐一相符):
- edge-console-operator-frontend 30 = 25 HOLDS / 1 HWN / 4 STALE / 0 UNVERIFIABLE
- unified-governance-console 36 = 26 HOLDS / 2 HWN / 3 STALE / 5 UNVERIFIABLE
- 合計 66 = 51 / 3 / 7 / 5(原表 57/5/0/4 與原結論 58/5/0/3 互不相符,一併修正)

新增「STALE 項清單」一節;UNVERIFIABLE 清單補齊為 5 條並移除原本自相矛盾的
「第三項見總覽表」註記。ledger current_slice 與 tasks.md 7.4 同步新數字。
7 項 STALE 皆為早於本次遷移的 spec 落後(#357/#358/#429 僅動 CSS token/主題移除/
golden baseline),非本次遷移造成。

驗證:node --test scripts/tests/test-openspec-machine-truth.mjs 24/0;
scripts/tests/test-ai-coding-metrics.mjs 13/0。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
monkey1sai added a commit that referenced this pull request Aug 12, 2026
…it (7.4) (#507)

* chore(openspec): tick hifi-design 7.3, audit 7.4 consumer spec scenarios

7.3: npm install (worktree lacked node_modules) then npm run verify —
typecheck + build + vitest (78 files/1069 tests) + test:struct-log
(23/23) all green, exit 0. package-lock.json's npm-11-induced "peer":
true annotations reverted (no real dependency change, local npm 11.6.2
vs manifest-pinned 10.9.4 lockfile normalization noise).

7.4: walked every Scenario block in edge-console-operator-frontend (30)
and unified-governance-console (36) against current source, recorded
verdicts with file:line evidence in
artifacts/2026-08-12-hifi-consumer-spec-scenario-audit.md. 58 HOLDS, 5
HOLDS-WITH-NOTE, 0 STALE, 3 UNVERIFIABLE (browser E2E scenarios that
need a live deploy stack/GPU to execute end-to-end; none touched by
this migration's actual diff). Left unticked per design.md's Risk
clause since not every scenario is HOLDS.

7.1: ran the golden rebaseline command; it was NOT a no-op. The
generic capture script has no special-case handling for the single
screen (workspace.a4.default) whose baseline_provenance marks it
canonical_product_surface (must be captured via the product e2e spec,
not the origin mockup site per PR #429). Running --rebaseline silently
reverted that baseline back to its pre-#429 mockup-origin state,
undoing an explicitly human-approved fix. Reverted the diff via git
checkout before this commit (never committed the regressed golden);
verify-design-system-reference.ps1 -VerifyOrigin still passes
afterwards. Left unticked and flagged the capture script gap for a
follow-up fix, out of scope here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(openspec): reconcile hifi-design ledger row for 7.3 tick + 7.4 audit

task_ledger 31->32, subject_commit rebound to the tasks.md tick commit
(af60c29), current_slice refreshed with the 7.1 STOP finding, 7.3 pass
evidence, and 7.4 audit summary (66 scenarios, 58 HOLDS/5
HOLDS-WITH-NOTE/0 STALE/3 UNVERIFIABLE). Local gates:
test-openspec-machine-truth 24/0, test-ai-coding-metrics 13/0,
test-agent-governance-check 45/0, openspec validate --strict PASS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(openspec): reclassify R10 binding scenario to UNVERIFIABLE per review

Review P2 on #507 proved the R10 spectator/primary binding scenario was
marked HOLDS on two-layer evidence (frontend disabledReason + coordinator
403 gate) while the Requirement demands three-layer depth: the repo's own
evidence records the binding revision as client-generated (browser-
evidence-summary.json) and the host-native Kit DataChannel mutator path
as unobserved (frontend-redesign-implementation-notes.md section 11).
Verdict corrected to UNVERIFIABLE with citations; tallies 58/5/0/3 ->
57/5/0/4; ledger current_slice synced. machine-truth 24/0, metrics green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(openspec): reclassify nine audit verdicts per PR #507 review

PR #507 上 9 條 P2 review threads 逐條以現行原始碼獨立查證,全部成立,
逐條改判並重算總覽表使其與 66 個 Scenario 標題機械一致。

Part 1 `edge-console-operator-frontend`(4 條 HOLDS → STALE):
- R1 兩段式導覽:EdgeConsole.tsx:86,100 usePageHash() 無 hash 回 "home",
  324-326/203 先命中 renderUnified 的 UnifiedShell,LegacyEdgeConsole 不掛載,
  NAV_GROUPS(370-385) 只在 legacy 深連結渲染。
- R5 缺 mediaPort:App.tsx:74 mediaport: number、100/129 初始 0、360/374 直接餵
  AppStreamProps;spec 只描述 undefined 一種哨兵(AppStream.tsx:311-315 自承兩種)。
- R7 預設與 viewer 一致:coordinatorBase.ts:6-9 於 /ui 非 dev port 回 origin,
  config/env.ts:71-73 恆為 127.0.0.1:8004;coordinator-web-plane.Dockerfile:14
  的 build:ui 未帶任何 VITE_COORDINATOR_* build arg,same-origin 是唯一部署分支。
- R13 GPU/首幀未取得:#runtime 現由 EdgeConsole.tsx:205 掛 fixture-only OpsPage,
  68-70/93 畫出 82%/24%/14.6GB/first-frame 1840ms 而非「未取得」。

Part 2 `unified-governance-console`(3 條 → STALE、2 條 → UNVERIFIABLE):
- R12 mock viewport:MockViewport.tsx:196 未傳選取 callback 給 StructureStats,
  202-210 無 highlight echo/camera 欄位;原引用的 unified dock 測試零命中 MockViewport。
- R17 product console:UnifiedShell.tsx:199-209 無 Chat USD Agent side panel。
- R18 Operator opens A1:#a1 由 UNIFIED_WS_KEYS 掛 fixture WorkspacePage/A1Dock,
  unified/ 全目錄無 Excel;真正的 Excel 在 #issues 的 pages.tsx:1071-1072。
- R9 真實 IFC 切片:HOLDS-WITH-NOTE → UNVERIFIABLE(原 note 內容即 UNVERIFIABLE 定義)。
- R14 模型↔問題分頁:原證據僅一個 prop + 一個 CSS class;spec 要求 browser E2E,
  而 package.json:25 verify 不含 test:e2e,issues-tab.spec.ts:17 亦為條件 skip。

總覽重算(機械計數,與 66 個標題逐一相符):
- edge-console-operator-frontend 30 = 25 HOLDS / 1 HWN / 4 STALE / 0 UNVERIFIABLE
- unified-governance-console 36 = 26 HOLDS / 2 HWN / 3 STALE / 5 UNVERIFIABLE
- 合計 66 = 51 / 3 / 7 / 5(原表 57/5/0/4 與原結論 58/5/0/3 互不相符,一併修正)

新增「STALE 項清單」一節;UNVERIFIABLE 清單補齊為 5 條並移除原本自相矛盾的
「第三項見總覽表」註記。ledger current_slice 與 tasks.md 7.4 同步新數字。
7 項 STALE 皆為早於本次遷移的 spec 落後(#357/#358/#429 僅動 CSS token/主題移除/
golden baseline),非本次遷移造成。

驗證:node --test scripts/tests/test-openspec-machine-truth.mjs 24/0;
scripts/tests/test-ai-coding-metrics.mjs 13/0。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(openspec): reclassify three more audit verdicts, refute the overlay claim

PR #507 第二輪 4 條 P2 review threads 逐條以現行原始碼獨立查證:3 條成立改判,
1 條查證後不成立、附逐字反駁並維持 HOLDS。總覽表重算至與 66 個標題機械一致。

改判(3 條):
- Part 1 R3「A2/A3 為 as-built 操作頁」HOLDS → STALE:EdgeConsole.tsx:175
  UNIFIED_WS_KEYS=["a1","a2","a3"] 把 #a2/#a3 一併攔去 fixture WorkspacePage;
  docks.tsx A2Dock 標 data-prov="fixture",畫捏造 diff 數字(added 12/removed 4)
  與假成功 apply-overlay ✓(真後端誠實回 501)。真正的 VersionDiffPage/
  FederationPage 只在 #version-diff/#federation(EdgeConsole.tsx:236-237)。
- Part 2 R3「在 3D 標紅」HOLDS → STALE:production Kit
  stage_management.py:396-458 _on_highlight_prims docstring 自承
  "First MVP uses USD selection as the visual fallback",426-442 只讀
  prim_path、444-450 只呼叫 set_selected_prim_paths、410/454 寫死
  applied_mode:"selection",grep -n "color" 全檔零命中。client 端
  highlightBridge.ts:59,90 有送 color,其 70-71 註解亦自承 Kit 不讀。
  三條 THEN/AND 仍成立,不成立的是標題的「標紅」。
- Part 2 R11「全幅 6 分區版面」HOLDS → UNVERIFIABLE:原證據為元件存在+單元
  測試數,證不到整合版面/可操作/spectator;Scenario 逐字要求 gov-viewer-layout
  browser E2E 截圖,該 spec 存在(4 個 ?harness=1 測試)但 verify 不含 test:e2e。

反駁(1 條,維持 HOLDS):
- Part 2 R1「A1–A10 治理以 overlay 疊在 primary viewer」:review 主張
  MVP_ENGINES 只有 M4/A1/A4、ROADMAP_ENGINES 只有 A3 與兩個 code "—",
  故 A2 與 A5–A10 缺席。code 標籤讀法無誤,但該推論混用兩套刻意不同的編號:
  spec line 76 明文本 capability spec 採「新治理工作流編號」(A2 轉檔語意/
  A5 碰撞/A6 圖模/A8 Issue·BCF/A10 報表稽核…),與 roadmap-data.jsx RM_APPS
  刻意不同;而 GovernanceOverlay.tsx:163 的 Panel sub 自述 code 取自
  「權威:data.ts A1A10」即舊那套。以 spec 自身詞彙回推,被指缺席者多在列:
  A2=mapping(79,asbuilt)、A5=clash(94,p1 誠實 disabled)、A6=dwg(95,p4)、
  A8=issues(82,asbuilt+272 可操作面板)、A10=audit(96,p4)。且 MVP_ENGINES/
  ROADMAP_ENGINES 是「已接能力」(163)/「願景待建」(312) 兩塊清單面板,非治理
  操作面;本 Scenario 兩條 THEN/AND 只斷言「疊在同一 primary viewer、非獨立殼」,
  無模組完整性要求(該義務在 R2 Scenario)。
  原證據(檔頭註解+測試數)確實過弱,已換成結構證據:Window.tsx:65 import、
  5775 於持有 WebRTC <video> 的 Window render tree 內掛載 GovernanceOverlay,
  並接上 onHighlight/_overlayHighlight、onClearHighlight/_sendStreamMessage、
  onRunRuleCheck、onCreateIssues、onApplyBinding 等真實 handler。

總覽重算(機械計數,與 66 個標題逐一相符):
- edge-console-operator-frontend 30 = 24 HOLDS / 1 HWN / 5 STALE / 0 UNVERIFIABLE
- unified-governance-console 36 = 24 HOLDS / 2 HWN / 4 STALE / 6 UNVERIFIABLE
- 合計 66 = 48 / 3 / 9 / 6(前一輪 51/3/7/5)

STALE 清單擴為 9 條、UNVERIFIABLE 清單擴為 6 條,兩處「這 N 項的共同特徵」同步;
STALE 共同特徵新增誠實區分:9 項中 8 項為 spec 措辭落後於程式碼,僅 R3 標紅為
真正能力缺口(Kit 端從未實作顏色),不能只改文字。ledger current_slice(486 字元)
與 tasks.md 7.4 同步。

驗證:node --test scripts/tests/test-openspec-machine-truth.mjs 24/0;
scripts/tests/test-ai-coding-metrics.mjs 13/0。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
monkey1sai added a commit that referenced this pull request Aug 14, 2026
Distinguish #360 proposal from #361 adoption. Uncheck hifi 8.2 after the align crosswalk edit. Rewrite hifi 7.1 / design / spec and A4 coordination so generic 13-screen rebaseline cannot overwrite #429 workspace.a4.default.
monkey1sai added a commit that referenced this pull request Aug 26, 2026
…untime truth via shared poller(unified-console-runtime-truth slice 1) (#700)

* docs(spec-to-done): unified-console-runtime-truth slice 1 範圍文件(§1 真值綁定+§5 測試對齊)

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

* plan: unified-console-runtime-truth slice 1 實作計畫(§1 真值綁定+§5 測試對齊,十個 task)

- 共用 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>

* plan: fix Task 3 拆為 3a/3b/3c,sweep 改逐字 patch+逐檔檢查點

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>

* plan: 合併為 5 個 task(額度 32 次內);CoordinatorHttpError 區塊改與 slice 2 逐字一致;coordinator 裁決 #1–#8

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

* task#0: coordinatorClient 加性擴充(CoordinatorHttpError、kitHealth/governanceIssues/governanceRuleRuns)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#0: 共用 poller store(單一 in-flight/退避 ≤60s/hidden 暫停)與 ConsoleDataProvider

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#0: fix 補報 1A Step 1 的 HIGH 停點未履行並列 Blocker #9 待追認

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>

* task#0: fix 撤回 1A Step 1 勾選並補齊 HIGH 停點的回報與可 commit 證據

必修 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>

* plan: coordinator 追認 jsonGet HIGH 續行(Blocker #9 關閉);後續 task 的 HIGH 改為記錄後續行、CRITICAL 才停

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

* task#1: 既有 unified-mount 測試補共用 poller 十端點 spy 與 store reset(不改斷言)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#1: 真值投影純函式 runtimeTruth(cell/pickers/healthOf/lastUpdatedText)+狀態文案 key+mock builders

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#1: UnifiedShell 頂列 chips/GPU chip/側欄 badge 綁真值(移除字面 82%),注入共用 poller;5.1 同步翻轉

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#2: #home 四 KPI+六 svc-dot 綁 coordinator 真值(asbuilt/data-state),移除 fixture 固定值

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#2: fix 補勾 3A(Step 1–8)plan checkbox(前次 commit 漏帶)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#2: #pipeline 五段+治理/報表列綁真值;outbox 只用 redacted 摘要;RVT 退役標示;觸發轉檔 disabled 附原因

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#2: fix 拆純函式模組修 eslint-baseline 迴歸;Home outbox KPI 導向改回 design §4 的 #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

* task#3: #runtime 真值 OpsPage(Kit instance/GPU 未取得/服務健康/事件誠實停用),固定 GPU 數值歸零

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#3: 假資料 export 移至 test-only(D1=P),provider seeds 縮減,符號層守門測試;5.2 解凍

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#4: design-system semantic cases 改為誠實狀態斷言(home/pipeline/ops 三屏+workspace badge),case id 不變

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#4: Playwright E2E——/ui 預設入口真值 vertical slice(真後端 :8004;KPI↔API 對照、handoff anchor、offline→retry、loading、單一 in-flight)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* task#4: tasks.md 註記本機綠待 181;plan 勾選收官

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(unified): P3 final review——initialIssues 留在 production 供 Issues/BCF 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

* test(design): rebaseline home/pipeline/runtime.ops 為產品面誠實 offline golden(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

* docs(evidence): slice 1 P4 browser evidence(Playwright 7 passed on isolated 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

* docs(evidence): slice 1 P4 證據更新至 6cd0074(s1-r2;Playwright 7 passed on 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

* fix(unified): P5 round-1 修補——#home 啟動器容器 data-prov fixture→demo(canonical 七值)、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

* docs(tasks): 5.5/5.6 記錄 owner 核准的三段 golden 路線(#697 關、#698 降級已合併、重新核准待做)

- 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

* docs(evidence): slice 1 P4 attempt 2 at 88608cb(s1-r2;#698 之後、fix_now 修補之後重取)

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

* docs(slice1): P5 round-2 措辭修正——HomePage 檔頭註解與 tasks 5.4 過期句/未 tracked 證據引用

- 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

* test(unified): use a non-listener placeholder for conversion_authority.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

* test(e2e): rebaseline hifi-token-authority unified-home.png to the runtime-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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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