Skip to content

docs: delete three hand-maintained integers from prose, keeping the claims they propped up - #1338

Merged
os-trump merged 4 commits into
mainfrom
claude/issue-1315-hand-maintained-integers
Aug 26, 2026
Merged

docs: delete three hand-maintained integers from prose, keeping the claims they propped up#1338
os-trump merged 4 commits into
mainfrom
claude/issue-1315-hand-maintained-integers

Conversation

@os-trump

Copy link
Copy Markdown
Collaborator

Fixes #1315
Fixes #1310
Fixes #1312

One defect, three instances: a counted fact stated in prose with no producer and nothing checking it. All three carry the identical ruling — delete the numeral, keep the load-bearing claim. No renumbering, and no counting guard on any of them (ADR-0049 axis 3).

Comment text only. Three non-overlapping files, one commit per member so each is independently reviewable. No assertion, import, describe block, table row or seed changed anywhere in this PR; both test files got smaller.

Verified on 2b50d55pnpm verify green end to end (validate, typecheck, lint, lint:i18n-gate, hygiene, hygiene:tokens, build, test). Gate verdict lines quoted per member below; suite total 142 test files passed, 2997 passed / 1 skipped.


Member 1 — #1315 · scripts/check-source-hygiene.mjs

scanHeaderPosition's docstring argued that requiring the licence header to be present (not merely well-placed) costs nothing, by quoting two hand-maintained integers: "all 282 .ts files under the scanned trees carry the header, 274 of them on line 1".

Re-measured on d456ea3. The card's own corrected figures were already stale, exactly as the dispatch predicted:

.ts under the SCANNED trees        : 326      (card said 324, as of 6a0e192f)
root .ts from ROOT_TEXT_FILES      : 3        objectstack.config.ts, playwright.config.ts, vitest.config.ts
allTs = the header check's surface : 329
  header at its required line      : 329
  header present but misplaced     : 0
  header absent                    : 0
control: the gate's own banner reports 339 files under SCANNED and 3 root .ts — reproduced exactly

Both integers were stale, and the eight-file gap the second one hedged against has closed to zero — so the sentence understated its own case, and left a caveat that no longer described anything.

Two things were wrong, not one. Beyond the numerals, the set had drifted: PR #1313 widened allTs to take in the root .ts files, so "under the scanned trees" had become a proper subset of what the check actually reads. The corrected sentence now names the set explicitly.

Why no count, and why this member is the strongest of the three: scanHeaderPosition is the producer. The universal is the check's own postcondition, not a hopeful generalisation — the integers were a snapshot of a state the check has since made unconditional. Saying so is both shorter and more accurate.

That claim was reverse-verified rather than asserted. Pushing the header down one line in vitest.config.ts — deliberately one of the three root files, so the widened surface is under test too:

mutation confirmed on disk: hash 7227b37 -> 77fcb11 (differs from the HEAD blob)

  gate exit on mutated tree = 1
  ✗ copyright header at the top of every .ts file — 1 violation(s)
      vitest.config.ts:2  header on line 2, must be line 1 — move it back above `'use strict';`
  ✗ source hygiene failed: copyright header at the top of every .ts file

restore: hash back to 7227b37, byte-identical to the HEAD blob, `git diff HEAD` empty
  gate exit on restored tree = 0
  ✓ copyright header at the top of every .ts file
  ✓ source hygiene clean

Acceptance: the two integers are gone; the sentence is not renumbered; no counting guard added; the set the universal ranges over is named; MAX_FILE_BYTES / ADVISORY_FRACTION / ADVISORY_BYTES and the "why 70%" comment are untouched.

Member 2 — #1310 · test/sharing-coverage.test.ts

The note above the crm_campaign row justified 「营销活动」 as "the word the other 14 zh-Hans doc pages already used".

Re-measured on d456ea3:

