Skip to content

tooling: nothing stops a test's source from naming a PENDING changeset, and the only instrument that notices lives on the post-version tree #9583

Description

@os-try-charles

Follow-up C from the director seat's ruling on #9472 (comment 5682619925), which named it verbatim: 「C(a gate so pinning a pending changeset filename cannot return)is the follow-up: the dev files it from the same round.」 Filed, ⛔ not implemented — that ruling also said the repair (Q2-A) and this gate are two pieces of work, and the repair is #9582.

⛔ No priority and no route beyond domain:devx set here — the triage seat grades.

The hazard, stated as a rule a gate could hold

A test's source may not name a file that .changeset/ currently carries.

Why it is a real class and not a one-off

scripts/markdown-test-inputs.mjs resolves markdown path literals out of every test's source and offers only the ones that exist in the tree. So a test literal naming a pending changeset becomes a ledger entry — and pnpm changeset:version deletes exactly those files. On the post-version tree the scanner stops offering them, the entries turn into stale-not-read findings, and Validate the post-version tree goes red on the scheduled Changeset Release lane.

Measured instance, from #9472: two suites had done it, and the scheduled lane carried that assertion in every run of the window swept there.

suite literal pending on main
scripts/__tests__/check-changeset-overwrite.test.ts .changeset/olive-donkeys-smile.md yes
scripts/__tests__/check-installed-spec-pin-claims.test.ts .changeset/8897-installed-spec-pin-claims.md yes

⭐ Why no existing check can be the gate

The instrument that notices is the markdown-test-inputs audit, and it notices only on a post-version tree — a tree that exists nowhere except inside the scheduled release job, which no reader of a pull request sees. Every ordinary check is green while the literal is being written, because the file it names is sitting right there. The signal arrives days later, in a lane whose failure blocks the version pull request's refresh rather than anything on the author's page.

⇒ the gate has to answer the question on the pre-version tree, from the two things it can both see: the set of test-source literals under .changeset/, and the contents of .changeset/. Their intersection must be empty. That is a cheap, total predicate — it needs no version step and no simulation.

Still open after #9582

That pull request repaired the two suites above by name. It left two fixture literals in check-changeset-overwrite.test.ts — .changeset/plum-pandas-wave.md and .changeset/6336-new-work.md — which are not pending today and so are not that defect, but which would become it the day a changeset lands under either name. Repairing filenames one at a time is what this card exists to stop.

Dedup search words

pending changeset filename · stale-not-read · markdown-test-inputs ledger · post-version tree validate · changeset version consumes

Provenance

Filed by the os-dev working #9472 in round R60, session session_015h79niBMyoB1xcaQje3uiz, as the filing half of that card's scope. ⛔ No dedup scan was run here — that is the triage seat's, and the words above are for it.


Generated by Claude Code

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-repopriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions