Skip to content

Commit b9dd923

Browse files
os-litantclaude
andauthored
ci(lint): run os-regen-merge's --self-test, mirroring the verify-lock step (#12944)
`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>
1 parent 944d798 commit b9dd923

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,40 @@ jobs:
10371037
- name: PM ci-failure self-test
10381038
run: node scripts/pm/ci-failure.mjs --self-test
10391039

1040+
# os-regen-merge self-test (#12893). Mirrors the `Verify-lock entry-point
1041+
# self-test` step above 1:1 — same directory, same split between the tool
1042+
# and its self-test. `scripts/pm/os-regen-merge.sh` is the mechanized merge
1043+
# sequence for a branch touching os-regen-driven generated artifacts, and it
1044+
# has NO CI path at all: it is run BY HAND inside a feature branch's
1045+
# worktree, on a merge that exists only there. Its header says so, and that
1046+
# is deliberate.
1047+
#
1048+
# The SELF-TEST is a different animal from the script it tests. It needs no
1049+
# worktree, no remote and no merge — only `git` and a temp dir — and it
1050+
# builds five small fixture repos to pin 23 cases: the PER-FILE merge-side
1051+
# selection and its per-path notices, the staged-diff sentence, the
1052+
# uncommitted-hand-off refusal, and the four pre-existing refusals. A few
1053+
# seconds, no network.
1054+
#
1055+
# Left unwired it rots the way this repo has already recorded and fixed
1056+
# twice (#11514, #6008): the next refactor of the script reds nothing. Two
1057+
# of the 23 cases are SOURCE SCANS of the script's own text — they assert
1058+
# step 2 keeps the non-staging `git restore --source` spelling and never the
1059+
# staging `git checkout` one — which is to say they are precisely the rows a
1060+
# future edit invalidates silently and precisely the rows no reviewer reads.
1061+
# Nothing but this step is an instrument for them.
1062+
#
1063+
# Unconditional and un-`if:`-ed, like every self-test around it — an
1064+
# exemption is precisely what a self-test must not have, or the gap simply
1065+
# moves. One `--self-test` per `run:` block, deliberately: the masking shape
1066+
# `check-step-collectors.mjs` guards is a block driving TWO OR MORE distinct
1067+
# scripts. A discovery collector over `scripts/pm/*.sh --self-test` — which
1068+
# would also catch the next such script arriving unwired — is ruled out of
1069+
# this card: two literal steps do not yet justify the machinery, and a third
1070+
# is when to revisit it.
1071+
- name: os-regen-merge self-test
1072+
run: bash scripts/pm/os-regen-merge.sh --self-test
1073+
10401074
# Claude hook guard self-tests (#11514, objectstack half of
10411075
# objectstack-ai/objectui#5754). `.claude/hooks/` holds the enforcement
10421076
# behind the two rules whose violation is most expensive in this repo —

0 commit comments

Comments
 (0)