.zh-Hans.mdx pages under content/docs : 67   -- control: the search reached the corpus
pages containing 营销活动              : 21   -- the comment said 14
pages containing 市场活动 (pre-#830)   : 0
locale pack: src/translations/zh-CN.ts:211  crm_campaign: { label: '营销活动' }

Wrong by seven — and unlike its siblings, nothing in the file disagrees with it, so it reads as a measurement to every subsequent reader. Without the numeral the claim is stronger: a universal cannot be falsified by the next zh-Hans page someone writes, and both halves keep real producers (the locale pack is a file; "the docs already use it" is checkable by grep).

The second half of the comment is kept: the history of the partial rename in #830 has a producer, and the 市场活动: 0 reading above confirms it discharged cleanly.

Acceptance: numeral gone, not renumbered to 21; the #830 history retained; the table row, the assertions and the #810 comment below are untouched; file shrank 66,068 B to 66,058 B.

Member 3 — #1312 · test/flow-scheduled.test.ts

The suite header opened with "All six scheduled flows were previously untested at runtime".

Re-measured on d456ea3, counting entities rather than occurrences:

.ts under src/flows                    : 24   -- control: the search reached the tree
scheduled flow FILES                   : 9    -- the comment said six
textual occurrences of type: 'schedule': 10

The tenth occurrence is the string inside campaign-completion.flow.ts:11's JSDoc, above the real declaration at :19; that file exports exactly one flow (CampaignCompletionFlow). Nine files, nine flows, ten textual occurrences.

This member is the worst of the family: the file imports all nine and writes a describe block for each (10 src/flows imports, 14 describe( blocks), so the sentence undercounts the coverage of the suite it heads by three. A reader auditing scheduled-flow coverage reads "six", counts six, and stops while three tested flows sit below the fold. No assertion ever read the numeral, so the suite stayed green throughout.

No counting guard here either, and this member supplies the decisive argument: such a guard would have to solve the occurrence-versus-entity problem to be correct, and a grep-based one would pin ten — the wrong number.

Acceptance: numeral gone, not renumbered to "nine"; no guard; no assertion, import or describe block touched; file shrank 71,456 B to 71,448 B.


Changeset

.changeset/hand-maintained-integers-in-prose.md, empty frontmatter — the sanctioned "releases nothing" declaration this repo documents in .github/workflows/changeset-check.yml, matching the two sibling changesets already in the directory. Comment text only across all three members, so nothing ships to HotCRM users. No skip-changeset label applied — empty frontmatter is this repo's declared route.

Size advisory — reported, not acted on

flow-scheduled.test.ts sits 224 B below the 70% advisory band, so deleting words was the safe direction; it is now 232 B below (71,448 of the 71,680 band). The hygiene advisory that this run printed names only the two translation bundles, neither of them in this PR:

ℹ️  70% of the 100KB cap reached, and not passed — advisory, this does not fail the gate
    src/translations/es-ES.ts  75.3% of cap, 25KB of headroom left
    src/translations/ja-JP.ts  73.4% of cap, 27KB of headroom left

Reported rather than acted on — that band is #1311's subject, which is not addressed here.

Fences honoured

.github/workflows/code-quality.yml (#1238's file) and test/source-hygiene-*.test.ts (#1314's) are untouched. #1184 and #1311 remain open and are out of scope here. The read-coupling with #1238 was handled as directed: the surface description above is taken from the gate's own banner, not from either card's prose.


Generated by Claude Code

claude added 4 commits August 26, 2026 09:13
…n, not a count (#1315)

`scanHeaderPosition`'s docstring argued that requiring the header to be
PRESENT costs nothing by quoting two hand-maintained integers: "all 282
`.ts` files under the scanned trees carry the header, 274 of them on line
1". Both were stale, and the 8-file gap the second one hedged against has
since closed to zero — so the sentence understated its own case and left a
caveat a reader would carry away that no longer describes anything.

Renumbering would only restart the clock; the numerals are the defect, not
their values. The claim needs no count because this check is what makes it
true: `scanHeaderPosition` is the producer, so "every `.ts` file carries the
header on line 1" is its own postcondition and stays true as files land.

The set is now named explicitly. PR #1313 widened `allTs` to include the
root `.ts` files, so "under the scanned trees" had become a proper subset of
what the check actually reads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
…1310)

The comment above the `crm_campaign` row justified 「营销活动」 as "the word
the other 14 zh-Hans doc pages already used". Twenty-one pages use it. The
figure had no producer and nothing checking it, and — unlike its siblings in
this family — nothing in the file contradicts it, so it read as a
measurement to every subsequent reader.

Without the numeral the claim is both correct and stronger: a universal
cannot be falsified by the next zh-Hans page someone writes, and both halves
still have real producers — the locale pack is a file, and "the docs already
use it" is checkable by grep at any time.

The #830 history in the second half is kept: it has a producer, and it has
discharged cleanly — no page carries the old 「市场活动」 spelling.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
#1312)

The file header opened with "All six scheduled flows were previously
untested at runtime". There are nine, and this file imports all nine and
writes a `describe` block for each — so the sentence undercounts the
coverage of the suite it heads by three. A reader auditing scheduled-flow
coverage reads "six", counts six, and stops while three tested flows sit
below the fold. No assertion reads the numeral, so the suite stayed green
throughout.

Nine is today's figure, so renumbering only moves the expiry date. The
surviving sentence carries the whole argument without a count.

No counting guard, deliberately: a guard would have to solve the
occurrence-vs-entity problem to be correct. `grep -c "type: 'schedule'"`
over `src/flows` returns ten — `campaign-completion.flow.ts` carries the
string in its JSDoc above the real declaration and exports exactly one flow.
It is nine files, nine flows, ten textual occurrences, so a grep-based guard
would pin the wrong number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
…ing nothing

Empty frontmatter — comment text only across all three members, so this PR
ships nothing to HotCRM users.

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

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 26, 2026 9:21am

Request Review

@github-actions github-actions Bot added the ci/cd CI plumbing and the verification pipeline label Aug 26, 2026
@os-trump
os-trump marked this pull request as ready for review August 26, 2026 09:26
@os-trump
os-trump added this pull request to the merge queue Aug 26, 2026
Merged via the queue into main with commit e357376 Aug 26, 2026
10 checks passed
os-trump pushed a commit that referenced this pull request Aug 27, 2026
…s prose (#1346)

The comment above the "does not judge .d.ts" pin explains why the header check
reads `.ts` only, and propped that explanation on two hand-maintained integers:
"3 of 5 `.mjs` under scripts/, the `.sh`, the four `src/docs/*.md` pages".
Sixth instance of the defect the #1338 family collects — a counted fact in prose
with no producer and nothing checking it — handled the same way: the numerals go,
the claim they propped up stays, and no counting guard is added (ADR-0049 axis 3).

This instance came with its own demonstration that renumbering is not a repair.
The card was written against "2 of 7"; PR #1343 moved it to "2 of 8" two hours
later by adding `scripts/lib/source-hygiene-surface.mjs`; and measuring here with
the gate's own rule gives 3 of 8. The third reading differs from the second
because `scripts/publish-marketplace.mjs` opens

    // Copyright (c) 2026 ObjectStack contributors. …

while `COPYRIGHT_HEADER` is anchored `/^\/\/ Copyright \(c\) \d{4} ObjectStack\./`
— it wants the period directly after `ObjectStack`, so that file is headerless to
the check and headered to a reader. Three measurements, three answers.

Deleting the numerals alone would have left a false sentence, so the `.mjs` clause
gains a quantifier. "3 of 5" was not only arithmetic: it said *some, not all*, and
five of the eight `.mjs` under `scripts/` do carry the header. "Some of the `.mjs`
under scripts/" says that without a figure and holds under either reading of the
`publish-marketplace.mjs` spelling. The other two kinds stay unqualified because
they are complete — the one `.sh` and all four `src/docs/*.md` pages have no
header at all.

Prose only: no fixture, assertion or `describe` block is touched, and the gate
itself is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment