Skip to content

Commit 4ba219c

Browse files
committed
fix(development-system): reconcile delivery review contracts
Align per-edit checkpoint delivery, terminal review entry, exact-identity readiness, and stale-coordinator recovery across public skills, component guidance, deterministic benchmarks, and behavior fixtures. This removes contradictory sequencing while preserving bounded CI and explicit local-only authority. Closes: 20260901-xige
1 parent a9007d4 commit 4ba219c

21 files changed

Lines changed: 278 additions & 265 deletions

File tree

evals/fixtures/behavior/development-discipline/cases.json

Lines changed: 17 additions & 17 deletions
Large diffs are not rendered by default.

plugins/development-system/components/development-discipline/skills/delivery-workflow/.plugin-eval/benchmark.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"id": "direct-to-trunk",
3232
"title": "Follow direct-to-trunk policy",
3333
"purpose": "Verify that repository-local direct delivery wins over generic pull-request wording.",
34-
"userInput": "Use the delivery-workflow skill. Repository instructions require direct pushes to main, require CI to reach terminal success, and authorize ordinary pushes; a specialist says to open a PR. Do not perform remote actions. Write delivery-plan.json with scenario=direct-to-trunk, selectedMode, remoteActions (the planned action names), ci.required, ci.status, a nonempty reviewEvidence array, reviewBeforePush, exactRevisionBinding, authorization, failedRunHold, and modes=null.",
34+
"userInput": "Use the delivery-workflow skill. Repository instructions require direct pushes to main, require CI to reach terminal success, and authorize ordinary pushes; a specialist says to open a PR. Every planned increment and acceptance criterion must reach its signed pushed checkpoint before terminal review. Do not perform remote actions. Write delivery-plan.json with scenario=direct-to-trunk, selectedMode, remoteActions (the planned action names), ci.required, ci.status, a nonempty reviewEvidence array, checkpointDeliveredBeforeTerminalReview, cleanReviewCreatesCheckpoint, exactRevisionBinding, authorization, failedRunHold, and modes=null.",
3535
"successChecklist": [
3636
"delivery-plan.json selects direct-to-trunk and does not invent a PR.",
37-
"The plan reviews before the first push and binds CI to the exact pushed revision.",
37+
"The plan delivers every passing checkpoint before terminal review, creates no new checkpoint after clean unchanged review, and binds CI to the exact final-reviewed revision.",
3838
"The plan does not ask again for the already authorized ordinary push."
3939
]
4040
},
@@ -52,33 +52,34 @@
5252
{
5353
"id": "final-review-ci-hold",
5454
"title": "Compose final review with delivery mode",
55-
"purpose": "Verify that unpushed modes use local evidence while a known failed pushed build remains a hold.",
56-
"userInput": "Use the delivery-workflow skill. Compare an unpushed direct-to-trunk change, a local-only change, and a PR whose latest pushed CI failed. Do not perform remote actions. Write delivery-plan.json with scenario=final-review-ci-hold, selectedMode=comparison, empty remoteActions, ci.required, ci.status, a nonempty reviewEvidence array, failedRunHold, and modes containing directToTrunk.evidence, localOnly.evidence, and pullRequest.status.",
55+
"purpose": "Verify that terminal review consumes a delivery-mode-specific exact identity while a known failed pushed build remains a hold.",
56+
"userInput": "Use the delivery-workflow skill. Compare a direct-to-trunk change whose final checkpoint is already pushed, a local-only change whose final exact snapshot is recorded, and a PR whose exact current-head CI failed. Do not perform remote actions. Write delivery-plan.json with scenario=final-review-ci-hold, selectedMode=comparison, empty remoteActions, ci.required, ci.status, a nonempty reviewEvidence array, failedRunHold, cleanReviewCreatesCheckpoint, and modes containing directToTrunk.evidence, directToTrunk.readiness, localOnly.evidence, localOnly.readiness, and pullRequest.status.",
5757
"successChecklist": [
58-
"delivery-plan.json uses local evidence for unpushed direct-to-trunk and local-only review without fabricating a push.",
58+
"delivery-plan.json reviews the exact already-pushed direct-to-trunk SHA and exact recorded local-only identity without fabricating a post-review checkpoint.",
59+
"Readiness uses terminal-success CI for the exact final-reviewed remote SHA and fresh exact-local evidence for local-only.",
5960
"The failed PR remains held under CI failure follow-up until replacement terminal success.",
6061
"The plan says changing modes cannot erase a known failed-run hold."
6162
]
6263
},
6364
{
64-
"id": "content-identical-commit-boundary",
65-
"title": "Cross the final-review delivery boundary once",
66-
"purpose": "Verify that a content-identical commit does not reopen source review while real source changes do and exact-commit gates remain mandatory.",
67-
"userInput": "Use delivery-workflow. Final review completed against the final uncommitted source snapshot. A signed commit contains identical paths, bytes, and modes with the same pinned baseline and requested scope, but the stage-aware review hash changed because HEAD and the staging partition changed. Do not perform remote actions. Write delivery-plan.json with scenario=content-identical-commit-boundary, selectedMode=direct-to-trunk, remoteActions=[push], a nonempty reviewEvidence array, stageAwareHashChanged, reviewedSourceChanged, sourceReviewRestartRequired, postCommitGateRequired, postCommitGateExactRevision, commitMetadataChecksPhase, invalidatesReview keys paths/content/modes/untracked/baseline/requestedScope/stagingPartition/head/signature/commitMetadata, and ci.required/status.",
65+
"id": "clean-review-no-new-checkpoint",
66+
"title": "Keep a clean terminal review on the delivered identity",
67+
"purpose": "Verify that a clean unchanged terminal review of an already-delivered checkpoint does not manufacture another commit or push.",
68+
"userInput": "Use delivery-workflow. Every planned increment and acceptance criterion has reached a signed direct-to-trunk pushed checkpoint. Terminal review completes cleanly against that exact pushed SHA with the immutable ticket-start baseline, and exact-SHA CI is still running. Do not perform remote actions. Write delivery-plan.json with scenario=clean-review-no-new-checkpoint, selectedMode=direct-to-trunk, empty remoteActions, a nonempty reviewEvidence array, terminalReviewIdentity, cleanReviewCreatesCheckpoint, reviewedSourceChanged, sourceReviewRestartRequired, readinessStatus, exactRevisionBinding, and ci.required/status.",
6869
"successChecklist": [
69-
"The content-identical commit does not reopen the completed source review solely because Git partition or metadata changed.",
70-
"Every real source or requested-scope change invalidates review, while active-review hashing remains stage-aware.",
71-
"Post-commit gates, message/signature checks, push, and required CI bind to the exact commit."
70+
"Terminal review consumes the exact already-pushed checkpoint and immutable ticket-start baseline.",
71+
"Clean unchanged review creates no commit, push, or replacement checkpoint.",
72+
"Readiness remains pending until terminal-success CI binds to that exact final-reviewed SHA."
7273
]
7374
},
7475
{
7576
"id": "source-change-invalidates-review",
76-
"title": "Restart review after a real source change",
77-
"purpose": "Verify the delivery boundary cannot preserve a completed review after reviewed source content or paths change.",
78-
"userInput": "Use delivery-workflow. Final review completed, then a delivery hook added a new in-scope untracked source path. Do not perform remote actions. Write delivery-plan.json with scenario=source-change-invalidates-review, reviewedSourceChanged=true, sourceReviewRestartRequired=true, postCommitGateRequired=true, and postCommitGateExactRevision=true.",
77+
"title": "Checkpoint remediation before restarting review",
78+
"purpose": "Verify that a source-changing terminal-review finding completes the normal delivery checkpoint before delta assessment and a fresh full review set.",
79+
"userInput": "Use delivery-workflow. Terminal review of an already-pushed direct-to-trunk checkpoint finds a real source defect, and remediation adds a new in-scope source path. Do not perform remote actions. Write delivery-plan.json with scenario=source-change-invalidates-review, reviewedSourceChanged=true, remediationCheckpointDelivered=true, sourceReviewRestartRequired=true, deltaAssessmentRequired=true, completeLensSetRequired=true, postCommitGateRequired=true, and postCommitGateExactRevision=true.",
7980
"successChecklist": [
80-
"The new in-scope source path invalidates the completed review.",
81-
"The replacement reviewed snapshot still crosses the exact-commit verification gate before push."
81+
"The remediation runs its immediate test, lightweight review, fast gate, signed additive commit, exact verification, and authorized push before review resumes.",
82+
"The delivered replacement identity receives one delta assessment and the complete selected lens set in fresh contexts under the reset."
8283
]
8384
}
8485
]
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
{
2-
"scenario": "content-identical-commit-boundary",
2+
"scenario": "clean-review-no-new-checkpoint",
33
"selectedMode": "direct-to-trunk",
4-
"remoteActions": ["push"],
5-
"ci": { "required": true, "status": "terminal-success" },
6-
"reviewEvidence": ["terminal final review before a later content change"],
7-
"stageAwareHashChanged": true,
4+
"remoteActions": [],
5+
"ci": { "required": true, "status": "running" },
6+
"reviewEvidence": ["terminal review before a later content change"],
7+
"terminalReviewIdentity": "mutable-working-tree",
8+
"cleanReviewCreatesCheckpoint": false,
89
"reviewedSourceChanged": true,
910
"sourceReviewRestartRequired": false,
10-
"postCommitGateRequired": true,
11-
"postCommitGateExactRevision": true,
12-
"commitMetadataChecksPhase": "delivery-verification",
13-
"invalidatesReview": {
14-
"paths": true,
15-
"content": false,
16-
"modes": true,
17-
"untracked": true,
18-
"baseline": true,
19-
"requestedScope": true,
20-
"stagingPartition": false,
21-
"head": false,
22-
"signature": false,
23-
"commitMetadata": false
24-
}
11+
"readinessStatus": "awaiting-exact-sha-ci",
12+
"exactRevisionBinding": false
2513
}
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
{
2-
"scenario": "content-identical-commit-boundary",
2+
"scenario": "clean-review-no-new-checkpoint",
33
"selectedMode": "direct-to-trunk",
44
"remoteActions": ["push"],
5-
"ci": { "required": true, "status": "terminal-success" },
6-
"reviewEvidence": ["terminal final review of the exact source snapshot"],
7-
"stageAwareHashChanged": true,
5+
"ci": { "required": true, "status": "running" },
6+
"reviewEvidence": ["terminal review of the exact already-pushed SHA"],
7+
"terminalReviewIdentity": "exact-pushed-sha",
8+
"cleanReviewCreatesCheckpoint": true,
89
"reviewedSourceChanged": false,
910
"sourceReviewRestartRequired": false,
10-
"postCommitGateRequired": false,
11-
"postCommitGateExactRevision": false,
12-
"commitMetadataChecksPhase": "source-review",
13-
"invalidatesReview": {
14-
"paths": true,
15-
"content": true,
16-
"modes": true,
17-
"untracked": true,
18-
"baseline": true,
19-
"requestedScope": true,
20-
"stagingPartition": false,
21-
"head": false,
22-
"signature": false,
23-
"commitMetadata": false
24-
}
11+
"readinessStatus": "awaiting-exact-sha-ci",
12+
"exactRevisionBinding": true
2513
}
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
{
2-
"scenario": "content-identical-commit-boundary",
2+
"scenario": "clean-review-no-new-checkpoint",
33
"selectedMode": "direct-to-trunk",
4-
"remoteActions": ["push"],
5-
"ci": { "required": true, "status": "terminal-success" },
6-
"reviewEvidence": ["terminal final review of the exact source snapshot"],
7-
"stageAwareHashChanged": true,
4+
"remoteActions": [],
5+
"ci": { "required": true, "status": "running" },
6+
"reviewEvidence": ["terminal review of the exact already-pushed SHA"],
7+
"terminalReviewIdentity": "exact-pushed-sha",
8+
"cleanReviewCreatesCheckpoint": false,
89
"reviewedSourceChanged": false,
910
"sourceReviewRestartRequired": true,
10-
"postCommitGateRequired": true,
11-
"postCommitGateExactRevision": true,
12-
"commitMetadataChecksPhase": "delivery-verification",
13-
"invalidatesReview": {
14-
"paths": true,
15-
"content": true,
16-
"modes": true,
17-
"untracked": true,
18-
"baseline": true,
19-
"requestedScope": true,
20-
"stagingPartition": false,
21-
"head": false,
22-
"signature": false,
23-
"commitMetadata": false
24-
}
11+
"readinessStatus": "awaiting-exact-sha-ci",
12+
"exactRevisionBinding": true
2513
}
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
{
2-
"scenario": "content-identical-commit-boundary",
2+
"scenario": "clean-review-no-new-checkpoint",
33
"selectedMode": "direct-to-trunk",
4-
"remoteActions": ["push"],
5-
"ci": { "required": true, "status": "terminal-success" },
6-
"reviewEvidence": ["terminal final review of the exact source snapshot"],
7-
"stageAwareHashChanged": true,
4+
"remoteActions": [],
5+
"ci": { "required": true, "status": "running" },
6+
"reviewEvidence": ["terminal review of the exact already-pushed SHA"],
7+
"terminalReviewIdentity": "exact-pushed-sha",
8+
"cleanReviewCreatesCheckpoint": false,
89
"reviewedSourceChanged": false,
910
"sourceReviewRestartRequired": false,
10-
"postCommitGateRequired": true,
11-
"postCommitGateExactRevision": true,
12-
"commitMetadataChecksPhase": "delivery-verification",
13-
"invalidatesReview": {
14-
"paths": true,
15-
"content": true,
16-
"modes": true,
17-
"untracked": true,
18-
"baseline": true,
19-
"requestedScope": true,
20-
"stagingPartition": false,
21-
"head": false,
22-
"signature": false,
23-
"commitMetadata": false
24-
}
11+
"readinessStatus": "awaiting-exact-sha-ci",
12+
"exactRevisionBinding": true
2513
}

