Skip to content

docs: stop hardcoding test counts, and credit the PR that actually landed - #31

Merged
oratis merged 1 commit into
mainfrom
claude/docs-count-treadmill
Aug 9, 2026
Merged

docs: stop hardcoding test counts, and credit the PR that actually landed#31
oratis merged 1 commit into
mainfrom
claude/docs-count-treadmill

Conversation

@oratis

@oratis oratis commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Two defects found while reviewing the #23#30 batch. Both are already on main, and both are the same class of rot that batch was written to remove.

1. Wrong PR credited

.gitattributes (from #29) and docs/memory.md §6 both say #27 fixed the usage-ledger.js NUL bytes. #27 was closed as a duplicate#30 landed the fix.

I confirmed the two branches were byte-for-byte identical before either merged (both produced the same 10789-byte file, 0 NULs), so this was pure parallel duplication, not two different fixes. Following the reference today lands you on a closed PR with an empty diff — for a file whose entire problem was being un-reviewable.

2. The count treadmill

#26 corrected five hardcoded test counts (234 / 377 / 656678). #28 merged minutes later and added a test. So the PR whose whole purpose was de-staling docs shipped a number that was already wrong:

moment real count docs said
#26 authored 656 656 ✅
#23 + #24 merge 672→678 656 ❌
my #26 review fix 678 678 ✅
#28 merge 679 678 ❌

Five copies of a figure that moves on every test-bearing merge cannot stay right. Corrections don't fix that — they just reset the clock.

What changed

  • Counts are now a magnitude pinned to a commit (~680 tests / 71 files as of c7c7d5b) with an explicit instruction to measure rather than cite
  • The two places that only ever needed "all green" (§7.3 deploy checklist, the serialized-run comment) no longer carry a number at all
  • memory.md §5.2 records the anti-pattern, so the next doc pass doesn't reinstate it

The prose that never carried a number — "Vitest files under client/src/{components,pages,utils}/" — stayed accurate through this entire batch. That's the argument.

The surviving 234 / 656 mentions are deliberate: they're the history being explained, not live facts.

Test plan

  • node --test --test-concurrency=1 server/__tests__/*.test.js679/679
  • grep confirms no stale hardcoded count and no bare #27 reference survives
  • Docs-only — no code path touched

Note on CI: a default npm test can show 2–5 red files with { code: 'SQLITE_BUSY' }. That's the shared-influencex.db concurrency flake documented in memory.md §5.2 — it reproduces on main with zero changes. Serialized is the triage step.

🤖 Generated with Claude Code

…nded

Two defects found while reviewing the #23#30 batch, both now on main.

**Wrong PR credited.** #29's .gitattributes header and memory.md §6 both
say #27 fixed the usage-ledger NUL bytes. #27 was closed as a duplicate —
#30 landed the identical fix (verified byte-for-byte identical trees).
Anyone following the reference lands on a closed PR with an empty diff.

**The count treadmill.** #26 corrected five hardcoded test counts from
234/377/656 to the then-accurate 678. #28 merged minutes later and made it
679, so a PR whose entire purpose was de-staling docs shipped a number that
was stale on arrival. Five copies of a figure that changes on every
test-bearing merge cannot stay right.

Counts are now stated as a magnitude pinned to a commit ("~680 as of
c7c7d5b") with an instruction to measure instead of cite, and the two
places that only needed "all green" no longer carry a number at all. The
prose that never had one ("Vitest files under client/src/{...}") aged fine
through this whole batch, which is the argument.

memory.md §5.2 records the pattern so the next doc pass doesn't reinstate
it. The remaining 234/656 mentions are deliberate — they are the history
being explained, not live facts.

Verified: 679/679 serialized on this branch; grep confirms no stale
hardcoded count or bare #27 reference survives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oratis
oratis merged commit 4774fb5 into main Aug 9, 2026
5 checks passed
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.

1 participant