|
6 | 6 | * |
7 | 7 | * node scripts/pm/check-dispatch-gates.mjs # runs the tool's --self-test |
8 | 8 | * |
9 | | - * ⚠️ This header names repo paths UNQUOTED on purpose — see the last section. |
10 | | - * |
11 | 9 | * ## Why the gate exists |
12 | 10 | * |
13 | 11 | * scripts/pm/dispatch-gates.mjs derives the "local gates for this card" line of |
|
53 | 51 | * none"), so shipping it as the price of gating the tool would have taken more |
54 | 52 | * from every dispatch prompt than the gate gives back. |
55 | 53 | * |
| 54 | + * Those numbers are PRE-MASKING, and the decision they justify survives on |
| 55 | + * narrower grounds than they describe. maskSelfTests now blanks the fixture |
| 56 | + * half outright: measured on this tree, the tool's own source yields 4 hints, |
| 57 | + * not 49 — .github/workflows, which it really reads, and packages/plugins, |
| 58 | + * packages/drivers, packages/services, the bases its package resolver probes. |
| 59 | + * Those three are real reads and still cover three of the largest directories |
| 60 | + * in the tree, so a directly-wired gate would print MATCHED for every card |
| 61 | + * under them — a smaller fabrication than the fixture one, of the same kind. |
| 62 | + * The spec filter path from the incident above no longer matches at all. |
| 63 | + * |
56 | 64 | * A separate gate file is also what the other two pm gates look like |
57 | 65 | * (check-skill-line-ratchet.mjs, check-skill-id-lint.mjs). Its watch hints are |
58 | 66 | * the one constant below: this gate is matched for a card that edits the tool, |
59 | 67 | * and for nothing else — which is the blind spot #8162 is about. |
60 | 68 | * |
61 | | - * ## Why the paths above are unquoted |
| 69 | + * ## Why the paths above are unquoted, and why that is no longer required |
62 | 70 | * |
63 | | - * Watch-hint extraction reads any quoted-looking span, backticks included, and |
64 | | - * does not skip comments. Written the ordinary way, with each path in backticks, |
65 | | - * this header alone yielded ten hints — packages/spec/src, packages/objectql, |
| 71 | + * The incident is real and worth keeping. Watch-hint extraction reads any |
| 72 | + * quoted-looking span, backticks included, and it USED TO read comments as |
| 73 | + * well. Written the ordinary way, with each path in backticks, this header |
| 74 | + * alone yielded ten hints — packages/spec/src, packages/objectql, |
66 | 75 | * packages/plugins, packages/drivers, .claude/agents, .changeset among them — |
67 | 76 | * and reproduced, from the file explaining the pollution, the exact false |
68 | 77 | * MATCHED leads it exists to avoid (measured, not predicted: the first draft of |
69 | | - * this file did it). So paths are named unquoted here, and the only quoted path |
70 | | - * in this file is the one input this gate genuinely has. |
| 78 | + * this file did it). Hence the convention. |
| 79 | + * |
| 80 | + * The extractor no longer works that way: extractWatchHints opens with |
| 81 | + * maskComments, whose own docblock names this file as the specimen it retires. |
| 82 | + * Measured on this tree, with every repo path this header names rewritten into |
| 83 | + * backticks: 1 hint under today's extractor — scripts/pm/dispatch-gates.mjs, |
| 84 | + * the same single hint the file ships with — against 10 under the pre-masking |
| 85 | + * one, reaching spec, objectql, plugins, drivers, .claude/agents and .changeset |
| 86 | + * exactly as the incident describes. Comment masking alone accounts for the |
| 87 | + * difference: masking self-test bodies instead changes nothing here, because |
| 88 | + * this file has none. |
| 89 | + * |
| 90 | + * So the unquoting is no longer load-bearing, and this section is history |
| 91 | + * rather than an instruction: quoting a path in a comment here is now free, and |
| 92 | + * the paths stay unquoted because rewriting them buys nothing. What is NOT free |
| 93 | + * is a path literal in a module body — masking cannot reach one — so the one |
| 94 | + * quoted path below is still the one input this gate genuinely has, and that is |
| 95 | + * the rule to carry into a new gate's header rather than the unquoting. |
71 | 96 | * |
72 | 97 | * Nothing else belongs in this file. Assertions go in the tool's own self-test, |
73 | 98 | * beside the code they judge; this is the CI invocation and its reason. |
|
0 commit comments