fix(pm): dispatch-gates' --changed --commands control accepts the no-diff refusal — main's push run has been red since #15105 - #15320
Merged
Conversation
…diff refusal The case asserts that `--changed` combines with a stdout-shape flag — that the combination PARSES and REACHES the derivation. It demanded `status === 0`, which is a property of the tree the run stands in and not of the combination: where HEAD equals origin/main the derivation refuses by design with exit 2 and the "changes nothing against ... nothing to derive" sentence, so the case went red with nothing wrong with the tool. That shape is `main`'s own push run of lint.yml, which has been red at the gate step on every push since the case landed, while the merge_group run of the same head stayed green. The predicate now accepts either outcome, matching the refusal on the constant the print site interpolates rather than on a retyped copy of it, and a positive control puts an ILLEGAL combination (`--changed` with a path — refused by argv before any derivation, at the same exit 2 with a different sentence) through the SAME predicate and requires it to fail, so widening the case cannot empty it out. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
This was referenced Sep 4, 2026
baozhoutao
marked this pull request as ready for review
September 4, 2026 11:19
baozhoutao
enabled auto-merge
September 4, 2026 11:19
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 free
to 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 #15278
The self-test case that reds is not about a broken tool: it is about the tree the run stands
in. The card recorded it as a fresh-worktree annoyance and said "CI never sees this". That
premise is falsified — CI sees it on every push to
main, andmain's own commit status hasbeen red at
Lint & Repo Gatesstep 31PM dispatch-gates self-testsince the control landed.The shape
The claim is about the flag COMBINATION — that
--changedparses beside a stdout-shape flagand REACHES the derivation.
status === 0is not that claim; it is a property of the caller'stree. Where HEAD equals
origin/mainthe derivation refuses by design, exit 2:A
pushrun oflint.ymlhas exactly that shape: the pushed head ISorigin/main. Apull_requestormerge_grouprun does not — a PR branch and a queue branch both carry a diff— which is why the queue kept merging green while the base branch's own status was red.
Measured — every completed
pushrun oflint.ymlonmainFrom
GET /actions/workflows/lint.yml/runs?event=push&branch=main(cancelled runs = supersededunder concurrency; every run that completed is listed):
101ad2cc1…4428dd575(09-03 19:41Z → 22:39Z)369da918d(09-03 23:23Z, the commit that added the control)35e94c96b,97a22639b,f594e70d7,2cc461030,fcc42e6c1,1876d5dfd,ebb082204,5c584231a,c351a84da,919beca43,50d6c924b,9c1bcda38,1bc3c092a,460134af8,4dd5041bd,0e24b0c2c,fbecffe1d,5b09356b7,3a4373f4c(09-03 23:52Z → 09-04 09:57Z)Failing step confirmed by job read on three of them (
3a4373f4cjob100985021378,5b09356b7,fbecffe1d): step 31,Process completed with exit code 1. Themerge_grouprun of the same3a4373f4chead (job100979536132) is green.Reproduced here on a checkout whose HEAD equals
origin/mainat3a4373f4c— the push-to-mainshape — with exactly one red case out of 1381, this one.
What the case proves now
The predicate accepts either outcome that can only follow from reaching the derivation:
It matches that refusal on
NO_DIFF_REFUSAL, a new constant the print site interpolates, ratherthan on a retyped copy of the sentence — the pin follows the message instead of a memory of it.
A widened case is one reading away from accepting everything, so that reading is made
mechanically rather than left to the next author's eye. A positive control puts an ILLEGAL
combination through the SAME predicate and requires it to FAIL:
--changedwith a path, whichthe argv chain refuses before any derivation runs, at the same exit 2 with a different sentence
(
--changed derives the paths itself — do not pass paths with it.). No parse failure cansatisfy the corrected control.
The usage-line assertions above it are untouched, and no other case was weakened or removed.
The self-test grew by one case: 1381 → 1382.
Ablation — the positive control is load-bearing
Made the illegal combination legal (
} else if (false && wantsChanged && argvPaths.length > 0) {),which is the parse failure the corrected control must not accept:
blob
5ec8448ac→af5175a39, and a probe of--changed --commands PATHthat used to exit 2now exits 0 with 19 lines of commands;
✗ dispatch-gates self-test: 1 of 1382 case(s) failed.traponEXIT INT TERMusinggit checkout HEAD -- ABSOLUTE_PATH; restoreproven by observation, not by an exit code —
git diff HEADempty,git status --porcelainempty, and the worktree blob back to the HEAD blob
5ec8448acca501ca75459d5b0a6d950e3b5231fd.Verification (all at
209f5c596, under the shared verify lock)3a4373f4c)origin/main✗ 1 of 1381 case(s) failed— the sole ✗ is this controlpnpm check:pm-dispatch-gates✓ 1382 cases pass, exit 0origin/main==209f5c596✓ 1382 cases pass, exit 0✗ 1 of 1382 case(s) failed— the positive control aloneBranch (b) was exercised in a separate clone whose own
refs/remotes/origin/mainwas pointed atthis commit — the shared repository's refs were never touched.
Derived family re-derived at the final commit
(
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 21 commands)and run, plus
check-self-test-workflow-commands.mjsand its--self-test, plus whole-repopnpm lint. All exit 0.skip-changeset:scripts/pm/**only — nothing is published from a package by this diff.🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code