mandrel 2.119.0 → 2.121.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.
- package/.agents/agents/acceptance-critic.md +4 -0
- package/.agents/agents/story-worker.md +1 -1
- package/.agents/docs/agentrc-reference.json +1 -0
- package/.agents/docs/configuration.md +18 -3
- package/.agents/schemas/acceptance-eval-verdict.schema.json +6 -1
- package/.agents/schemas/agentrc.schema.json +11 -2
- package/.agents/schemas/lifecycle/merge.unlanded.schema.json +2 -1
- package/.agents/schemas/story-deliver-terminal.schema.json +1 -0
- package/.agents/scripts/acceptance-eval.js +125 -13
- package/.agents/scripts/evidence-gate.js +15 -2
- package/.agents/scripts/lib/baselines/crap-preview-scan.js +1 -0
- package/.agents/scripts/lib/baselines/git-base.js +43 -0
- package/.agents/scripts/lib/baselines/kinds/_crap-new-method-gate.js +29 -5
- package/.agents/scripts/lib/baselines/kinds/crap.js +7 -1
- package/.agents/scripts/lib/baselines/kinds/kind-factory.js +81 -52
- package/.agents/scripts/lib/close-validation/projections/advisories.js +1 -0
- package/.agents/scripts/lib/close-validation/projections/crap.js +3 -0
- package/.agents/scripts/lib/config/gates/coverage.schema.js +1 -1
- package/.agents/scripts/lib/config/gates/crap.schema.js +7 -0
- package/.agents/scripts/lib/config/quality.js +13 -6
- package/.agents/scripts/lib/config-settings-schema.js +1 -1
- package/.agents/scripts/lib/generated/agentrc-validator.js +2 -2
- package/.agents/scripts/lib/observability/handoff-telemetry.js +1 -0
- package/.agents/scripts/lib/orchestrate/inventory.js +15 -0
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +65 -6
- package/.agents/scripts/lib/orchestration/check-baselines/phases/compare.js +34 -2
- package/.agents/scripts/lib/orchestration/check-baselines/phases/fail-detail.js +7 -2
- package/.agents/scripts/lib/orchestration/handoff-changed-tests.js +67 -0
- package/.agents/scripts/lib/orchestration/handoff-gates.js +2 -0
- package/.agents/scripts/lib/orchestration/handoff-suite-of-record.js +25 -10
- package/.agents/scripts/lib/orchestration/merge-block-class.js +1 -0
- package/.agents/scripts/lib/orchestration/merge-queue.js +155 -14
- package/.agents/scripts/lib/orchestration/preflight-lanes.js +2 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +131 -18
- package/.agents/scripts/lib/orchestration/story-handoff.js +24 -1
- package/.agents/scripts/lib/orchestration/ticket-validator.js +35 -0
- package/.agents/scripts/lib/orchestration/verify-credit.js +144 -0
- package/.agents/scripts/lib/validation-evidence.js +27 -0
- package/.agents/workflows/helpers/acceptance-self-eval.md +9 -1
- package/.agents/workflows/helpers/deliver-digest.md +7 -8
- package/.agents/workflows/helpers/deliver-reference.md +17 -0
- package/.agents/workflows/helpers/deliver-story-reference.md +1 -1
- package/.agents/workflows/helpers/plan-reference.md +3 -1
- package/docs/CHANGELOG.md +23 -0
- package/lib/cli/doctor-checks/suite-ownership.js +42 -0
- package/lib/cli/registry.js +6 -10
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// lib/cli/doctor-checks/suite-ownership.js — Doctor check: suite-ownership.
|
|
2
|
+
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import { readEffectiveAgentrc } from './effective-agentrc.js';
|
|
5
|
+
|
|
6
|
+
const KEY = 'delivery.quality.gates.coverage';
|
|
7
|
+
|
|
8
|
+
const isSet = (value) => typeof value === 'string' && value.trim().length > 0;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Advisory: who runs the suite before a PR. Reports a suite owned by both the
|
|
12
|
+
* handoff and CI (`ciRatchetCheck` set, posture local), and a `ci` posture
|
|
13
|
+
* with no `project.commands.testChanged` guard. Never fails.
|
|
14
|
+
*
|
|
15
|
+
* @param {{ projectRoot?: string, cwd?: () => string, fsImpl?: { readFileSync: Function, existsSync: Function } }} [opts]
|
|
16
|
+
* @returns {Promise<{ ok: true, detail: string }>}
|
|
17
|
+
*/
|
|
18
|
+
export async function runSuiteOwnership({
|
|
19
|
+
projectRoot,
|
|
20
|
+
cwd,
|
|
21
|
+
fsImpl = fs,
|
|
22
|
+
} = {}) {
|
|
23
|
+
const root = projectRoot ?? (cwd ?? (() => process.cwd()))();
|
|
24
|
+
const agentrc = readEffectiveAgentrc(root, fsImpl);
|
|
25
|
+
const gate = agentrc?.delivery?.quality?.gates?.coverage ?? {};
|
|
26
|
+
const guard = agentrc?.project?.commands?.testChanged;
|
|
27
|
+
if (gate.suiteOfRecord === 'ci') {
|
|
28
|
+
return {
|
|
29
|
+
ok: true,
|
|
30
|
+
detail: isSet(guard)
|
|
31
|
+
? `CI owns the suite; the handoff runs \`${guard.trim()}\` (project.commands.testChanged) as a changed-tests guard`
|
|
32
|
+
: 'CI owns the suite and no test runs before the PR — set project.commands.testChanged to run a changed-tests guard at the handoff',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (isSet(gate.ciRatchetCheck)) {
|
|
36
|
+
return {
|
|
37
|
+
ok: true,
|
|
38
|
+
detail: `the suite is owned by both the handoff and CI ("${gate.ciRatchetCheck}") — set ${KEY}.suiteOfRecord: "ci" to make CI its owner, plus project.commands.testChanged for a changed-tests guard`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return { ok: true, detail: 'the handoff owns the suite' };
|
|
42
|
+
}
|
package/lib/cli/registry.js
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
runRuntimeDeps,
|
|
28
28
|
} from './doctor-checks/runtime-deps.js';
|
|
29
29
|
import { spawn } from './doctor-checks/spawn.js';
|
|
30
|
+
import { runSuiteOwnership } from './doctor-checks/suite-ownership.js';
|
|
30
31
|
import {
|
|
31
32
|
runAgentsInSync,
|
|
32
33
|
runCommandsInSync,
|
|
@@ -53,6 +54,8 @@ export {
|
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
/** `advisory: true` marks a check whose `run()` never fails. */
|
|
57
|
+
const advisory = (name, run) => ({ name, advisory: true, run });
|
|
58
|
+
|
|
56
59
|
export const registry = [
|
|
57
60
|
{
|
|
58
61
|
name: 'node-version',
|
|
@@ -129,20 +132,13 @@ export const registry = [
|
|
|
129
132
|
name: 'pin-current',
|
|
130
133
|
run: (opts) => runPinCurrent(opts),
|
|
131
134
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
advisory: true,
|
|
135
|
-
run: (opts) => runVersionCurrent(opts),
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: 'test-credit-path',
|
|
139
|
-
advisory: true,
|
|
140
|
-
run: (opts) => runTestCreditPath(opts),
|
|
141
|
-
},
|
|
135
|
+
advisory('version-current', (opts) => runVersionCurrent(opts)),
|
|
136
|
+
advisory('test-credit-path', (opts) => runTestCreditPath(opts)),
|
|
142
137
|
{
|
|
143
138
|
name: 'coverage-ratchet',
|
|
144
139
|
run: (opts) => runCoverageRatchet(opts),
|
|
145
140
|
},
|
|
141
|
+
advisory('suite-ownership', (opts) => runSuiteOwnership(opts)),
|
|
146
142
|
];
|
|
147
143
|
|
|
148
144
|
export default registry;
|
package/package.json
CHANGED