Skip to content

Commit 3f4bf6b

Browse files
committed
fix(pm): a population declaration's reason is whole or the declaration is red
The three population markers in `scripts/pm/dispatch-gates.mjs` capture their reason with `(\S.*)$` under the `m` flag, so the capture ends at the first newline. A reason an author wraps across two or three comment lines was captured as line one only, and no refusal ever asked whether it ended where the author did: `wholeTreePopulationRefusal` checks that a reason EXISTS and that a root walk BACKS it. The seat was handed a sentence that simply stops — and the reason is the one thing a seat reads off that row. The marker grammar now has one spelling (`populationMarkerPattern`), and `populationReasonContinuation` reads, off the same text, the comment line that continues a reason. A continued reason is refused by `populationReasonCutRefusal`, which names the declaration, the file and the line; the whole-tree and wide refusals delegate to it before the checks that read the reason text, and the no-path renderer prints a cut declaration as REFUSED rather than as the fragment it was cut down to. Live derivation over the tree: 27 declarations, one of them cut — `check:objectui-bump` reached the seat as "every path this file writes or reads". Its comment is made whole on one line here, verbatim, so no refusal lands red on main. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gqi43smmqjJ5sUrhfoPeKu
1 parent 99fcb4a commit 3f4bf6b

2 files changed

Lines changed: 485 additions & 20 deletions

File tree

scripts/bump-objectui.selftest.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,7 @@
4747
# the real `objectui-changeset-digest.mjs` (a byte copy, like the script under
4848
# test) through a throwaway objectui repo with a real changeset commit.
4949
#
50-
# dispatch-gates: no-path-population -- every path this file writes or reads
51-
# lives inside a disposable checkout under mktemp -d (a throwaway objectui and
52-
# a throwaway FRAMEWORK_ROOT, both destroyed by the EXIT trap below), so no
53-
# quoted literal in this file names a path this repo tracks. Case 5's fixture
54-
# changeset filename is assembled from CHANGESET_NAME by interpolation
55-
# everywhere it is used, deliberately never spelled as one bare quoted token,
56-
# so it does not read as a declared population here either.
50+
# dispatch-gates: no-path-population -- every path this file writes or reads lives inside a disposable checkout under mktemp -d (a throwaway objectui and a throwaway FRAMEWORK_ROOT, both destroyed by the EXIT trap below), so no quoted literal in this file names a path this repo tracks. Case 5's fixture changeset filename is assembled from CHANGESET_NAME by interpolation everywhere it is used, deliberately never spelled as one bare quoted token, so it does not read as a declared population here either.
5751

5852
set -euo pipefail
5953

0 commit comments

Comments
 (0)