Uh oh!
There was an error while loading. Please reload this page.
ci(lint): run os-regen-merge's --self-test, mirroring the verify-lock step - #12944
Merged
Merged
Conversation
… step `scripts/pm/os-regen-merge.sh` ships a 23-case `--self-test` and nothing in `.github/workflows/` ran it. The script itself has no CI path by design — it is run by hand inside a feature branch's worktree, on a merge that exists only there — but its self-test needs only `git` and a temp dir, and two of the 23 cases are source scans of the script's own text (step 2 must keep the non-staging `git restore --source` spelling, never the staging `git checkout` one) that a future refactor would invalidate in silence. One step in the `Lint & Repo Gates` job, mirroring the existing `Verify-lock entry-point self-test` step 1:1. Unconditional and un-`if:`-ed, like every self-test around it. No job names change, so no required context name changes. Co-Authored-By: Claude <noreply@anthropic.com>
os-litant
marked this pull request as ready for review
August 28, 2026 10:00
os-litant
enabled auto-merge
August 28, 2026 10:00
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#12893
What
One step in the
Lint & Repo Gatesjob of.github/workflows/lint.yml, mirroring theexisting
Verify-lock entry-point self-teststep 1:1:File surface:
.github/workflows/lint.ymlonly. Nothing else is touched. The collectorshape the card floats — a discovery step over
scripts/pm/*.sh --self-test— is ruledout of this card by the grading and is not built here; the step's comment records the
ruling and names a third such script as when to revisit it.
Why this shape
scripts/pm/os-regen-merge.shships a 23-case--self-testand, before this PR, noworkflow in the tree named the script at all (
grep -rn os-regen-merge .github/ package.jsonmatched nothing onmainat4d1142753).The script itself has no CI path by design: it is run by hand inside a feature branch's
worktree, on a merge that exists only there. Its self-test is a different animal —
no worktree, no remote, no merge, only
gitand a temp dir — and it builds five smallfixture repos to pin the per-file merge-side selection, the per-path notices, the
staged-diff sentence, the uncommitted-hand-off refusal, and the four pre-existing
refusals. A few seconds, no network.
Two of the 23 cases are source scans of the script's own text: they assert step 2 keeps
the non-staging
git restore --sourcespelling and never the staginggit checkoutone. Those are the rows a future refactor invalidates in silence and the rows no
reviewer reads. This repo has the same shape on record twice already, both remedied at
the time — #11514 and #6008.
Placement. After
PM ci-failure self-testand before theClaude hook guard self-testscollector, i.e. at the tail of the PM self-test family, rather than adjacentto its sibling: the ci-failure step's comment calls itself "Fifth member of the PM
self-test family above", and inserting ahead of it would have made that ordinal
stale. The diff is therefore purely additive — 34 lines, no existing line changed.
One
--self-testperrun:block, deliberately. The masking shapecheck-step-collectors.mjsguards is a block driving two or more distinct scripts; alone self-test in its own step is this file's dominant shape and is what the gate reads
as correct. Unconditional and un-
if:-ed, like every self-test around it — an exemptionis precisely what a self-test must not have.
Required contexts: unchanged, verified mechanically
The card asked for this explicitly. A step is not a job, and the required-set is keyed
on job names. Parsed both sides of the diff with the
yamlpackage:And the gate agrees:
The step's own command, run exactly as the workflow will
Exit code captured before any pipe (redirect to a file, then
EXIT=$?, then read thefile), so it is the script's status and not
tail's.Reverse verification: the new step has a real red path
A step that invokes a flag the script silently ignores would be green forever, which is
the failure mode this card exists to prevent, so both directions were measured.
A misspelled flag is not a quiet pass.
bash scripts/pm/os-regen-merge.sh --selftestexits 1 with
✗ unknown argument: --selftestand the usage block. A typo in the stepreddens rather than no-ops.
Ablation of the pinned property. Implementation committed first, so the restore leg's
reference already carried it. Mutated the step-2 spelling in the script from
git restore --source=origin/main -- "$p"togit checkout origin/main -- "$p",confirmed the mutation on disk before reading anything (anchor text count 0, injected
text count 1, blob
9634d1cbbecoming701c04b9), then read the run. Restore leg pinnedto
HEADexplicitly, never a baregit checkout --, and proven by observed state ratherthan by an exit code:
The two rows that redden are exactly the two source scans, the ones with no instrument
other than this step. The script is byte-identical to
HEADagain and is not in thisPR's diff. No build or
dist/is involved: the self-test runs the script from source.Gates
Union derived mechanically, never listed by hand:
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack— 1 changed pathvs merge base
4d1142753, 19 families matched. Run on the final commit 91ea48c,plus
check:nul-bytes. All 20 green; each verdict line below is the gate's own, not abare
$?:check:type-check-debtrefused on its first run with the prerequisite message it isdesigned to print in a fresh worktree —
--re-measure cannot run: 56 workspace dependenc(ies) of the ledgered packages have no built type entry point on disk— whichis a NOT-MEASURED, not a red. Supplied the prerequisite exactly as
lint.ymldoes beforethat step (
pnpm exec turbo run build --filter='./packages/*' --filter='./packages/*/*',70 tasks, 7m12s, under the shared verify lock) and re-ran it green; the line above is
from that run.
YAML validity is not asserted from a rule about the text: the file was parsed with the
yamlpackage and the new step read back out of the parse tree —{"name":"os-regen-merge self-test","run":"bash scripts/pm/os-regen-merge.sh --self-test"}at index 37 of
jobs.lint.steps, betweenPM ci-failure self-testandClaude hook guard self-tests (worktree-first · stash ban).Release surface
None. Workflow-only diff, publishes nothing — carries the
skip-changesetlabel insteadof a changeset.
Generated by Claude Code
Generated by Claude Code