emrg: test — fix Agent.md renderer count drift (445->448) + guard renderer count against reality - #1052
Conversation
…derer count against reality R2254: argszero#1049/argszero#1050 added renderer tests (daemonBridge/Shell/SettingsPanel/ WorkspaceView) without bumping Agent.md — the renderer count drifted 445 -> 448 silently. The doc-count guard only validates each "(N: ...)" line's internal sum (parts == headline), not reality, and the pytest CI job has no node_modules to run vitest. FIX: Agent.md renderer line corrected to 448 with per-file counts aligned to vitest's executed numbers (workspaceView 29->27, WorkspaceView 8->10, daemonBridge 14->15, Shell 24->25, SettingsPanel 19->20). GUARD: test_doc_counts.py::test_renderer_count_matches_docs — a static count of test-case definitions (^\s*(it|test)\( per file under renderer/src) equals vitest's executed total exactly (verified for all 44 files), so it runs in plain pytest and turns any future renderer-count drift red immediately. Python tests 1127 -> 1128 (new guard), Agent.md synced.
argszero
commented
Aug 27, 2026
Verified the PR thoroughly — the core work is correct, with one small maintainer push to fix a cosmetic issue: Verified (local, on head ab36f9b):
Maintainer push (bc2d687): the new docstring contained an invalid escape sequence ( CI re-triggered on the synchronize event. — cycle cyc20260828-003303 |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20260828-003303 (1/3). Head bc2d687 (maintainer push 66e4473-style: docstring escape fix), CI test + test-windows green (33094013986), MERGEABLE/CLEAN. Verified: static count == 448 == vitest total (no it.each false-positive); Agent.md parts sum to headline; positive + negative states both confirmed; full pytest 1127+1. Guard closes the real gap (renderer count drift 445->448 slipped through #1049/#1050 because the doc-count guard couldn't see reality).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20260828-004445 (2/3). Head bc2d687 unchanged since cyc20260828-003303 LGTM (1/3), CI test + test-windows green (33094013986), MERGEABLE/CLEAN. Static renderer count == 448 == vitest total; negative state verified (445 → guard fails); full pytest 1127+1.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20260828-005101 (3/3). Head bc2d687 unchanged since cyc20260828-004445 (2/3), CI test + test-windows green (33094013986), MERGEABLE/CLEAN. Three consecutive LGTMs from distinct cycles (003303 → 004445 → 005101), no ❌ in between. Merge gate satisfied.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Fix Agent.md's renderer test-count drift (445 → 448, silently introduced by #1049/#1050) and close the guard gap that let it slip through: the doc-count guard now verifies the renderer headline against reality.
Problem
daemonBridge,Shell,SettingsPanel,WorkspaceView) without bumping Agent.md. The documented renderer count silently went stale (445 documented, 448 actual).test_doc_counts.pyvalidates each"(N: ...)"line's internal sum (parts == headline) but cannot see reality — and the pytest CI job has nonode_modulesto run vitest, so nothing caught the drift.Changes
Doc fix —
Agent.mdrenderer line corrected to 448, per-file counts aligned to vitest's executed numbers:workspaceView29 → 27,WorkspaceView8 → 10 (drifted since emrg: gui renderer — wire workspace panels to real daemon data (projects/tasks/rants + project sessions) #1028)daemonBridge14 → 15,Shell24 → 25,SettingsPanel19 → 20 (emrg: gui — restore upgrade banner in React shell (fix rant 2026-08-27T21:54:51) #1049/emrg: gui — persist theme/language selection in settings (fix rant 2026-08-27T22:22:50) #1050 additions)Guard —
tests/test_doc_counts.py::test_renderer_count_matches_docs:^\s*(it|test)\(per file underemrg/gui/renderer/src) equals vitest's executed total exactly (verified for all 44 renderer test files), so it runs in plain pytest with no node_modulesNegative-state verified: with Agent.md's renderer count reverted to 445, the guard fails; with the corrected 448, it passes.
Verification
uv run pytest tests/— 1127 passed + 1 skipped (= 1128 collected, +1 from the new guard)tests/test_doc_counts.py— 5 passed