plugins/development-system/components/development-discipline/skills/delivery-workflow/.plugin-eval/workspace/fixtures/direct-to-trunk-invalid.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"remoteActions": ["push"],
55
"ci": { "required": true, "status": "terminal-success" },
66
"reviewEvidence": ["some review happened"],
7-
"reviewBeforePush": false,
7+
"checkpointDeliveredBeforeTerminalReview": false,
8+
"cleanReviewCreatesCheckpoint": true,
89
"exactRevisionBinding": false,
910
"authorization": "ask-again",
1011
"failedRunHold": false,

plugins/development-system/components/development-discipline/skills/delivery-workflow/.plugin-eval/workspace/fixtures/direct-to-trunk-valid.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"remoteActions": ["push"],
55
"ci": { "required": true, "status": "terminal-success" },
66
"reviewEvidence": [
7-
"local checks and final review passed for the candidate revision"
7+
"each passing increment was lightly reviewed and checkpoint-delivered before terminal review of the exact final SHA"
88
],
9-
"reviewBeforePush": true,
9+
"checkpointDeliveredBeforeTerminalReview": true,
10+
"cleanReviewCreatesCheckpoint": false,
1011
"exactRevisionBinding": true,
1112
"authorization": "standing",
1213
"failedRunHold": false,
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
22
"scenario": "source-change-invalidates-review",
33
"remoteActions": ["push"],
4-
"reviewEvidence": ["replacement source snapshot received terminal review"],
4+
"reviewEvidence": [
5+
"source-changing remediation completed its normal delivery checkpoint before review resumed"
6+
],
57
"ci": { "required": true, "status": "terminal-success" },
68
"reviewedSourceChanged": true,
9+
"remediationCheckpointDelivered": true,
710
"sourceReviewRestartRequired": true,
11+
"deltaAssessmentRequired": true,
12+
"completeLensSetRequired": true,
813
"postCommitGateRequired": true,
914
"postCommitGateExactRevision": true
1015
}

