fix(desktop): realign renderer architecture ledger with source - #4255
Conversation
Three renderer files tracked by the architecture ledger drifted after the ledger was last regenerated in apache#4249, each landing without a paired ledger update: - app-shell-chat-actions.ts nonTriviaTokens 4363 -> 4376 (apache#4246) - app-shell-session-events.ts nonTriviaTokens 2931 -> 3042 (apache#4232) - import-tasks-settings-page.tsx hookCalls useEffect 4->5, useRef 3->5 (apache#3905) CI first went red on apache#4246 and accumulated the other two, wedging the 'Check renderer architecture' job on main and every branch cut from it. Regenerate the snapshot (--write) to match the current source; no runtime code changes. Generated-by: Claude Code
9172385 to
46773b0
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for fixing this quickly at the generated ledger boundary. I confirmed that main is failing specifically because these four recorded metrics no longer match the current renderer source, and that this PR contains only the deterministic ledger regeneration.
I found no P0–P3 issues on exact head 46773b0cf45006b9189b807e26c8bfb2e0e08ce7. The affected architecture check passes, the PR is mergeable, and no relevant renderer source changed after this PR’s base. This is the smallest complete repair for the currently wedged main CI. The separate question of how red required checks were allowed to merge is correctly tracked in #4257.
Approving.
AI-assisted review: Codex helped inspect the failing main runs, generator semantics, exact diff, post-base changes, and exact-head CI. I verified the root cause, scope, and final approval decision.
中文对照
谢谢快速在生成 ledger 的正确边界上修复问题。我确认了 main 的失败正是因为这四项记录值不再匹配当前 renderer 源码,而本 PR 只包含确定性的 ledger 重新生成。
精确 head 上没有发现 P0–P3。相关架构检查已经通过,PR 可以合并,并且 PR base 之后没有相关 renderer 源码变化。这是恢复当前 main CI 的最小完整修复。至于为什么失败的 required check 仍能合入,已经由 #4257 单独跟踪。
批准。
…e#4255) Regenerate the committed renderer architecture ledger so it matches the current source and restores the required main CI check. Process follow-up remains tracked in apache#4257.
Summary
The
Check renderer architectureCI job has been failing onmain— and on every branch cut from it — since #4246. The committedapps/desktop/renderer-architecture.jsonledger records stale metrics for three debt-tracked renderer files whose source drifted after the ledger was last regenerated in #4249, each merging without a paired ledger update. Regenerating the snapshot (--write) realigns the ledger with the current source. This is a data-only change with no runtime impact.Fixes #4257
Verification
npm run check:renderer-architecture→ passesnpm run check:renderer-architecture -- --base <HEAD~1>(exactly as CI invokes it) → passesapps/desktop/renderer-architecture.json(4 values); no source or runtime files touched.Not run: repo-wide lint / format / typecheck — the change is a generated JSON ledger with no code, so only the architecture check is affected.
Root cause
9ff267510bdb103d59app-shell-chat-actions.tsnonTriviaTokens 4363 → 4376838936c80app-shell-session-events.tsnonTriviaTokens 2931 → 30422db04c2b8import-tasks-settings-page.tsxhookCalls useEffect 4→5, useRef 3→5Each PR modified a debt-tracked renderer file without running
--write; each one's own push CI was already red, yet they still landed onmain. Worth a separate look at why a failing required check merged (tracked in #4257).AI use
Select exactly one:
Tool(s) and scope: Claude Code (Opus 4.8) — diagnosed the CI failure, ran the deterministic ledger regeneration (
--write), and drafted the commit message, this PR, and linked issue #4257. Commit carries aGenerated-by: Claude Codetrailer.Checklist
Check renderer architecturejob fails without the ledger update and passes with itDoes this PR entail a change in behavior?