Skip to content

Commit b729acf

Browse files
committed
fix(dispatch-gates): mask # comments on shell-kind sources, so a shell target's inherited population is not prose
`extractWatchHints` masked its source with `maskedModuleBody`, which understands every comment syntax JavaScript has. `PROGRAM_TEXT_TARGET` admits a third file kind, `.sh`, whose prose is none of them: every path a `#` comment mentioned came back as a watch hint, because the JS-shaped literal regex reads a backticked path as a template literal and a double-quoted one as a string. The mask is kind-scoped and composes ONTO the JS mask rather than replacing it, so the shell hint set is a subset of today's by construction. Quote state is line-scoped: a cross-line scanner desyncs on command substitution and on a `<<<` here-string, and one unbalanced quote then disables the mask for the rest of the file — the fabricating direction. The residue is a bounded over-mask. Measured over the 27 tracked `.sh` files: 37 hints as spelled, 8 after the mask. Tree-wide over 6,361 scanned files: 11 changed, 11 shrank, 0 grew. The live derivation is byte-identical, because no family-to-`.sh` population edge exists yet. Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4bbf141 commit b729acf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/pm/dispatch-gates.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,10 @@ const maskedModuleBody = memoiseMask((source) => maskSelfTests(maskedComments(so
516516
* `.sh` files: 37 hints as spelled, 8 once `#` comments are masked, and 8 of the
517517
* 16 files that spell any hint at all had a population that was 100% prose.
518518
* `scripts/bump-objectui.sh` was the sharpest — 7 hints, every one of them
519-
* inside a `#` comment or an `echo` line.
519+
* inside a `#` comment or an `echo` line. Re-taken unchanged after merging
520+
* `5e53d73d`; the self-test asserts the DIRECTION rather than these numbers,
521+
* because a reading belongs to a named commit and this one moves whenever a
522+
* shell script gains or loses a comment.
520523
*
521524
* That is the one direction this file refuses everywhere else, stated twice next
522525
* door: `spawnedProgramTargets` takes a missing lead over a fabricated one, and

0 commit comments

Comments
 (0)