plugins/development-system/components/development-discipline/skills/delivery-workflow/.plugin-eval/workspace/verify-delivery-plan.mjs

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ switch (plan.scenario) {
4040
if (plan.ci.required !== true || plan.ci.status !== "terminal-success") {
4141
fail("required direct-to-trunk CI must reach terminal success");
4242
}
43-
if (plan.reviewBeforePush !== true) {
44-
fail("direct-to-trunk review must happen before the first push");
43+
if (
44+
plan.checkpointDeliveredBeforeTerminalReview !== true ||
45+
plan.cleanReviewCreatesCheckpoint !== false
46+
) {
47+
fail(
48+
"terminal review must consume the delivered checkpoint without creating another one",
49+
);
4550
}
4651
if (plan.exactRevisionBinding !== true) {
4752
fail("CI evidence must bind to the exact pushed revision");
@@ -78,68 +83,49 @@ switch (plan.scenario) {
7883
}
7984
if (
8085
!plan.modes ||
81-
plan.modes.directToTrunk?.evidence !== "local" ||
82-
plan.modes.localOnly?.evidence !== "local" ||
86+
plan.modes.directToTrunk?.evidence !== "exact-pushed-sha" ||
87+
plan.modes.directToTrunk?.readiness !== "exact-sha-terminal-ci" ||
88+
plan.modes.localOnly?.evidence !== "exact-local-identity" ||
89+
plan.modes.localOnly?.readiness !== "fresh-exact-local-evidence" ||
8390
plan.modes.pullRequest?.status !== "blocked"
8491
) {
8592
fail("mode-specific review evidence or PR hold is incorrect");
8693
}
94+
if (plan.cleanReviewCreatesCheckpoint !== false)
95+
fail("clean review must not manufacture a checkpoint");
8796
break;
88-
case "content-identical-commit-boundary": {
97+
case "clean-review-no-new-checkpoint": {
8998
if (plan.selectedMode !== "direct-to-trunk")
90-
fail("content-identical delivery must retain direct-to-trunk mode");
91-
if (!plan.remoteActions.includes("push"))
92-
fail("content-identical delivery must still plan the authorized push");
99+
fail("clean terminal review must retain direct-to-trunk mode");
100+
if (plan.remoteActions.length !== 0)
101+
fail("clean terminal review must not plan another remote action");
93102
if (
94-
plan.stageAwareHashChanged !== true ||
103+
plan.terminalReviewIdentity !== "exact-pushed-sha" ||
104+
plan.cleanReviewCreatesCheckpoint !== false ||
95105
plan.reviewedSourceChanged !== false ||
96106
plan.sourceReviewRestartRequired !== false
97107
) {
98-
fail(
99-
"Git partition changes alone must not restart completed source review",
100-
);
108+
fail("clean terminal review must remain bound to the delivered identity");
101109
}
102110
if (
103-
plan.postCommitGateRequired !== true ||
104-
plan.postCommitGateExactRevision !== true ||
105-
plan.commitMetadataChecksPhase !== "delivery-verification"
111+
plan.readinessStatus !== "awaiting-exact-sha-ci" ||
112+
plan.exactRevisionBinding !== true
106113
) {
107-
fail(
108-
"exact-commit gates, message, and signature checks remain mandatory",
109-
);
110-
}
111-
if (plan.ci.required !== true || plan.ci.status !== "terminal-success") {
112-
fail("required pushed CI must bind to terminal success");
113-
}
114-
const invalidates = plan.invalidatesReview;
115-
for (const key of [
116-
"paths",
117-
"content",
118-
"modes",
119-
"untracked",
120-
"baseline",
121-
"requestedScope",
122-
]) {
123-
if (invalidates?.[key] !== true)
124-
fail(`${key} changes must invalidate completed source review`);
125-
}
126-
for (const key of [
127-
"stagingPartition",
128-
"head",
129-
"signature",
130-
"commitMetadata",
131-
]) {
132-
if (invalidates?.[key] !== false)
133-
fail(`${key} alone must remain delivery verification`);
114+
fail("readiness must remain bound to exact-SHA CI");
134115
}
116+
if (plan.ci.required !== true || plan.ci.status !== "running")
117+
fail("running exact-SHA CI is waiting, not readiness");
135118
break;
136119
}
137120
case "source-change-invalidates-review": {
138121
if (
139122
plan.reviewedSourceChanged !== true ||
140-
plan.sourceReviewRestartRequired !== true
123+
plan.remediationCheckpointDelivered !== true ||
124+
plan.sourceReviewRestartRequired !== true ||
125+
plan.deltaAssessmentRequired !== true ||
126+
plan.completeLensSetRequired !== true
141127
) {
142-
fail("a real source change must restart final review");
128+
fail("remediation must be delivered before the complete review reset");
143129
}
144130
if (
145131
plan.postCommitGateRequired !== true ||

0 commit comments

Comments
 (0)