Skip to content

[finding] check-governed-merges.mjs sizes its own self-test at "THIS file's 77 assertions" — unanchored and stale; the live count is 223+ #13963

Closed

Description

@claude

Spotted while fixing #13536 (PR #13962), which repaired the same defect class in scripts/pm/dispatch-gates.mjs. Reported rather than fixed: #13536 scopes that card to one docblock in a different file.

The claim

scripts/pm/check-governed-merges.mjs, in the docblock above its own invokedDirectly guard:

invokedDirectly for the same reason line 810 carries it: this module is imported for its exported predicates (proxyRearmPlan — see scripts/pm/ci-failure.mjs), and an unguarded trigger ran THIS file's 77 assertions inside the importer's own --self-test [...]

"THIS file's 77 assertions" reads as a present-tense claim about this file's current self-test size.

The measurement

The live count is dynamic: checked is incremented by the assert(...) helper and printed as ${checked} assertions. Counting assert( call sites:

commit static assert( call sites
a065e46550b4 (PR #9897, where the guard landed) 70
that commit's parent 70
9c4c431fd (2026-08-31) 223

70 static plus loop expansion is the 77 the prose names, so 77 was true at PR #9897 and is now roughly a third of the truth — the file has more than tripled since.

Why this is the #13536 class, not a typo

In dispatch-gates.mjs the neighbouring sentence anchors its copy of the figure to the PR (PR #9897 fixed in check-governed-merges.mjs at 77 assertions), so there 77 is a correctly-frozen historical fact. Here it is attached to "THIS file" with no anchor, so it is a live claim that has rotted — the same defect #13536 describes: a number that moves on most edits, written into a comment as a reading.

Suggested shape (not implemented)

Whatever #13962 settles on for the sibling file, applied here. That PR replaced the frozen reading with a floor plus a sentence saying why it is a floor, after measuring that the count had never once decreased across the file's history. ⛔ Note that #13536 explicitly rules out adding a gate that pins a docblock figure to a live count: it taxes every edit to a constantly-edited file and re-freezes the number by another route.

Whoever picks this up should re-derive the counts — they will have moved.

Unassigned; no PR. Filed by the os-dev seat for #13536.

Generated by Claude Code


Generated by Claude Code

Activity

  1. added
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 31, 2026
  2. claude commented on Aug 31, 2026

    @claude
    ContributorAuthor

    os-dev-report

    {
      "issue": 13963,
      "status": "done",
      "branch": "claude/issue-13963-selftest-count-unanchored",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/14002",
      "premise_still_valid": true,
      "summary": "The card's premise held: the stale sentence was untouched by #13945 and still read \"THIS file's 77 assertions\" (live count 255). Fixed with the shape triage settled and 010518bb landed in the sibling — the 77 is kept but anchored to PR #9897 as the historical fact it is, today's size is stated as a FLOOR (\"more than three times that\") pointing at --self-test's `checked` as the live reading, plus a sentence saying why it is a floor and asking the next reader not to refresh it back into a reading. Refreshing 77 to 255 was explicitly not done and no gate pins the figure to the live count (#13536 rules that out). Reading the sentence turned up a SECOND rotted reading in the same clause — \"for the same reason line 810 carries it\" was true at #9897 but line 810 is now an unrelated `try {`; the guard moved to line 2336 — repaired in place under the bounded exemption (same defect class, mechanical, file held by no other claim, same gate family) by naming the guard instead of a line number. Diff is comment-only, one hunk, 17 insertions / 7 deletions.",
      "tests": "PREMISE (triage-mandated, re-measured on THIS file, not inherited): the container's clone arrived SHALLOW (floor 2026-08-30, 208 commits) where this file shows only 2 commits and PR #9897's commit does not resolve at all — a sweep there would have 'confirmed' a 2-commit history, so it was unshallowed first (28s, strictly additive; --shallow-since avoided because it can silently SHORTEN, per scripts/pm/git-history.mjs). Across all 13 commits that have ever touched the file (added 2026-08-18, never renamed): static assert( call sites 22 -> 70 -> 70 -> 74 -> 74 -> 83 -> 112 -> 122 -> 153 -> 185 -> 198 -> 223 -> 248; UP 10, FLAT 2, DOWN 0 — never once decreased, so the floor is sound. Counting method validated against two independent readings on record: 70 static at a065e46550b4 and 223 at 9c4c431fd, both reproduced exactly. Historical 77 measured, not assumed: the file at a065e46550b4 was executed and printed '77 assertions'. GATES: union derived by `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack` with no hand-fed paths (16 commands harvested via --commands so no spelling is dropped), run on final head 226bbc000 — 15/16 green, exit codes captured by redirect-then-capture, never after a pipe. Green include `pnpm check:pm-governed-merges` -> '✓ check-governed-merges --self-test: 255 assertions', `pnpm check:entry-guard`, `pnpm check:pm-dispatch-gates`, `node scripts/pm/bare-root-worklist.mjs --self-test` (both convention-triggered gates for editing a gate script), `node scripts/check-skills-token-ratchet.mjs` re-run on final head -> '✓ 38 authored bundle file(s) within their ceilings'. The one non-zero, `node scripts/check-test-completeness.mjs`, exits 3 = 'PREREQUISITE NOT MET' and is recorded NOT MEASURED, not red: it grades a saved `turbo run test` log, none exists locally, CI passes the path on every invocation so the branch is unreachable there. NO BEHAVIOUR CHANGE proven by measuring both sides: 255 assertions at the merge base and 255 at head. Also recorded: the live count is not constant across environments (255 installed vs 253 without node_modules, where the generator-provenance row fails closed and discloses it on its `live:` line) — both green and truthful, and a further argument against writing any number as a reading.",
      "mcp_calls": "4 — issue_read get, issue_read get_comments, add_issue_comment (claim), create_pull_request. This report comment and the skip-changeset label went out over REST (probed 200 first), as did the open-PR contention scan over 21 PRs and every bulk read.",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    Generated by Claude Code


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:skillsDomain lane — seat card indexed by label:pm:seatpriority:p3toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions