Skip to content

finding(gate): check-eager-closure-budget.mjs guards the numbers and not the prose explaining them — one paragraph went three re-baselines stale, with its conclusion reversed against the gate's own live verdict #7046

Description

@zhuangjianguo

Filed unassigned by the domain:devx @ objectui PM seat as an out-of-scope observation returned by #6778's implementation (PR #7045, R39). Recording only — deliberately not fixed there, and the implementer was explicitly instructed not to ride it along.

Attribution, as prose because the footer block is stripped from issue bodies written through this path (see #6970): generated by Claude Code, PM session 86aefd79-6ef3-5a63-98f9-701da03c59ab.

The structural claim

scripts/check-eager-closure-budget.mjs is built on the principle that its reasoning is checked rather than argued. Every ceiling is weighed against the report the run just read, and evaluateHeadroomSensitivity exists precisely so that a claim about the gauge cannot go stale in silence.

The doc comments are the one part with no such guard. They are prose, nothing reads them, and nothing can tell when they stop describing the file they sit in.

The instance that proves it is not theoretical

#6778 measured, and PR #7045 repaired, a single paragraph on PER_CHUNK_BASELINE in which four separate statements had gone false:

  1. it named 4c1623c0c as what BASELINE carries — three re-baselines out of date;
  2. its "707,291 BELOW" arithmetic was computed against that retired reading;
  3. its conclusion was the reverse of the gate's live verdict — the paragraph told its reader the aggregate ceiling was ~787 KB wider than the regression it must catch (i.e. decorative) while the same script, in the same run, printed headroom 42.2 KB = 0.47x the 89.0 KB regression (i.e. in range and working);
  4. ~787 KB was a units slip — 4,086,000 − 3,298,620 = 787,380 bytes, i.e. ~769 KB.

Point 3 is the sharp one: an author sizing a re-baseline off that paragraph would conclude the aggregate half is decorative at exactly the moment the tool is telling them it is working.

⚠️ Two further facts about how long this survived:

The cheap backstop that already has its hooks in place

VERDICT_CEILING_CONSTANTS already deliberately excludes BASELINE and PER_CHUNK_BASELINE — the exclusion is a decision the file has already made and documented. A unit test could turn "the prose names a retired commit" into a red test, along one or both of:

  • (a) positive pin — each baseline's own commit string must appear in the doc block that cites it;
  • (b) negative pin — that block must carry no other 9-hex-digit token.

⛔ The design question this card exists to settle — (b) is not safe as stated

(b) would fire on legitimate text. PR #7045 deliberately kept two past-tense citations of 4c1623c0c elsewhere in the file — one in the "Why this number has moved" narrative, one in the MAX_EAGER_CLOSURE_GZIP_BYTES re-baseline list — because as history they are correct and load-bearing. The re-baseline list is, by construction, a list of superseded hashes.

⇒ A rule that cannot tell "this is what the constant carries" (must be current) from "this is what it used to carry" (must not change) will either red the honest history or be scoped so narrowly it stops catching anything. That distinction is the card, not the regex.

Whoever takes this decides:

⛔ Fences for whoever takes it

Related

Activity

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

Metadata

Metadata

Assignees

Labels

domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopriority:p2tooling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions