mandrel 2.98.0 → 2.101.0

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 (46) hide show
  1. package/.agents/agents/story-worker.md +7 -1
  2. package/.agents/audit-checklists/quality.md +1 -0
  3. package/.agents/docs/agentrc-reference.json +3 -0
  4. package/.agents/docs/configuration.md +3 -0
  5. package/.agents/rules/api-conventions.md +4 -0
  6. package/.agents/rules/ci-remediation.md +8 -0
  7. package/.agents/rules/testing-standards.md +19 -1
  8. package/.agents/schemas/agentrc.schema.json +26 -0
  9. package/.agents/schemas/story-deliver-terminal.schema.json +17 -3
  10. package/.agents/schemas/validation-evidence.schema.json +10 -0
  11. package/.agents/scripts/lib/close-lock-events.js +18 -5
  12. package/.agents/scripts/lib/close-validation/gates.js +6 -1
  13. package/.agents/scripts/lib/close-validation/runner.js +10 -11
  14. package/.agents/scripts/lib/close-validation/test-delta.js +124 -0
  15. package/.agents/scripts/lib/config/pull-request.js +25 -0
  16. package/.agents/scripts/lib/config-settings-schema-delivery.js +22 -0
  17. package/.agents/scripts/lib/config-settings-schema.js +5 -0
  18. package/.agents/scripts/lib/coverage-capture-delta.js +2 -1
  19. package/.agents/scripts/lib/generated/agentrc-validator.js +2 -2
  20. package/.agents/scripts/lib/git/sync-from-base.js +4 -2
  21. package/.agents/scripts/lib/orchestration/ci-red-handling.js +4 -3
  22. package/.agents/scripts/lib/orchestration/ci-rerun-guard.js +81 -25
  23. package/.agents/scripts/lib/orchestration/handoff-state.js +41 -0
  24. package/.agents/scripts/lib/orchestration/review-providers/code-review.js +97 -28
  25. package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +7 -0
  26. package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +22 -4
  27. package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +104 -57
  28. package/.agents/scripts/lib/orchestration/single-story-close/phases/merge-wait-recovery.js +16 -16
  29. package/.agents/scripts/lib/orchestration/single-story-close/phases/normalize-pr-title.js +28 -13
  30. package/.agents/scripts/lib/orchestration/single-story-close/phases/open-pr.js +1 -0
  31. package/.agents/scripts/lib/orchestration/single-story-close/phases/pr-body-trailers.js +38 -0
  32. package/.agents/scripts/lib/orchestration/single-story-close/phases/pre-push.js +24 -16
  33. package/.agents/scripts/lib/orchestration/single-story-close/phases/pull-request.js +18 -7
  34. package/.agents/scripts/lib/orchestration/single-story-close/runner.js +60 -34
  35. package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +1 -1
  36. package/.agents/scripts/lib/orchestration/story-handoff.js +36 -9
  37. package/.agents/scripts/lib/test-run-credit.js +26 -0
  38. package/.agents/scripts/lib/test-tiers.js +14 -10
  39. package/.agents/scripts/lib/validation-evidence.js +6 -0
  40. package/.agents/scripts/run-tests.js +162 -92
  41. package/.agents/skills/core/code-review-and-quality/SKILL.md +1 -1
  42. package/.agents/workflows/audit-quality.md +7 -0
  43. package/.agents/workflows/helpers/code-review.md +10 -0
  44. package/.agents/workflows/helpers/deliver-reference.md +28 -1
  45. package/docs/CHANGELOG.md +33 -0
  46. package/package.json +1 -1
@@ -5,19 +5,20 @@
5
5
  * Cross-platform driver for `npm test`. Cleanup runs in-process so reserved
6
6
  * temp artefacts are removed even when tests fail (`posttest` would not run).
7
7
  *
8
- * The child env unsets `NOTIFICATION_WEBHOOK_URL` so no test POSTs to a live
8
+ * The tier runs through one in-process `node:test` `run()` call with process
9
+ * isolation: files reach each child one path at a time, so no command line
10
+ * ever carries the whole tier. Children inherit this process's env and cwd
11
+ * (Node 22's `run()` takes neither option), so both are swapped for the run.
12
+ * The env unsets `NOTIFICATION_WEBHOOK_URL` so no test POSTs to a live
9
13
  * webhook from `.env` (`MANDREL_ALLOW_TEST_WEBHOOKS=1` opts back in).
10
14
  *
11
- * Every tier enumerates explicit file targets (`node --test` has no negative
12
- * pattern), which overflows the Windows ~32 767-char command line, so targets
13
- * are chunked into one spawn per chunk.
14
- *
15
15
  * A green full-tier run in a `story-<id>` checkout deposits close's `test`
16
16
  * gate evidence.
17
17
  */
18
18
 
19
- import { spawnSync } from 'node:child_process';
20
19
  import path from 'node:path';
20
+ import { run } from 'node:test';
21
+ import { spec, tap } from 'node:test/reporters';
21
22
  import { fileURLToPath } from 'node:url';
22
23
  import { assertNoReservedIdStreams } from './check-test-temp-hygiene.js';
23
24
  import { cleanupRepoTestTempArtifacts } from './cleanup-repo-test-temp.js';
@@ -31,11 +32,21 @@ import {
31
32
  TEST_CONCURRENCY_MIN,
32
33
  TEST_RUNNER_FLAGS,
33
34
  } from './lib/test-runner-contract.js';
34
- import { listTestFilesForTier, parseTierArgv } from './lib/test-tiers.js';
35
+ import {
36
+ listTestFilesForTier,
37
+ PASSTHROUGH_FLAGS,
38
+ parseTierArgv,
39
+ unrecognizedArgument,
40
+ } from './lib/test-tiers.js';
35
41
 
36
42
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
37
43
  const ROOT = path.resolve(__dirname, '..', '..');
38
44
 
45
+ /** Child node flags, derived from the shared declaration (module mocks). */
46
+ const CHILD_EXEC_ARGV = TEST_RUNNER_FLAGS.filter((f) =>
47
+ f.startsWith('--experimental-'),
48
+ );
49
+
39
50
  export {
40
51
  resolveTestConcurrency,
41
52
  TEST_CONCURRENCY_MAX,
@@ -43,52 +54,6 @@ export {
43
54
  TEST_RUNNER_FLAGS,
44
55
  };
45
56
 
46
- /**
47
- * Per-spawn budget for the joined targets. Windows: ~a quarter of the
48
- * 32 767-char ceiling, leaving room for exe path and flags. POSIX `ARG_MAX` is
49
- * far larger, so its budget keeps a tier in one spawn (each extra chunk pays a
50
- * runner start-up and idles cores at its tail).
51
- */
52
- export const MAX_TARGET_CHARS = 8000;
53
- export const POSIX_MAX_TARGET_CHARS = 100_000;
54
-
55
- /**
56
- * @param {NodeJS.Platform} [platform]
57
- * @returns {number}
58
- */
59
- export function resolveMaxTargetChars(platform = process.platform) {
60
- return platform === 'win32' ? MAX_TARGET_CHARS : POSIX_MAX_TARGET_CHARS;
61
- }
62
-
63
- /**
64
- * Order-preserving chunks with joined length ≤ `maxChars`. An oversized
65
- * target gets its own chunk; an empty list yields one empty chunk so the
66
- * caller still spawns once.
67
- *
68
- * @param {string[]} targets
69
- * @param {number} [maxChars]
70
- * @returns {string[][]}
71
- */
72
- export function chunkTestTargets(targets, maxChars = MAX_TARGET_CHARS) {
73
- const chunks = [];
74
- let current = [];
75
- let currentLen = 0;
76
-
77
- for (const target of targets) {
78
- const addition = target.length + (current.length > 0 ? 1 : 0);
79
- if (current.length > 0 && currentLen + addition > maxChars) {
80
- chunks.push(current);
81
- current = [];
82
- currentLen = 0;
83
- }
84
- current.push(target);
85
- currentLen += target.length + (current.length > 1 ? 1 : 0);
86
- }
87
-
88
- if (current.length > 0) chunks.push(current);
89
- return chunks.length > 0 ? chunks : [[]];
90
- }
91
-
92
57
  /**
93
58
  * Every flag must precede the targets: Node stops parsing options at the
94
59
  * first positional and reads a later flag as a file pattern. Hence
@@ -116,61 +81,166 @@ export function buildNodeTestArgs({
116
81
  ];
117
82
  }
118
83
 
119
- export function runTestSuite({
84
+ const SHARD_RE = /^(\d+)\/(\d+)$/;
85
+
86
+ /** `i/n` with 1 ≤ i ≤ n, else null. */
87
+ function parseShardValue(raw) {
88
+ const match = SHARD_RE.exec(raw ?? '');
89
+ const index = Number(match?.[1]);
90
+ const total = Number(match?.[2]);
91
+ return index >= 1 && index <= total ? { index, total } : null;
92
+ }
93
+
94
+ /**
95
+ * Pull `--shard <i>/<n>` or `--shard=<i>/<n>` out of argv; a malformed or
96
+ * out-of-range value throws the unrecognized-argument error.
97
+ */
98
+ export function extractShard(argv) {
99
+ const at = argv.findIndex((a) => a === '--shard' || a.startsWith('--shard='));
100
+ if (at === -1) return { shard: null, argv };
101
+ const span = argv[at] === '--shard' ? 2 : 1;
102
+ const flag = argv.slice(at, at + span).join(' ');
103
+ const shard = parseShardValue(flag.slice('--shard '.length));
104
+ if (!shard) throw unrecognizedArgument([flag]);
105
+ return { shard, argv: argv.filter((_, i) => i < at || i >= at + span) };
106
+ }
107
+
108
+ /**
109
+ * Shard `i` of `n` keeps every file whose index ≡ i-1 (mod n) — the rule
110
+ * `node --test --test-shard` applies — so shards partition the list.
111
+ */
112
+ export function shardTestFiles(files, shard) {
113
+ if (!shard) return files;
114
+ return files.filter((_, i) => i % shard.total === shard.index - 1);
115
+ }
116
+
117
+ /**
118
+ * Map the pass-through argv onto `run()` options. A bare positional is an
119
+ * extra file, as it was on the old `node --test` command line.
120
+ *
121
+ * @param {string[]} rest
122
+ * @returns {{ testNamePatterns?: string[], only: boolean, files: string[] }}
123
+ */
124
+ export function toRunOptions(rest) {
125
+ const [namePattern, onlyFlag] = PASSTHROUGH_FLAGS;
126
+ const patterns = [];
127
+ const files = [];
128
+ let only = false;
129
+ for (let i = 0; i < rest.length; i += 1) {
130
+ const arg = rest[i];
131
+ if (arg === namePattern) {
132
+ i += 1;
133
+ patterns.push(rest[i]);
134
+ } else if (arg.startsWith(`${namePattern}=`)) {
135
+ patterns.push(arg.slice(namePattern.length + 1));
136
+ } else if (arg === onlyFlag) {
137
+ only = true;
138
+ } else {
139
+ files.push(arg);
140
+ }
141
+ }
142
+ return {
143
+ ...(patterns.length > 0 ? { testNamePatterns: patterns } : {}),
144
+ only,
145
+ files,
146
+ };
147
+ }
148
+
149
+ function replaceProcessEnv(next) {
150
+ for (const key of Object.keys(process.env)) {
151
+ if (!Object.hasOwn(next, key)) delete process.env[key];
152
+ }
153
+ Object.assign(process.env, next);
154
+ }
155
+
156
+ /**
157
+ * The default runner: one `run()` over `files`, reported as TAP off a TTY
158
+ * (CI logs, `test-output.txt`) and spec on one. Resolves 1 when any non-todo
159
+ * test fails — a crashing file reports as a failed file-level test.
160
+ */
161
+ export async function runNodeTests({
162
+ files,
163
+ cwd,
164
+ env,
165
+ testNamePatterns,
166
+ only = false,
167
+ stdout = process.stdout,
168
+ }) {
169
+ const savedEnv = { ...process.env };
170
+ const savedCwd = process.cwd();
171
+ replaceProcessEnv(env);
172
+ process.chdir(cwd);
173
+ let failed = false;
174
+ try {
175
+ const stream = run({
176
+ files,
177
+ isolation: 'process',
178
+ concurrency: resolveTestConcurrency(),
179
+ execArgv: CHILD_EXEC_ARGV,
180
+ testNamePatterns,
181
+ only,
182
+ });
183
+ stream.on('test:fail', (data) => {
184
+ if (!data.todo) failed = true;
185
+ });
186
+ for await (const chunk of stream.compose(stdout.isTTY ? new spec() : tap)) {
187
+ stdout.write(chunk);
188
+ }
189
+ } finally {
190
+ process.chdir(savedCwd);
191
+ replaceProcessEnv(savedEnv);
192
+ }
193
+ return failed ? 1 : 0;
194
+ }
195
+
196
+ export async function runTestSuite({
120
197
  argv = process.argv.slice(2),
121
198
  cwd = ROOT,
122
- spawn = spawnSync,
199
+ runTests = runNodeTests,
123
200
  cleanup = cleanupRepoTestTempArtifacts,
124
201
  listTargets = listTestFilesForTier,
125
- maxTargetChars = resolveMaxTargetChars(),
126
202
  fixtureStreamGuard = assertNoReservedIdStreams,
127
203
  preflight = runTierPreflight,
128
204
  depositCredit = reportTestRunCredit,
205
+ stdout = process.stdout,
129
206
  } = {}) {
130
- const { tier, rest } = parseTierArgv(argv);
207
+ const { shard, argv: unsharded } = extractShard(argv);
208
+ const { tier, rest } = parseTierArgv(unsharded);
131
209
 
132
210
  // Nothing has been created yet, so a refusal needs no cleanup.
133
211
  const preflightStatus = preflight({ tier, repoRoot: cwd });
134
212
  if (preflightStatus !== 0) return preflightStatus;
135
213
 
136
- const targets = listTargets(tier, cwd);
137
- const chunks = chunkTestTargets(targets, maxTargetChars);
214
+ const { files: extraFiles, ...options } = toRunOptions(rest);
215
+ const files = shardTestFiles(
216
+ [...new Set([...listTargets(tier, cwd), ...extraFiles])],
217
+ shard,
218
+ );
138
219
 
139
- const env = buildWebhookSafeTestEnv(process.env);
140
220
  const startedAt = Date.now();
141
- let status = 0;
142
- let spawnError = null;
143
-
144
- for (const chunk of chunks) {
145
- const testRun = spawn(
146
- process.execPath,
147
- // Pass-through flags precede the targets (see `buildNodeTestArgs`).
148
- [...TEST_RUNNER_FLAGS, ...rest, ...chunk],
149
- { cwd, stdio: 'inherit', env },
150
- );
151
- if (testRun.error) {
152
- spawnError = testRun.error;
153
- break;
154
- }
155
- const chunkStatus = testRun.status ?? 1;
156
- // First non-zero wins; later chunks still run to report every failure.
157
- if (chunkStatus !== 0 && status === 0) status = chunkStatus;
221
+ let status = 1;
222
+ try {
223
+ status = await runTests({
224
+ ...options,
225
+ files,
226
+ cwd,
227
+ env: buildWebhookSafeTestEnv(process.env),
228
+ stdout,
229
+ });
230
+ } finally {
231
+ cleanup({ repoRoot: cwd });
158
232
  }
159
233
 
160
- cleanup({ repoRoot: cwd });
161
-
162
234
  // Fail a run whose fixture telemetry leaked into the live signals tree,
163
235
  // where the retro graduator would count it as real evidence.
164
236
  const polluted = fixtureStreamGuard({ cwd });
165
237
  if (polluted !== 0 && status === 0) status = polluted;
166
238
 
167
- if (spawnError) {
168
- throw spawnError;
239
+ // Best-effort; never affects the exit code. A shard is not a full run.
240
+ if (!shard) {
241
+ depositCredit({ cwd, tier, status, durationMs: Date.now() - startedAt });
169
242
  }
170
243
 
171
- // Best-effort; never affects the exit code.
172
- depositCredit({ cwd, tier, status, durationMs: Date.now() - startedAt });
173
-
174
244
  return status;
175
245
  }
176
246
 
@@ -188,16 +258,16 @@ Flags:
188
258
  Tier to run. Default: full — every test file except
189
259
  \`tests/e2e/**\`, which only \`--tier e2e\` runs.
190
260
  --test-name-pattern <re>, --test-only
191
- The documented \`node --test\` pass-throughs, forwarded
192
- verbatim in flag position, ahead of the file targets.
193
- Any other \`--flag\` is rejected rather than forwarded:
194
- \`node --test\` reads an unrecognized flag as another
195
- file pattern, so forwarding one ran nothing and
196
- still exited 0.
261
+ The documented \`node --test\` pass-throughs, mapped
262
+ onto the \`run()\` options \`testNamePatterns\` / \`only\`.
263
+ Any other \`--flag\` is rejected rather than forwarded,
264
+ so a typo never runs nothing and still exits 0.
265
+ --shard <i>/<n> Run shard i of n (1 ≤ i ≤ n) of the tier's sorted
266
+ file list; the n shards partition it.
197
267
  --help Show this message.
198
268
 
199
- Exits with the first non-zero \`node --test\` chunk status, or 2 when the tier
200
- preflight refuses to start the suite.
269
+ Exits 1 when any non-todo test fails, or 2 when the tier preflight refuses
270
+ to start the suite.
201
271
  `;
202
272
 
203
273
  runAsCli(import.meta.url, async () => runTestSuite(), {
@@ -16,7 +16,7 @@ description:
16
16
  - Apply the **five-axis review** to every change: **Correctness, Readability & Simplicity, Architecture, Security, Performance**.
17
17
  - Flag dead code artifacts (`_unused` vars, backwards-compat shims, `// removed` comments) and require their removal before merge.
18
18
  - Defer to `.agents/rules/security-baseline.md` and the `security-and-hardening` skill for security review; explicit checks include input validation, no hardcoded secrets, parameterized queries, encoded output, authn+authz, and treating external data as untrusted.
19
- - Bug-fix reviews cover **both** the fix and the regression test; a fix without a failing-then-passing test is not approvable.
19
+ - Bug-fix reviews cover **both** the fix and the regression test; a fix without a failing-then-passing test is not approvable, and neither is one whose commit body states no `Behaviour delta:` or whose diff changes behaviour outside it (`rules/testing-standards.md` § Applying the Standards).
20
20
  - **Refactoring is post-green and behaviour-preserving.** Run the refactor pass only when the suite is already green and gates pass; inputs, outputs, side effects, error semantics, and ordering MUST be identical before and after, and existing tests MUST keep passing **without modification** (if a test had to change, behaviour changed — revert).
21
21
  - **Lower CRAP by lowering complexity, and remove duplication at the root.** Target the highest-CRAP well-covered functions and the largest verbatim duplications by measurement (`check-baselines.js`), not by smell; extract one well-named helper rather than leaving near-copies. CRAP must not rise and maintainability must not fall on any touched file, and no gate, floor, or threshold may be retuned to make the pass "succeed".
22
22
 
@@ -187,6 +187,13 @@ Evaluate the gathered context against the following test quality dimensions:
187
187
  - Category: file under `Coverage`. A property test whose seed is
188
188
  neither pinned nor printed on failure goes under `Flakiness`: a red that
189
189
  cannot be reproduced breaks the reproducibility the rubric demands.
190
+ - **Vacuous property tests.** An existing property test is itself a
191
+ finding when its generator cannot reach the inputs the stated
192
+ invariant constrains (a domain that excludes the edge, a filter that
193
+ discards it), or when its assertion would hold for any implementation.
194
+ File it under `Coverage` at **Medium**, or **High** under the High
195
+ conditions above. Name the unreachable input or the trivially true
196
+ assertion.
190
197
  - **Name the property.** Each finding states the invariant as a testable
191
198
  property (e.g. `decode(encode(x)) === x`; "no transition leaves a
192
199
  terminal state") plus its generator shape (the input domain to draw
@@ -229,6 +229,16 @@ spec decision, a swallowed error on a real failure path) is a 🔴.
229
229
  disabled-code block removed to make a diff look clean, or a lint-suppression
230
230
  comment (`biome-ignore`, `eslint-disable`, `@ts-expect-error`) added to mute
231
231
  a real diagnostic instead of fixing it.
232
+ - **Over-broad fixes** — a bug fix that reaches green by changing more than
233
+ the bug: the fix commit's body carries no `Behaviour delta:` line, or the
234
+ diff changes behaviour for inputs outside the stated delta (a widened
235
+ guard, a new early return, a catch-all branch, a default that now applies
236
+ everywhere), or the regression test asserts no input just outside the
237
+ delta unchanged.
238
+ - **Vacuous properties** — a new property test that constrains nothing: no
239
+ `Failure witness:` line records a mutant it was seen to fail against, its
240
+ generator cannot reach the inputs the stated invariant constrains, or its
241
+ assertion would hold for any implementation.
232
242
 
233
243
  For every hit, name the file and line, the taxonomy category, and *why the
234
244
  code — not the check — should have changed*. A finding here is legitimate only
@@ -485,8 +485,35 @@ full-suite lock wait expired) logs a deferred line and the close settles
485
485
  line naming host contention — neither is reported as failing tests.
486
486
 
487
487
  Every full-suite run ends on `⏲ suite timings: lockWaitMs=… hostWaitMs=…
488
- testRunMs=…`, which close carries as the envelope's `suiteTimings`. The
488
+ testRunMs=…`. The handoff envelope carries its credited run's figures as
489
+ top-level `lockWait` / `suiteTimings` (null when the depositor ran no suite).
490
+ The close terminal's `suiteTimings` names its `source`: `close` when close
491
+ spawned the suite, `credited-run` when it honoured the handoff's credit;
492
+ `spawns[]` lists every spawn of that run. A `lockWaitMs` large next to
493
+ `testRunMs` is serialization behind sibling suites, not a slow suite — the
494
+ cue for `delivery.execution.workloads`. The
489
495
  `coverage.timeoutMs` clock starts at spawn, never in the lock queue; a suite
490
496
  that writes `$MANDREL_SUITE_READY_FILE` when its tests start (after a
491
497
  consumer load gate) gets a fresh bound for them, so worst-case wall is lock
492
498
  wait + 2 × `timeoutMs`.
499
+
500
+ **Delta re-credit after a base move.** When close's base sync merged
501
+ incoming paths (`BASE MOVED`), the `test` gate is the suite gate, the
502
+ pre-sync head holds `test` credit and `project.commands.testChanged` is set,
503
+ close runs that command instead of the full suite, with the pre-sync head in
504
+ `MANDREL_CHANGED_SINCE`, under the full-suite lock. Its log and progress line
505
+ read `test (delta since <sha12>, <n> incoming path(s))`; a green run deposits
506
+ `test` evidence for the merged tree (`scope: delta`, `since: <sha>`) under
507
+ the full-suite identity, so a re-close is credited, and a red one fails the
508
+ close like a red full run. An incoming coverage-config file or Story file,
509
+ no credit, no command, or coverage-capture running the suite logs
510
+ `test delta re-credit not eligible (<reason>)` and runs the full suite — the
511
+ same delta rules as the coverage capture's own delta refresh.
512
+
513
+ **PR-body trailers.** Close appends each git trailer named in
514
+ `delivery.pullRequest.bodyTrailers` (last branch commit carrying it wins) to
515
+ the PR body it opens; workers record one with `git commit --trailer`.
516
+
517
+ **Early merged-PR probe.** Before any sync or gate, close reads the head's
518
+ pull requests; a merged one whose head every surviving branch tip equals
519
+ short-circuits to the land tail instead of re-validating landed work.
package/docs/CHANGELOG.md CHANGED
@@ -15,6 +15,39 @@ All notable changes to this project will be documented in this file.
15
15
  -->
16
16
  <!-- markdownlint-disable-file MD004 MD012 MD037 -->
17
17
 
18
+ ## [2.101.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.100.0...mandrel-v2.101.0) (2026-10-23)
19
+
20
+
21
+ ### Added
22
+
23
+ * close lifts consumer-declared git trailers from the branch commits into the pull-request body ([#5875](https://github.com/dsj1984/mandrel/issues/5875)) ([#5885](https://github.com/dsj1984/mandrel/issues/5885)) ([443ee08](https://github.com/dsj1984/mandrel/commit/443ee08ace3ba785a34577b5b6a4822eeb238c61))
24
+ * confirm-merge re-arms auto-merge once the advisory check that disarmed it reports green on the same head, and the block names that check ([#5876](https://github.com/dsj1984/mandrel/issues/5876)) ([#5886](https://github.com/dsj1984/mandrel/issues/5886)) ([85a8aac](https://github.com/dsj1984/mandrel/commit/85a8aacfc6e4525d4b3d10aae859ac9dffd55c31))
25
+ * handoff and close envelopes carry the credited run's lock wait and suite timings, so the serialization cost of a delivery is visible per run ([#5879](https://github.com/dsj1984/mandrel/issues/5879)) ([#5888](https://github.com/dsj1984/mandrel/issues/5888)) ([68e9683](https://github.com/dsj1984/mandrel/commit/68e9683ccc2c41b16ecaf0b71485ae951d4b5ec1))
26
+ * the code-review provider reviews a large diff file by file within the prompt cap instead of truncating it ([#5878](https://github.com/dsj1984/mandrel/issues/5878)) ([#5882](https://github.com/dsj1984/mandrel/issues/5882)) ([e64a84e](https://github.com/dsj1984/mandrel/commit/e64a84e780c6546723466d9c4df1d46cbfb3ee46))
27
+ * the lint driver names every task that failed, with its exit code, and flags a crash exit ([#5889](https://github.com/dsj1984/mandrel/issues/5889)) ([#5891](https://github.com/dsj1984/mandrel/issues/5891)) ([7db5a92](https://github.com/dsj1984/mandrel/commit/7db5a923679fbe8158c4eb1541ed4cc7cc51447e))
28
+ * when the base moves between handoff and close, the `test` gate re-credits by running only the tests the incoming commits affect ([#5880](https://github.com/dsj1984/mandrel/issues/5880)) ([#5890](https://github.com/dsj1984/mandrel/issues/5890)) ([66423e3](https://github.com/dsj1984/mandrel/commit/66423e36c06dcfdb44564516c74d1cc829bc932d))
29
+
30
+
31
+ ### Fixed
32
+
33
+ * close probes the head's pull request before validation and short-circuits to the land tail when it already merged ([#5877](https://github.com/dsj1984/mandrel/issues/5877)) ([#5887](https://github.com/dsj1984/mandrel/issues/5887)) ([ddc1b52](https://github.com/dsj1984/mandrel/commit/ddc1b52c2f081928c6eff297803c5e60a34ece9c))
34
+ * **deps:** drop the braces audit exception now that GHSA-vfj7-8cjw-p6xm is withdrawn ([#5883](https://github.com/dsj1984/mandrel/issues/5883)) ([364f547](https://github.com/dsj1984/mandrel/commit/364f54705372e26d1b5d1c8d628fc9628940efbf))
35
+
36
+ ## [2.100.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.99.0...mandrel-v2.100.0) (2026-10-23)
37
+
38
+
39
+ ### Fixed
40
+
41
+ * **ci:** guard fromJSON on the release PR output so a release merge can publish (refs [#5872](https://github.com/dsj1984/mandrel/issues/5872)) ([#5873](https://github.com/dsj1984/mandrel/issues/5873)) ([bcf11b9](https://github.com/dsj1984/mandrel/commit/bcf11b9722fe47f42a832218909bdb3cc5495a45))
42
+
43
+ ## [2.99.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.98.0...mandrel-v2.99.0) (2026-10-23)
44
+
45
+
46
+ ### Added
47
+
48
+ * adopt verification-discipline rules: bug-fix behaviour delta, write-time property tests with failure witnesses, caller obligations ([#5863](https://github.com/dsj1984/mandrel/issues/5863)) ([#5864](https://github.com/dsj1984/mandrel/issues/5864)) ([d746c14](https://github.com/dsj1984/mandrel/commit/d746c1442808f3c4d7f39996027e0d57df500b94))
49
+ * cut the required-CI critical path: one-pass node:test orchestrator, sharded Windows Smoke, leaner validate job, ruleset drift guard ([#5866](https://github.com/dsj1984/mandrel/issues/5866)) ([#5871](https://github.com/dsj1984/mandrel/issues/5871)) ([64f01a1](https://github.com/dsj1984/mandrel/commit/64f01a1c6b730c22e48a8fc004490dd613c700e2))
50
+
18
51
  ## [2.98.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.97.0...mandrel-v2.98.0) (2026-10-22)
19
52
 
20
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mandrel",
3
- "version": "2.98.0",
3
+ "version": "2.101.0",
4
4
  "description": "Claude Code-first opinionated workflow framework: instructions, skills, rules, and SDLC workflows that govern AI coding assistants.",
5
5
  "files": [
6
6
  ".agents/",