@feigi/fleet-ctl 3.23.35 → 3.23.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/package.json +1 -1
  2. package/scripts/main-checkout.mjs +1 -1
  3. package/scripts/member-write-guard.mjs +1 -1
  4. package/scripts/repo-root.mjs +1 -1
  5. package/skills/run-team/references/reaping.md +1 -1
  6. package/scripts/agent-test-dir-prose.test.mjs +0 -59
  7. package/scripts/agent-test.test.mjs +0 -1640
  8. package/scripts/ambient-git-vars-mjs-prose.test.mjs +0 -397
  9. package/scripts/ambient-git-vars-prose.test.mjs +0 -192
  10. package/scripts/ancestry-check-position-prose.test.mjs +0 -175
  11. package/scripts/apply-ruleset.test.mjs +0 -421
  12. package/scripts/arg-header-probes-prose.test.mjs +0 -394
  13. package/scripts/arg.test.mjs +0 -1354
  14. package/scripts/board-cli.test.mjs +0 -710
  15. package/scripts/board-identity.test.mjs +0 -429
  16. package/scripts/board-liveness-banner.test.mjs +0 -119
  17. package/scripts/board-prev-shape.test.mjs +0 -228
  18. package/scripts/board-tryparse-null.test.mjs +0 -119
  19. package/scripts/board.test.mjs +0 -3121
  20. package/scripts/brief-after-cut-prose.test.mjs +0 -53
  21. package/scripts/candidates-exit3-prose.test.mjs +0 -302
  22. package/scripts/candidates.test.mjs +0 -2312
  23. package/scripts/caveat-unification-prose.test.mjs +0 -98
  24. package/scripts/cell-readout.test.mjs +0 -615
  25. package/scripts/ci-comment-rot-prose.test.mjs +0 -2025
  26. package/scripts/ci-completes-premise-prose.test.mjs +0 -257
  27. package/scripts/ci-state-prose.test.mjs +0 -113
  28. package/scripts/ci-state.test.mjs +0 -1933
  29. package/scripts/ci-vacuous-green.test.mjs +0 -368
  30. package/scripts/citation-sweep-prose.test.mjs +0 -1712
  31. package/scripts/claim-lifecycle.test.mjs +0 -187
  32. package/scripts/claim-ticket.test.mjs +0 -1122
  33. package/scripts/closing-keyword-prose.test.mjs +0 -193
  34. package/scripts/cockpit-launch-idempotent-prose.test.mjs +0 -165
  35. package/scripts/cockpit-tick-nonblocking.test.mjs +0 -210
  36. package/scripts/compute-board.test.mjs +0 -1214
  37. package/scripts/compute-spend.test.mjs +0 -517
  38. package/scripts/consumer-technology-prose.test.mjs +0 -126
  39. package/scripts/cross-repo-citation-prose.test.mjs +0 -155
  40. package/scripts/cwd-isolation-pins.mjs +0 -83
  41. package/scripts/dedupe-guard-prose.test.mjs +0 -243
  42. package/scripts/delete-merged-branch.test.mjs +0 -576
  43. package/scripts/derive-testcmd.test.mjs +0 -595
  44. package/scripts/diff-stats.test.mjs +0 -404
  45. package/scripts/dispatch-block-golden-prose.test.mjs +0 -1130
  46. package/scripts/dispatch-block-pins-prose.test.mjs +0 -615
  47. package/scripts/dispositions-check.test.mjs +0 -936
  48. package/scripts/dispositions-gate-prose.test.mjs +0 -129
  49. package/scripts/drop-merged-label.test.mjs +0 -479
  50. package/scripts/exec-stub.mjs +0 -93
  51. package/scripts/exec-stub.test.mjs +0 -69
  52. package/scripts/expected-jobs-prose.test.mjs +0 -80
  53. package/scripts/fan-out-authorization-prose.test.mjs +0 -80
  54. package/scripts/filing-bar-seat-prose.test.mjs +0 -242
  55. package/scripts/filing-claim-bar-prose.test.mjs +0 -166
  56. package/scripts/finisher-died-prose.test.mjs +0 -31
  57. package/scripts/finisher-dispatch-premise-prose.test.mjs +0 -312
  58. package/scripts/finisher-halt-prose.test.mjs +0 -106
  59. package/scripts/finisher-name-prose.test.mjs +0 -134
  60. package/scripts/finisher-own-tree-prose.test.mjs +0 -299
  61. package/scripts/finisher-pin-race-prose.test.mjs +0 -339
  62. package/scripts/finisher-test-verdict-prose.test.mjs +0 -102
  63. package/scripts/fix-applier-correction-rules-prose.test.mjs +0 -202
  64. package/scripts/fix-applier-result-file-prose.test.mjs +0 -149
  65. package/scripts/fleet-bootstrap.test.mjs +0 -75
  66. package/scripts/fleet-heartbeat.test.mjs +0 -450
  67. package/scripts/fleet-provenance.test.mjs +0 -138
  68. package/scripts/fleet-run.test.mjs +0 -90
  69. package/scripts/fleet-state.test.mjs +0 -460
  70. package/scripts/fleet-tick-prose.test.mjs +0 -300
  71. package/scripts/fleet-tick.test.mjs +0 -2444
  72. package/scripts/force-with-lease-reason-prose.test.mjs +0 -184
  73. package/scripts/frontmatter-check.test.mjs +0 -436
  74. package/scripts/git-env.test.mjs +0 -149
  75. package/scripts/git-status-untracked-mode-sweep.test.mjs +0 -216
  76. package/scripts/gone-walk.test.mjs +0 -213
  77. package/scripts/gp-sep-invariant-prose.test.mjs +0 -188
  78. package/scripts/head-moved-after-label-prose.test.mjs +0 -233
  79. package/scripts/immutable-body-claim-prose.test.mjs +0 -204
  80. package/scripts/implementer-model-tier.test.mjs +0 -235
  81. package/scripts/inflight-citation-prose.test.mjs +0 -144
  82. package/scripts/inflight-exit2-prose.test.mjs +0 -81
  83. package/scripts/inflight-probe-guard-prose.test.mjs +0 -109
  84. package/scripts/inflight-scan-scope-prose.test.mjs +0 -57
  85. package/scripts/inflight.test.mjs +0 -2882
  86. package/scripts/injection-control-prose.test.mjs +0 -404
  87. package/scripts/install-root-audit.test.mjs +0 -464
  88. package/scripts/instrument-check-prose.test.mjs +0 -235
  89. package/scripts/instruments.test.mjs +0 -787
  90. package/scripts/is-cli.test.mjs +0 -99
  91. package/scripts/issue-tracker-prose.test.mjs +0 -71
  92. package/scripts/json.test.mjs +0 -364
  93. package/scripts/ledger-dispatch.test.mjs +0 -927
  94. package/scripts/ledger-grammar.test.mjs +0 -227
  95. package/scripts/ledger-read-require-file.test.mjs +0 -197
  96. package/scripts/ledger-rotate.test.mjs +0 -142
  97. package/scripts/ledger.test.mjs +0 -3436
  98. package/scripts/line-distance-prose.test.mjs +0 -245
  99. package/scripts/liveness-rationale-prose.test.mjs +0 -83
  100. package/scripts/locale-pin-prose.test.mjs +0 -189
  101. package/scripts/main-checkout.test.mjs +0 -332
  102. package/scripts/member-outcome-prose.test.mjs +0 -167
  103. package/scripts/member-outcomes-header.test.mjs +0 -129
  104. package/scripts/member-outcomes-prose.test.mjs +0 -63
  105. package/scripts/member-outcomes.test.mjs +0 -638
  106. package/scripts/member-prompt-prose.test.mjs +0 -165
  107. package/scripts/member-record.test.mjs +0 -541
  108. package/scripts/member-write-guard.test.mjs +0 -214
  109. package/scripts/merge-commit-probe-prose.test.mjs +0 -122
  110. package/scripts/merge-gate.test.mjs +0 -613
  111. package/scripts/muted-git-guard-sweep.test.mjs +0 -493
  112. package/scripts/net-ssh-precedence-prose.test.mjs +0 -91
  113. package/scripts/net-watchdog-prose.test.mjs +0 -79
  114. package/scripts/net.test.mjs +0 -211
  115. package/scripts/no-ci-gate-prose.test.mjs +0 -108
  116. package/scripts/no-undo-audit.test.mjs +0 -3961
  117. package/scripts/no-wave.test.mjs +0 -138
  118. package/scripts/node-floor-sweep.test.mjs +0 -611
  119. package/scripts/pointer-target-prose.test.mjs +0 -186
  120. package/scripts/pr-cost.test.mjs +0 -521
  121. package/scripts/pr-overlap.test.mjs +0 -692
  122. package/scripts/printf-die-sweep.test.mjs +0 -384
  123. package/scripts/prompt-renderer.mjs +0 -40
  124. package/scripts/prompt-renderer.test.mjs +0 -68
  125. package/scripts/prose-pin.mjs +0 -807
  126. package/scripts/prose-pin.test.mjs +0 -1034
  127. package/scripts/prove-merge.test.mjs +0 -995
  128. package/scripts/pull-table-relabel-prose.test.mjs +0 -60
  129. package/scripts/quiet-payload-prose.test.mjs +0 -222
  130. package/scripts/reap-cherry-check-prose.test.mjs +0 -80
  131. package/scripts/reap.test.mjs +0 -4432
  132. package/scripts/reaping-prose.test.mjs +0 -239
  133. package/scripts/reaping-reap-authorizers-prose.test.mjs +0 -112
  134. package/scripts/reaping-release-authorizers-prose.test.mjs +0 -85
  135. package/scripts/recipe-derivation-prose.test.mjs +0 -112
  136. package/scripts/recipe-prove.test.mjs +0 -1042
  137. package/scripts/refuter-scratch-prose.test.mjs +0 -135
  138. package/scripts/release-label-required-prose.test.mjs +0 -71
  139. package/scripts/release-label-split-prose.test.mjs +0 -184
  140. package/scripts/release-ticket-reap-pairing-prose.test.mjs +0 -63
  141. package/scripts/release-ticket.test.mjs +0 -5099
  142. package/scripts/renovate-release-contract.test.mjs +0 -379
  143. package/scripts/repo-root.test.mjs +0 -873
  144. package/scripts/reporter-output-rule-prose.test.mjs +0 -208
  145. package/scripts/review-agent-report-only.test.mjs +0 -49
  146. package/scripts/review-core-booking.test.mjs +0 -35
  147. package/scripts/review-core-cwd-isolation.test.mjs +0 -374
  148. package/scripts/review-core-reads.test.mjs +0 -478
  149. package/scripts/review-core-refuter-scratch.test.mjs +0 -148
  150. package/scripts/review-core-scratch-refusal.test.mjs +0 -64
  151. package/scripts/review-core-shared-test-run.test.mjs +0 -275
  152. package/scripts/review-core-snapshot-path.test.mjs +0 -830
  153. package/scripts/review-core-specialist-scratch.test.mjs +0 -191
  154. package/scripts/review-core-testcmd.test.mjs +0 -335
  155. package/scripts/review-core-unrun.test.mjs +0 -566
  156. package/scripts/review-core-unverified-discriminant.test.mjs +0 -208
  157. package/scripts/review-eval-resolver-path.test.mjs +0 -55
  158. package/scripts/review-host-fixture.mjs +0 -89
  159. package/scripts/review-in-run-retry.test.mjs +0 -211
  160. package/scripts/review-no-vendor-dispatch.test.mjs +0 -45
  161. package/scripts/review-path-default.test.mjs +0 -796
  162. package/scripts/review-runner-spawns.test.mjs +0 -95
  163. package/scripts/review-runner.test.mjs +0 -166
  164. package/scripts/review-tier-audit.test.mjs +0 -140
  165. package/scripts/run-artifact-pr-prose.test.mjs +0 -341
  166. package/scripts/run-merge-bot-prose.test.mjs +0 -1413
  167. package/scripts/run-team-local-hook.test.mjs +0 -442
  168. package/scripts/scratch-partition-invariant-prose.test.mjs +0 -74
  169. package/scripts/scripts-path-citation-sweep.test.mjs +0 -73
  170. package/scripts/section-between-guard-prose.test.mjs +0 -379
  171. package/scripts/select-dimensions.test.mjs +0 -674
  172. package/scripts/shared-refusal.test.mjs +0 -388
  173. package/scripts/shell-traps-prose.test.mjs +0 -504
  174. package/scripts/shortlist.test.mjs +0 -380
  175. package/scripts/slow-transport.mjs +0 -72
  176. package/scripts/snapshot-repo.test.mjs +0 -1006
  177. package/scripts/snapshot-runner-audience-prose.test.mjs +0 -130
  178. package/scripts/spend-view.test.mjs +0 -312
  179. package/scripts/staleness-qualifier-prose.test.mjs +0 -251
  180. package/scripts/staleness-verdict-prose.test.mjs +0 -142
  181. package/scripts/staleness.test.mjs +0 -893
  182. package/scripts/stalled-member-liveness-prose.test.mjs +0 -219
  183. package/scripts/stash-prohibition-prose.test.mjs +0 -313
  184. package/scripts/strip-comments.mjs +0 -44
  185. package/scripts/temp-dir.mjs +0 -47
  186. package/scripts/ticket-router.test.mjs +0 -981
  187. package/scripts/tier-check.test.mjs +0 -828
  188. package/scripts/tier-outcomes-header.test.mjs +0 -518
  189. package/scripts/tier-outcomes.test.mjs +0 -572
  190. package/scripts/tier-roles.test.mjs +0 -535
  191. package/scripts/tracker-block-copy-prose.test.mjs +0 -288
  192. package/scripts/triage-labels-gloss-prose.test.mjs +0 -97
  193. package/scripts/unattended-git-sweep.test.mjs +0 -142
  194. package/scripts/verify-sha-exit2-prose.test.mjs +0 -269
  195. package/scripts/verify-sha.test.mjs +0 -692
  196. package/scripts/watcher-degraded-block.test.mjs +0 -369
  197. package/scripts/watcher-key-prose.test.mjs +0 -106
  198. package/scripts/within-run-pair-prose.test.mjs +0 -212
  199. package/scripts/worktree-audit.test.mjs +0 -1408
  200. package/scripts/worktree-head-prose.test.mjs +0 -276
  201. package/scripts/worktree-listing-sweep.test.mjs +0 -217
  202. package/scripts/worktree-model-prose.test.mjs +0 -216
  203. package/scripts/worktree-porcelain.mjs +0 -35
  204. package/scripts/worktree-porcelain.test.mjs +0 -102
@@ -1,235 +0,0 @@
1
- // #436. `instruments.sh` is executed by an AGENT reading run-team/SKILL.md, so
2
- // the script being correct buys nothing on its own — the whole mechanism is
3
- // three clauses of prose, and every one of them can rot without an error:
4
- //
5
- // - the RULE (both refusing exit codes, no re-read after a refusal, and the
6
- // one condition under which re-pinning is legitimate),
7
- // - the PIN at phase 0 step 0, which must sit after the fast-forward,
8
- // - the RE-PIN in the mid-run tooling fix, the one legitimate writer to the
9
- // set. Lose that clause and the first tooling fix of a run makes every
10
- // later gate refuse, which is how a guard gets discarded rather than fixed.
11
- //
12
- // The refusal half is the one worth pinning hardest. "Exit 0 is the only code
13
- // that lets a gate proceed" is the acceptance criterion; a later edit that
14
- // softened exit 2 to "re-run and continue" would read as perfectly reasonable
15
- // prose and would turn a fail-closed guard into a fail-open one, silently.
16
- //
17
- // THE CEILING, shared with every prose pin in this repo: these prove a clause is
18
- // PRESENT in the smallest slice that can hold it. None can prove a sentence
19
- // added beside it does not negate it, and none runs anything —
20
- // instruments.test.mjs owns the script's behaviour. Read each assertion as "not
21
- // vacuous to REWORDING", never as "this rule cannot be subverted".
22
- //
23
- // Zero deps: `node --test plugin/scripts/instrument-check-prose.test.mjs`.
24
-
25
- import { test } from "node:test";
26
- import assert from "node:assert/strict";
27
- import { accessSync, constants, readFileSync } from "node:fs";
28
- import { join } from "node:path";
29
- import { between, paragraph, phrase, sentences } from "./prose-pin.mjs";
30
-
31
- const REPO = join(import.meta.dirname, "..");
32
- const RUN_TEAM = readFileSync(join(REPO, "skills", "run-team", "SKILL.md"), "utf8");
33
-
34
- // Bounded at both ends, and the slices are small on purpose: the file names
35
- // `instruments.sh` in three separate places, so a slice running to EOF is
36
- // satisfied by whichever of the other two survived.
37
- const RULE = () =>
38
- between(
39
- RUN_TEAM,
40
- "**You read your instruments out of a tree every member can write to",
41
- "\n## Phase 0 — shortlist",
42
- "run-team instrument rule",
43
- );
44
-
45
- // The END bound is THIS paragraph's own blank line, via `paragraph()`. It was a
46
- // literal `between()` end anchor on the heading of the NEXT, unrelated phase-0
47
- // step, which made an unrelated rename of that neighbour red this pin with a
48
- // bare "no longer contains" that reads as an instrument-check regression and is
49
- // not one — reproduced at `fa65476` as a negative control the suite should NOT
50
- // have caught, and fixed here (#1062 records the exact wording; naming it again
51
- // here would only be a second copy free to drift). A blank line is the bound
52
- // that belongs to the pinned content and the one a rewrap cannot move, and
53
- // `anchorAt` additionally refuses a start anchor occurring more than once — so
54
- // this slice is tighter than what it replaces, still bounded at BOTH ends (an
55
- // unbounded end would let an unrelated later copy satisfy the assertions, the
56
- // worse failure), and no prose was added to give it something to anchor on.
57
- // `paragraph()` is this directory's single definition of that bound (#823,
58
- // #1372): a hand-rolled end anchor on neighbouring text is the defect it
59
- // removes, not a style choice.
60
- const PIN_STEP = () => paragraph(RUN_TEAM, "**Pin the instruments,", "run-team phase 0 pin");
61
-
62
- // The gate list is one bullet, and this slice is bounded to it. Read out of the
63
- // whole RULE slice, `phrase("reap")` is satisfied by the unrelated `reap.sh`
64
- // mention further down it, so the loop below stayed green with the gate name
65
- // gone. Word boundaries would not have fixed it: `\breap\b` matches inside
66
- // `reap.sh` too. Bounding the text the loop reads is what cannot regress.
67
- const GATES = () =>
68
- between(
69
- RUN_TEAM,
70
- "**Re-check before you act on any instrument reading**",
71
- "**Exit 0 is the only code",
72
- "run-team gate list",
73
- );
74
-
75
- const TOOLING_FIX = () =>
76
- between(RUN_TEAM, "## Fix the tooling mid-run", "\n## Failure handling", "run-team tooling fix");
77
-
78
- test("the rule states that BOTH non-zero codes refuse, not just the changed one", () => {
79
- const rule = RULE();
80
- // Exit 0 as the sole proceeding code, and exit 2 named as a refusal beside
81
- // exit 1. Pinning only "exit 1 refuses" would stay green on the fail-open
82
- // rewrite this exists to prevent, since exit 2 is the code that reads like a
83
- // retry.
84
- assert.match(rule, phrase("Exit 0 is the only code that lets a gate proceed"));
85
- assert.match(rule, phrase("Exit 1 (the set changed) and exit 2 (the check could not answer) both refuse"));
86
- });
87
-
88
- test("the rule forbids re-reading the instrument after a refusal", () => {
89
- // "Refuse and report, not silently re-read" is #436's stated behaviour on
90
- // detection. Without this clause the rule reads as a warning rather than a
91
- // gate, and re-running until it passes is the obvious wrong reflex.
92
- assert.match(RULE(), phrase("report what it printed and do NOT re-read the instrument"));
93
- });
94
-
95
- test("the rule names the gates it runs before, not just 'a gate'", () => {
96
- // The check is worthless if the controller cannot tell where it applies. Each
97
- // of these is a decision the fleet takes off an instrument reading.
98
- const gates = GATES();
99
- for (const gate of ["SHA acceptance", "CI verdict", "reconcile", "reap", "label gate"]) {
100
- assert.match(gates, phrase(gate), `the rule stopped naming the ${gate}`);
101
- }
102
- });
103
-
104
- test("the rule limits re-pinning to a change the controller made deliberately", () => {
105
- // The baseline IS the mechanism, and `--pin` overwrites it with whatever is in
106
- // the tree, never comparing first. Nothing in the script can tell a re-pin
107
- // after a deliberate fix from one used to clear a refusal under time pressure,
108
- // so this clause is the only thing between the two — and losing it discards
109
- // the guard while every other pin here stays green.
110
- const rule = RULE();
111
- assert.match(rule, phrase("Re-pin only after a change you made deliberately"));
112
- assert.match(rule, phrase("Re-pinning to clear a refusal you cannot explain discards the check"));
113
- });
114
-
115
- test("the rule records that refs are out of the digest, and why", () => {
116
- // Not decoration: the ticket's corroborating evidence is a stray branch, so
117
- // the next reader will ask. Without the reason, "add refs to the digest" is
118
- // an obvious-looking improvement that fires on ordinary work several times a
119
- // fleet run — which is the noise #436's third acceptance criterion rules out.
120
- const rule = RULE();
121
- assert.match(rule, phrase("It does not cover refs, deliberately"));
122
- assert.match(rule, phrase("a per-gate refusal on that is noise"));
123
- });
124
-
125
- test("phase 0 step 0 pins the set, and only after the fast-forward", () => {
126
- const step = PIN_STEP();
127
- assert.match(step, phrase("instruments.sh --pin"));
128
- // The ordering is the load-bearing half. Phase 0 step 0 fast-forwards the
129
- // checkout because the runbook is read out of it; pinning first certifies the
130
- // superseded text for the whole run, and every later gate then passes.
131
- assert.match(step, phrase("after that fast-forward and before anything reads them"));
132
- // Both anchors present, in this order. The hand-rolled `indexOf(ff) <
133
- // indexOf(pin)` this replaces was vacuous to the rewording it exists to catch:
134
- // reword the fast-forward away and `indexOf` returns -1, which is less than
135
- // anything. `between` throws by name on either anchor missing and on the
136
- // reversed order, which is every case the comparison was meant to cover.
137
- between(RUN_TEAM, "git merge --ff-only origin/main", "**Pin the instruments,", "run-team phase 0 ordering");
138
- });
139
-
140
- /**
141
- * The counterfactual rule, as a function so the refuse and accept cases can be
142
- * fed input this repo does not contain. Returns null when the step is sound,
143
- * else the reason.
144
- */
145
- export function wrongOrderFault(step) {
146
- // #1061. This sentence states what happens in the order the instruction
147
- // above it forbids, so its MOOD is the whole content. Unmarked ("Pinning
148
- // ahead of the fast-forward pins the superseded text and certifies it for
149
- // the rest of the run.") it parses as a declarative describing what the
150
- // instruction achieves, and the reader — usually an agent — is then told by
151
- // the runbook to do the one thing the instruction exists to prevent.
152
- //
153
- // Scoped to the SENTENCE, never the step slice: over the paragraph the
154
- // marker below is satisfied by a modal a later edit adds to any other
155
- // clause in it. Anchored on the COST and not on the opening word, because
156
- // the marker can be a modal ("Pinning before … WOULD instead pin") or a
157
- // conditional ("IF you pin before …") and only the second keeps "Pinning"
158
- // as the subject — a start anchor on that word makes every conditional
159
- // rewording an anchor red.
160
- //
161
- // The sentence is `sentences()`'s, never a first-period `[^.]*` window
162
- // (#1940). That window ran straight past a `?` or `!` — and so did a
163
- // splitter that missed a bold sentence's `.**` — so a neighbour ending in
164
- // one lent the declarative its `if` or `would` and the mutant below passed.
165
- // It also began after any period inside the sentence (`instruments.sh`,
166
- // "e.g."), which stripped the marker from a valid conditional rewording.
167
- // Newlines are whitespace to the splitter, so a rewrap moves neither end;
168
- // the count is `anchorAt`'s exactly-once guarantee, held inline because this
169
- // bound is a sentence rather than an anchor.
170
- const hits = sentences(step).filter((s) => /superseded\s+text/.test(s));
171
- if (hits.length !== 1) {
172
- return `the sentence naming what pinning in the wrong order costs occurs ${hits.length} times — re-anchor this test, never widen it to the paragraph`;
173
- }
174
- const [wrongOrder] = hits;
175
- // The marker, and the mutant this check exists to kill: restore the
176
- // declarative above, which keeps every token pinned anywhere in this file
177
- // and flips only the mood — RED here and nowhere else. Deleting the
178
- // sentence reds on the count above instead, which measures vocabulary
179
- // removal and proves less.
180
- if (!/\bwould\b|\bif\b/i.test(wrongOrder)) {
181
- return "the wrong-order sentence lost its counterfactual marker — it now reads as a statement of what pinning DOES, which is the failure it is describing";
182
- }
183
- // And it still says whose order is wrong. A marked sentence that no longer
184
- // names the fast-forward it is contrasting with pins mood over nothing.
185
- if (!phrase("fast-forward").test(wrongOrder)) {
186
- return "the wrong-order sentence stopped naming the fast-forward it is the counterfactual of";
187
- }
188
- return null;
189
- }
190
-
191
- test("phase 0 step 0 states the WRONG pin order as a counterfactual, not as a fact", () => {
192
- assert.equal(wrongOrderFault(PIN_STEP()), null);
193
- });
194
-
195
- // #1940. The other half, fed shapes the step does not hold today. The
196
- // first-period window accepted the declarative whenever the sentence beside it
197
- // ended in `?` or `!` and carried a marker of its own — the one mutant this
198
- // rule exists to kill — and refused a conditional with a filename or an
199
- // abbreviation ahead of its `if`.
200
- test("a neighbouring sentence cannot lend the declarative its marker, and a period inside the sentence cannot strip it (#1940)", () => {
201
- const declarative = "Pinning ahead of the fast-forward pins the superseded text and certifies it for the rest of the run.";
202
- for (const neighbour of [
203
- `What if one refuses? ${declarative}`,
204
- `It would be too late afterwards! ${declarative}`,
205
- `**If in doubt, pin after the fast-forward.** ${declarative}`,
206
- "Pinning ahead of the fast-forward pins the superseded text! If in doubt, re-pin.",
207
- ]) {
208
- assert.match(wrongOrderFault(neighbour), /counterfactual marker/, neighbour);
209
- }
210
-
211
- assert.equal(wrongOrderFault("If you run instruments.sh --pin before that fast-forward, it pins the superseded text."), null);
212
- assert.equal(wrongOrderFault("Pinning before that fast-forward (e.g. from a stale tree) would instead pin the superseded text."), null);
213
- });
214
-
215
- test("the mid-run tooling fix re-pins — the one legitimate writer to the set", () => {
216
- const fix = TOOLING_FIX();
217
- assert.match(fix, phrase("Re-pin first"));
218
- assert.match(fix, phrase("instruments.sh"));
219
- // The consequence, spelled out, is what stops the step being dropped as
220
- // ceremony: skipping it makes the controller's own fix look like tampering.
221
- assert.match(fix, phrase("the next gate refuses on your own fix"));
222
- });
223
-
224
- test("the path the prose tells the controller to run is a real executable", () => {
225
- // The cheapest guard against the whole mechanism being prose about nothing:
226
- // a renamed or deleted script leaves all the assertions above green.
227
- //
228
- // Absence is all this can decide, and the collection it replaces could not
229
- // decide more: the capture group was a fixed literal, so the Set it filled
230
- // held one element or none and `size === 1` was "the name appears somewhere"
231
- // wearing a cross-site consistency check's clothes.
232
- const SH = "scripts/instruments.sh";
233
- assert.match(RUN_TEAM, phrase("~/.fleet/bin/fleet-run instruments.sh"), "the prose stopped naming the instrument check through the Resolver");
234
- accessSync(join(REPO, SH), constants.X_OK);
235
- });