Skip to content

finding(gate): the baseline-prose pin generalises to scripts/vite-declared-lazy-views.ts, but only its VALUE half — that file cites five commits with nothing live to check them against #7289

Description

@yinlianghui

Filed unassigned as an out-of-scope observation returned by #7046's implementation (PR #7286). Recording only — deliberately not fixed there; the dispatch for #7046 fenced scripts/vite-declared-lazy-views.ts explicitly and said to file rather than ride it along. Generated by Claude Code, dev session session_01BGMDbrVa8JjZcCQ7DWYH1b.

What #7046 built

PR #7286 adds a structural helper to scripts/__tests__/check-eager-closure-budget.test.ts:

attachedDocs(source, exportName) returns the documentation attached to one exported constant — the JSDoc block ending immediately before the export const NAME declaration, plus every comment lexically inside the declaration, with the code stripped out. It walks the initializer skipping comments and string literals, so it uses no line numbers and no per-file knowledge. On top of it sit three positive pins: every commit a constant carries as data must appear in its own attached prose; every BASELINE's `HASH` claim must name the live BASELINE.commit; every key the constant carries must appear in its per-key provenance list.

None of that is specific to check-eager-closure-budget.mjs.

Why this file is the obvious second customer

#6785 (closed) recorded the same failure mode one file over, and #7046's body makes the argument directly: "Two files, same week, same defect — which is the argument that this wants a mechanism rather than another hand fix." #6785 was repaired by hand, so nothing stops the next paragraph there from going stale.

⚠️ Measured before filing — only half of the mechanism transfers

Read on main at 64d624ded:

  • scripts/vite-declared-lazy-views.ts carries five 9-hex commit citations in prose (around lines 100, 225, 280, 338 and one inside a runtime message string near line 545).
  • It exports no constant carrying a commit string as data. The exports in that area are APP_CONTENT_PATH, EAGER_WALK_CONTROL (both path strings) and DECLARED_LAZY_VIEWS_STILL_EAGER (a frozen array of paths).

⇒ The commit half of the pin cannot transfer: there is nothing live to check those five hashes against, which is the same wall #7046 hit on PER_CHUNK_BASELINE and the reason its blanket negative pin was not shipped. Copying the commit pin over would produce a vacuously green test, which is #7046's own defect one layer up.

⇒ The value half transfers directly and non-vacuously: every path in DECLARED_LAZY_VIEWS_STILL_EAGER, and the values of APP_CONTENT_PATH and EAGER_WALK_CONTROL, can be required to appear in their own attached prose. An entry added, removed or re-pathed without touching the paragraph explaining it then reds a unit test instead of drifting — and per #6785 that file's entries carry hand-written counts in prose alongside them.

Suggested shape, if this is picked up

  1. Lift attachedDocs out of scripts/__tests__/check-eager-closure-budget.test.ts into a shared test helper under scripts/__tests__/ rather than copying it — two copies of a structural parser is the drift this whole class is about.
  2. Apply the value pin to the three exports above in scripts/__tests__/vite-declared-lazy-views.test.ts.
  3. Ablation is not optional here either: the same fence 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 carried (mutate the real file, prove the mutation on disk, show red, restore under blob-hash proof).
  4. ⚠️ Whether the five prose commits should get any guard is a separate question with no cheap answer, and this card does not assume one. 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 measured that a negative "no other hash in this block" pin is red on honest history, and no marker made it legal without rewriting narrative comments.

⚠️ Not addressed here, and left open on purpose: #6631, and #6785 stays closed — this is about the mechanism, not about re-opening either.

Activity

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:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repoenhancementNew feature or requestfindingpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions