codex-workflow-v2 2.0.0-beta.13.5 → 2.0.0-beta.13.6

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/README.md CHANGED
@@ -54,6 +54,9 @@ automation do not import anything from the parent V1 project.
54
54
  - beta.12.16 check-support authority: migration checksum/catalog modules imported directly by an
55
55
  approved check must be owned by the producing Step; an already-running Step receives only the
56
56
  exact machine-proved support path without a Human replan or a synthetic second failure;
57
+ - beta.13.6 binds dirty work retained by a mechanical root-cause replan to its source failure,
58
+ exact replacement Plan and audit, current authorization, unchanged HEAD and content hash;
59
+ navigation and execution share that assessment instead of demanding a clean checkout after replan;
57
60
  - read-only Milestone progress projection with stable membership ordinals and replacement links;
58
61
  - one project-monotonic `#NNN` chat registry with compact titles, exact readback, and deterministic fallback;
59
62
  - narrow, read-only alpha.6 strict-review rescue preflight for the lifecycle deadlock fixed in alpha.7;
@@ -77,7 +80,7 @@ cross-machine synchronization are not part of its contract.
77
80
  Node.js 22 or newer is required. Consumers pin the exact package version:
78
81
 
79
82
  ```bash
80
- npm install --save-dev --save-exact codex-workflow-v2@2.0.0-beta.13.5
83
+ npm install --save-dev --save-exact codex-workflow-v2@2.0.0-beta.13.6
81
84
  npx codex-workflow gateway handshake --repo .
82
85
  npx codex-workflow doctor --repo .
83
86
  ```
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "protocol": "codex-workflow-runtime-build-manifest-v1",
3
3
  "packageName": "codex-workflow-v2",
4
- "packageVersion": "2.0.0-beta.13.5",
5
- "packageManifestSha256": "3d5b2f7cbf4107b60dd1b6f6805e8e27e6f667887038f03fc43ae02b05a527d7",
4
+ "packageVersion": "2.0.0-beta.13.6",
5
+ "packageManifestSha256": "cf50d0d565c9f86727b724c03301c9d419fe948ecd744d3047354c5b4d871068",
6
6
  "requiredEntrypoints": [
7
7
  "dist/src/cli.js",
8
8
  "dist/src/gateway-handshake.js",
@@ -70,6 +70,10 @@
70
70
  "path": "dist/src/alpha6/review.js",
71
71
  "sha256": "4eb05ae8fda755c70844f4b62e8bdc0d837376adc7f7ddec27e893fa1e9d3496"
72
72
  },
73
+ {
74
+ "path": "dist/src/alpha6/root-cause-replan-carryover.js",
75
+ "sha256": "474123d4fce82dbfb1648c5fb9dc4561d7503f8de349fe419300ce75c22a5ba0"
76
+ },
73
77
  {
74
78
  "path": "dist/src/alpha6/store-sidecars.js",
75
79
  "sha256": "74245dfe73ef7950ee0aff5d86c35c999347f39364efaba623857847372da2eb"
@@ -92,11 +96,11 @@
92
96
  },
93
97
  {
94
98
  "path": "dist/src/cli-actions.js",
95
- "sha256": "fe55b6fed1b112383e90305d7e959c9bd13625f3050936c7201e0a158264eb03"
99
+ "sha256": "136c3824b7f4b6eb8281d11e1045fc2153d25055fcf05f68ef6e2f2833e3c11b"
96
100
  },
97
101
  {
98
102
  "path": "dist/src/cli.js",
99
- "sha256": "3f5cb86477f17ca711df74368a5f57396a72ae40ebcd9e1078de2766cd9e7ee8"
103
+ "sha256": "362831edd8b889937ecc321ebc8012c348222ecf7d5c6369542e9153e918b53c"
100
104
  },
101
105
  {
102
106
  "path": "dist/src/contracts.js",
@@ -116,7 +120,7 @@
116
120
  },
117
121
  {
118
122
  "path": "dist/src/dependency-provenance.js",
119
- "sha256": "b08717654880332d285dfe3f4984bda9892c913682cd8d4d8f614a8803429df6"
123
+ "sha256": "3b8d66bb25764600c73341603d584ab81fe197c2051ec28cdbdf6066b3ee2aaf"
120
124
  },
121
125
  {
122
126
  "path": "dist/src/diagnostics.js",
@@ -148,7 +152,7 @@
148
152
  },
149
153
  {
150
154
  "path": "dist/src/gateway-handshake.js",
151
- "sha256": "db94b95bde86e07017a96aceac160c5eb46b7fe41f8988404d874d36ad54292d"
155
+ "sha256": "17eaf24bda26450989ea72d5af0f15e2701f3840a87be6f4d4c528f39713b4f0"
152
156
  },
153
157
  {
154
158
  "path": "dist/src/git.js",
@@ -312,11 +316,11 @@
312
316
  },
313
317
  {
314
318
  "path": "dist/src/version.js",
315
- "sha256": "d1ed0d6f9ec3ec2706ea97d67e08bcc3fca30f76047aeb7b452e7093f53f7a18"
319
+ "sha256": "ef47a378d9627be5b4b49b601411b42fd1e8875f76fa02b99fddb451118e3afe"
316
320
  },
317
321
  {
318
322
  "path": "dist/src/workflow.js",
319
- "sha256": "6776256ecbc090032a53a0220b5f92c39d16ad293e4513e340e9bd92e2cf2920"
323
+ "sha256": "83ecbc00e0e11fabf4df133fdb02a60d2ca713bf40c6d66af170a5c46671d6ca"
320
324
  }
321
325
  ],
322
326
  "runtimeDependencies": [
@@ -1100,5 +1104,5 @@
1100
1104
  ]
1101
1105
  }
1102
1106
  ],
1103
- "fingerprint": "7f67c71cd8c203f55eba196d0312e8cff5951a20a8f44570e4866249edeb4cf4"
1107
+ "fingerprint": "889f2687686e3668315040901586bbc11e666c157fefcc93537944a3ca3109e9"
1104
1108
  }
@@ -0,0 +1,17 @@
1
+ import type { RootCauseReplanDirtyCarryoverCompatibility, TaskState } from '../contracts.js';
2
+ import type { FileStateStore } from '../state/store.js';
3
+ export interface RootCauseReplanDirtyCarryoverAssessment {
4
+ applicable: boolean;
5
+ eligible: boolean;
6
+ compatibility: RootCauseReplanDirtyCarryoverCompatibility | null;
7
+ blockers: string[];
8
+ }
9
+ /**
10
+ * Proves that dirty bytes from the terminal repeated-cause failure survived one semantic
11
+ * corrective Plan replacement and are already inside the replacement Step's declared scope.
12
+ * This proof never grants or appends an allowedWrite.
13
+ */
14
+ export declare function assessRootCauseReplanDirtyCarryover(store: FileStateStore, repositoryRoot: string, task: TaskState, stepId: string, options?: {
15
+ historyHead?: string;
16
+ binding?: RootCauseReplanDirtyCarryoverCompatibility | null;
17
+ }): RootCauseReplanDirtyCarryoverAssessment;
@@ -0,0 +1,372 @@
1
+ import { normalizePlanKnowledgeBinding, readVerifiedPlanArtifact } from '../domain/plan-semantics.js';
2
+ import { pathAllowed } from '../domain/validation.js';
3
+ import { hashCanonical } from '../lifecycle/fingerprint.js';
4
+ import { changedFiles, currentBranch, gitIsAncestor, headCommit } from '../repository.js';
5
+ import { validateTaskHistory } from '../git.js';
6
+ import { assertMechanicalFeasibilityFresh } from './mechanical-feasibility.js';
7
+ import { hashDirtyWorktree } from './downstream-proof.js';
8
+ import { hashCompletedSteps, hashExecutionAuthorization } from './preexecution-replan.js';
9
+ import { readCurrentPlanRiskAudit, readPlanRiskAuditEvents } from './plan-risk.js';
10
+ import { deriveRollingCauseDecision, readRemediationEvents } from './remediation.js';
11
+ import { readTaskC1Posture, readTaskHandoffEvents } from './handoff.js';
12
+ /**
13
+ * Proves that dirty bytes from the terminal repeated-cause failure survived one semantic
14
+ * corrective Plan replacement and are already inside the replacement Step's declared scope.
15
+ * This proof never grants or appends an allowedWrite.
16
+ */
17
+ export function assessRootCauseReplanDirtyCarryover(store, repositoryRoot, task, stepId, options = {}) {
18
+ const historyHead = options.historyHead ?? options.binding?.sourceHeadCommit ?? headCommit(repositoryRoot);
19
+ const step = task.steps.find((candidate) => candidate.id === stepId) ?? null;
20
+ const allStepEvents = readRemediationEvents(store, task)
21
+ .filter((event) => event.stepId === stepId && event.failureKind === 'checks-failed');
22
+ const applicable = Boolean(step && task.planHash && allStepEvents.length >= 2);
23
+ if (!applicable || !step || !task.planHash) {
24
+ return { applicable, eligible: false, compatibility: null, blockers: [] };
25
+ }
26
+ const blockers = [];
27
+ const dirtyFiles = changedFiles(repositoryRoot).sort();
28
+ if (task.status !== 'ready')
29
+ blockers.push('The replacement Task must be execution-authorized and ready.');
30
+ if (step.status !== 'planned' || step.evidence !== null) {
31
+ blockers.push(`The replacement Step ${stepId} must be planned with no execution evidence.`);
32
+ }
33
+ if (task.steps.some((candidate) => candidate.status === 'in_progress'))
34
+ blockers.push('No Step may be in progress.');
35
+ if (task.workspaceOwner !== 'local')
36
+ blockers.push('Corrective carryover requires the recorded local Task workspace.');
37
+ if (!task.taskBranch || currentBranch(repositoryRoot) !== task.taskBranch) {
38
+ blockers.push('Current branch must equal the recorded Task branch.');
39
+ }
40
+ if (dirtyFiles.length === 0)
41
+ blockers.push('Corrective carryover requires retained dirty product bytes.');
42
+ const outsideAllowed = dirtyFiles.filter((file) => !pathAllowed(file, step.allowedWrites));
43
+ const forbidden = dirtyFiles.filter((file) => pathAllowed(file, step.forbiddenScope));
44
+ if (outsideAllowed.length > 0)
45
+ blockers.push(`Dirty files fall outside ${stepId} allowedWrites: ${outsideAllowed.join(', ')}`);
46
+ if (forbidden.length > 0)
47
+ blockers.push(`Dirty files intersect ${stepId} forbiddenScope: ${forbidden.join(', ')}`);
48
+ const incompleteDependencies = step.dependencies.filter((dependency) => !['completed', 'skipped'].includes(task.steps.find((candidate) => candidate.id === dependency)?.status ?? 'blocked'));
49
+ if (incompleteDependencies.length > 0)
50
+ blockers.push(`Replacement Step dependencies are incomplete: ${incompleteDependencies.join(', ')}`);
51
+ const audits = readPlanRiskAuditEvents(store, task);
52
+ const eventPlan = (event) => {
53
+ const revision = event.failureEvidence.executionTaskRevision;
54
+ if (revision === undefined)
55
+ return null;
56
+ const planHash = [...audits].reverse().find((audit) => audit.taskRevision <= revision)?.planHash ?? null;
57
+ if (!planHash || !task.planHash)
58
+ return null;
59
+ try {
60
+ return {
61
+ planHash,
62
+ semanticHash: normalizePlanKnowledgeBinding(readVerifiedPlanArtifact(store.taskRoot(task.projectId, task.id), planHash, task.planHash), `remediation ${event.eventId}`).semanticHash,
63
+ };
64
+ }
65
+ catch {
66
+ return null;
67
+ }
68
+ };
69
+ const terminal = allStepEvents.at(-1);
70
+ const terminalPlan = eventPlan(terminal);
71
+ const sourcePlanHash = terminalPlan?.planHash ?? null;
72
+ if (!sourcePlanHash || sourcePlanHash === task.planHash) {
73
+ blockers.push('The terminal repeated-cause event must resolve to one replaced source Plan.');
74
+ }
75
+ let cycleStart = allStepEvents.length - 1;
76
+ while (cycleStart > 0
77
+ && eventPlan(allStepEvents[cycleStart - 1])?.semanticHash === terminalPlan?.semanticHash)
78
+ cycleStart -= 1;
79
+ const sourceCycle = allStepEvents.slice(cycleStart);
80
+ const priorEvents = allStepEvents.slice(0, cycleStart);
81
+ if (!terminalPlan || sourceCycle.some((event) => eventPlan(event)?.semanticHash !== terminalPlan.semanticHash)) {
82
+ blockers.push('The source remediation cycle has ambiguous Plan bindings.');
83
+ }
84
+ if (deriveRollingCauseDecision(sourceCycle, priorEvents) !== 'root-cause-replan') {
85
+ blockers.push('The source cycle does not end in a repeated authoritative mechanical cause.');
86
+ }
87
+ const priorFingerprints = new Set([...priorEvents, ...sourceCycle.slice(0, -1)]
88
+ .flatMap((event) => event.causeBindings?.filter((cause) => cause.authority === 'mechanical')
89
+ .map((cause) => cause.causeFingerprint) ?? []));
90
+ const repeated = [...new Set(terminal.causeBindings
91
+ ?.filter((cause) => cause.authority === 'mechanical' && !cause.planConflict && priorFingerprints.has(cause.causeFingerprint))
92
+ .map((cause) => cause.causeFingerprint) ?? [])];
93
+ if (repeated.length !== 1)
94
+ blockers.push('The terminal failure must identify exactly one repeated mechanical cause.');
95
+ if (terminal.failureEvidence.executionTaskRevision === undefined) {
96
+ blockers.push('The terminal failure is missing its execution Task revision.');
97
+ }
98
+ if (!terminal.failureEvidence.dirtyWorktreeHash)
99
+ blockers.push('The terminal failure is missing its dirty-worktree hash.');
100
+ if (terminal.failureEvidence.completionCommit !== historyHead) {
101
+ blockers.push('Repository HEAD changed after the terminal repeated-cause failure.');
102
+ }
103
+ try {
104
+ if ((task.invalidatedStepCommits ?? []).length > 0) {
105
+ throw new Error('Legacy carryover cannot time-classify invalidated completed-Step commits.');
106
+ }
107
+ const sourceHistoryTask = {
108
+ ...task,
109
+ systemCommits: task.systemCommits.filter((commit) => gitIsAncestor(repositoryRoot, commit, historyHead)),
110
+ dependencyProvenanceRecoveries: (task.dependencyProvenanceRecoveries ?? []).filter((record) => gitIsAncestor(repositoryRoot, record.commitSha, historyHead)),
111
+ };
112
+ validateTaskHistory(repositoryRoot, sourceHistoryTask, historyHead);
113
+ }
114
+ catch (error) {
115
+ blockers.push(`Completed Step authority is not exactly retained at the source boundary: ${error instanceof Error ? error.message : String(error)}`);
116
+ }
117
+ let dirtyWorktreeHash = null;
118
+ try {
119
+ dirtyWorktreeHash = hashDirtyWorktree(repositoryRoot, dirtyFiles);
120
+ if (dirtyWorktreeHash !== terminal.failureEvidence.dirtyWorktreeHash) {
121
+ blockers.push('Dirty paths or bytes changed after the terminal repeated-cause failure.');
122
+ }
123
+ }
124
+ catch (error) {
125
+ blockers.push(error instanceof Error ? error.message : String(error));
126
+ }
127
+ const replacementAuthorityPlanHash = options.binding?.replacementPlanHash ?? task.planHash;
128
+ let sourcePlanSemanticHash = null;
129
+ let replacementPlanSemanticHash = null;
130
+ try {
131
+ if (!sourcePlanHash)
132
+ throw new Error('Source Plan hash is unavailable.');
133
+ sourcePlanSemanticHash = normalizePlanKnowledgeBinding(readVerifiedPlanArtifact(store.taskRoot(task.projectId, task.id), sourcePlanHash, task.planHash), 'root-cause source').semanticHash;
134
+ replacementPlanSemanticHash = normalizePlanKnowledgeBinding(readVerifiedPlanArtifact(store.taskRoot(task.projectId, task.id), replacementAuthorityPlanHash, task.planHash), 'root-cause replacement').semanticHash;
135
+ if (sourcePlanSemanticHash === replacementPlanSemanticHash) {
136
+ blockers.push('Corrective carryover requires a semantic replacement Plan.');
137
+ }
138
+ const currentSemanticHash = normalizePlanKnowledgeBinding(readVerifiedPlanArtifact(store.taskRoot(task.projectId, task.id), task.planHash, task.planHash), 'current corrective Plan').semanticHash;
139
+ if (currentSemanticHash !== replacementPlanSemanticHash) {
140
+ blockers.push('The current Plan is not a knowledge-only descendant of the corrective replacement Plan.');
141
+ }
142
+ }
143
+ catch (error) {
144
+ blockers.push(error instanceof Error ? error.message : String(error));
145
+ }
146
+ let currentAudit = null;
147
+ let replacementSourceAudit = null;
148
+ try {
149
+ currentAudit = readCurrentPlanRiskAudit(store, task);
150
+ const sourceAudit = options.binding
151
+ ? audits.find((audit) => audit.eventId === options.binding.replacementPlanRiskAuditEventId
152
+ && audit.eventHash === options.binding.replacementPlanRiskAuditEventHash
153
+ && audit.planHash === options.binding.replacementPlanHash) ?? null
154
+ : currentAudit?.audit ?? null;
155
+ replacementSourceAudit = sourceAudit;
156
+ if (!currentAudit || currentAudit.audit.planHash !== task.planHash
157
+ || !currentAudit.reviewRequiredStepIds.includes(stepId)
158
+ || !sourceAudit
159
+ || sourceAudit.taskRevision <= (terminal.failureEvidence.executionTaskRevision ?? Number.MAX_SAFE_INTEGER)) {
160
+ blockers.push('A fresh replacement Plan Risk Audit must guard the exact corrective Step.');
161
+ }
162
+ if (sourceAudit && currentAudit
163
+ && JSON.stringify(sourceAudit.stepClassifications) !== JSON.stringify(currentAudit.audit.stepClassifications)) {
164
+ blockers.push('Context refresh changed the replacement Plan Risk Audit classifications or proof bindings.');
165
+ }
166
+ if (sourceAudit && currentAudit) {
167
+ assertContiguousKnowledgeRebindChain(store.taskRoot(task.projectId, task.id), task, replacementAuthorityPlanHash, task.planHash, audits, sourceAudit, currentAudit.audit);
168
+ }
169
+ }
170
+ catch (error) {
171
+ blockers.push(error instanceof Error ? error.message : String(error));
172
+ }
173
+ const authorization = [...task.authorizations].reverse().find((event) => event.kind === 'execution' && event.decision === 'approved') ?? null;
174
+ const sourceAuthorization = options.binding
175
+ ? task.authorizations.find((event) => hashExecutionAuthorization(event.kind === 'execution' && event.decision === 'superseded'
176
+ ? { ...event, decision: 'approved' }
177
+ : event) === options.binding.executionAuthorizationHash
178
+ && event.planHash === options.binding.replacementPlanHash
179
+ && event.headCommit === options.binding.executionAuthorizationHead) ?? null
180
+ : authorization;
181
+ if (!authorization) {
182
+ blockers.push('The replacement Plan requires a current execution authorization.');
183
+ }
184
+ else {
185
+ validateAuthorization(store, repositoryRoot, task, authorization, options.binding ? headCommit(repositoryRoot) : historyHead, blockers);
186
+ }
187
+ if (!sourceAuthorization)
188
+ blockers.push('The original corrective execution authorization is missing from immutable Task history.');
189
+ if (task.steps.some((candidate) => candidate.status === 'completed' && !candidate.evidence)) {
190
+ blockers.push('Every retained completed Step must preserve its execution evidence.');
191
+ }
192
+ const c1Posture = readTaskC1Posture(store, task);
193
+ const handoffEvents = readTaskHandoffEvents(store, task);
194
+ const sourceTaskRevision = options.binding?.sourceTaskRevision ?? task.revision;
195
+ const latestClaim = [...handoffEvents].reverse().find((event) => event.eventType === 'claim') ?? null;
196
+ const replacementAuditTime = replacementSourceAudit ? Date.parse(replacementSourceAudit.recordedAt) : null;
197
+ const claimTime = latestClaim ? Date.parse(latestClaim.recordedAt) : null;
198
+ const claimEvent = latestClaim
199
+ && latestClaim.taskRevision === sourceTaskRevision
200
+ && latestClaim.planHash === replacementAuthorityPlanHash
201
+ && latestClaim.briefHash === task.briefHash
202
+ && (!replacementSourceAudit || (claimTime !== null && Number.isFinite(claimTime)
203
+ && replacementAuditTime !== null && Number.isFinite(replacementAuditTime)
204
+ && claimTime >= replacementAuditTime
205
+ && latestClaim.taskRevision > replacementSourceAudit.taskRevision))
206
+ ? latestClaim
207
+ : null;
208
+ const correctiveYield = [...handoffEvents].reverse().find((event) => event.eventType === 'yield'
209
+ && event.taskRevision === (terminal.failureEvidence.executionTaskRevision ?? -2) + 1
210
+ && event.planHash !== null
211
+ && eventPlan(terminal)?.semanticHash === normalizePlanKnowledgeBinding(readVerifiedPlanArtifact(store.taskRoot(task.projectId, task.id), event.planHash, task.planHash), `corrective yield ${event.eventId}`).semanticHash
212
+ && Number.isFinite(Date.parse(event.recordedAt))
213
+ && Number.isFinite(Date.parse(terminal.recordedAt))
214
+ && Date.parse(event.recordedAt) >= Date.parse(terminal.recordedAt)
215
+ && (!replacementSourceAudit || (replacementAuditTime !== null && Number.isFinite(replacementAuditTime)
216
+ && Date.parse(event.recordedAt) <= replacementAuditTime
217
+ && event.taskRevision < replacementSourceAudit.taskRevision))) ?? null;
218
+ if (c1Posture.state !== 'claimed' || !claimEvent || claimEvent.actor !== c1Posture.claimant) {
219
+ blockers.push('Corrective carryover requires the retained claimed C1 actor and its immutable claim event.');
220
+ }
221
+ if (!correctiveYield)
222
+ blockers.push('The terminal repeated cause is missing its completed corrective-yield boundary.');
223
+ if (blockers.length > 0 || !sourcePlanHash || !sourcePlanSemanticHash || !replacementPlanSemanticHash
224
+ || !dirtyWorktreeHash || !currentAudit || !authorization || !sourceAuthorization
225
+ || terminal.failureEvidence.executionTaskRevision === undefined || repeated.length !== 1
226
+ || c1Posture.state !== 'claimed' || !claimEvent || !correctiveYield) {
227
+ return { applicable: true, eligible: false, compatibility: null, blockers: [...new Set(blockers)] };
228
+ }
229
+ const base = {
230
+ kind: 'root-cause-corrective-replan-dirty-carryover',
231
+ taskId: task.id,
232
+ sourceTaskRevision,
233
+ stepId,
234
+ sourcePlanHash,
235
+ sourcePlanSemanticHash,
236
+ replacementPlanHash: replacementAuthorityPlanHash,
237
+ replacementPlanSemanticHash,
238
+ sourceHeadCommit: terminal.failureEvidence.completionCommit,
239
+ remediationEvents: sourceCycle.map((event) => ({
240
+ eventId: event.eventId,
241
+ eventHash: event.eventHash,
242
+ attemptOrdinal: event.attemptOrdinal,
243
+ })),
244
+ terminalRemediationEventId: terminal.eventId,
245
+ terminalRemediationEventHash: terminal.eventHash,
246
+ terminalExecutionTaskRevision: terminal.failureEvidence.executionTaskRevision,
247
+ repeatedCauseFingerprint: repeated[0],
248
+ correctiveYieldEventId: correctiveYield.eventId,
249
+ correctiveYieldEventHash: correctiveYield.eventHash,
250
+ dirtyFiles,
251
+ dirtyWorktreeHash,
252
+ replacementPlanRiskAuditEventId: options.binding?.replacementPlanRiskAuditEventId ?? currentAudit.audit.eventId,
253
+ replacementPlanRiskAuditEventHash: options.binding?.replacementPlanRiskAuditEventHash ?? currentAudit.audit.eventHash,
254
+ executionAuthorizationHash: options.binding?.executionAuthorizationHash ?? hashExecutionAuthorization(sourceAuthorization),
255
+ executionAuthorizationHead: options.binding?.executionAuthorizationHead ?? sourceAuthorization.headCommit,
256
+ completedStepsHash: hashCompletedSteps(task),
257
+ c1ClaimEventId: claimEvent.eventId,
258
+ c1ClaimEventHash: claimEvent.eventHash,
259
+ claimant: c1Posture.claimant,
260
+ };
261
+ const compatibility = { ...base, compatibilityHash: hashCanonical({
262
+ domain: 'codex-workflow/root-cause-corrective-replan-dirty-carryover/v1',
263
+ ...base,
264
+ }) };
265
+ if (options.binding && JSON.stringify(compatibility) !== JSON.stringify(options.binding)) {
266
+ return {
267
+ applicable: true,
268
+ eligible: false,
269
+ compatibility: null,
270
+ blockers: ['Recorded corrective carryover binding no longer matches the immutable Task, Plan, audit, authorization, C1, or dirty-byte evidence.'],
271
+ };
272
+ }
273
+ return {
274
+ applicable: true,
275
+ eligible: true,
276
+ compatibility,
277
+ blockers: [],
278
+ };
279
+ }
280
+ function assertContiguousKnowledgeRebindChain(taskRoot, task, sourcePlanHash, currentPlanHash, audits, sourceAudit, currentAudit) {
281
+ if (sourcePlanHash === currentPlanHash) {
282
+ if (sourceAudit.eventHash !== currentAudit.eventHash) {
283
+ throw new Error('Corrective source Plan has ambiguous current Plan Risk Audit authority.');
284
+ }
285
+ return;
286
+ }
287
+ for (let index = 0; index < task.knowledgeRebinds.length; index += 1) {
288
+ const timestamp = Date.parse(task.knowledgeRebinds[index].recordedAt);
289
+ if (!Number.isFinite(timestamp)
290
+ || (index > 0 && timestamp <= Date.parse(task.knowledgeRebinds[index - 1].recordedAt))) {
291
+ throw new Error('Task knowledge-rebind timestamps are not finite and strictly increasing.');
292
+ }
293
+ }
294
+ let expected = sourcePlanHash;
295
+ const seen = new Set();
296
+ const start = task.knowledgeRebinds.findIndex((record) => record.previousPlanHash === sourcePlanHash);
297
+ if (start < 0)
298
+ throw new Error('Corrective Plan has no append-only Knowledge rebind chain.');
299
+ const chain = task.knowledgeRebinds.slice(start);
300
+ for (const record of chain) {
301
+ if (record.previousPlanHash !== expected) {
302
+ throw new Error('Corrective Plan knowledge-rebind provenance forks or skips a Plan hash.');
303
+ }
304
+ if (seen.has(record.reboundPlanHash) || record.reboundPlanHash === record.previousPlanHash) {
305
+ throw new Error('Corrective Plan knowledge-rebind chain is cyclic.');
306
+ }
307
+ seen.add(record.reboundPlanHash);
308
+ const before = readVerifiedPlanArtifact(taskRoot, record.previousPlanHash, currentPlanHash);
309
+ const after = readVerifiedPlanArtifact(taskRoot, record.reboundPlanHash, currentPlanHash);
310
+ if (normalizePlanKnowledgeBinding(before, 'corrective rebind source').normalized
311
+ !== normalizePlanKnowledgeBinding(after, 'corrective rebind target').normalized) {
312
+ throw new Error('Corrective Plan rebind changed semantics beyond the Knowledge Map binding.');
313
+ }
314
+ expected = record.reboundPlanHash;
315
+ }
316
+ if (expected !== currentPlanHash) {
317
+ throw new Error('Corrective Plan knowledge-rebind provenance is not contiguous to the current Plan.');
318
+ }
319
+ const planHashes = [sourcePlanHash, ...chain.map((record) => record.reboundPlanHash)];
320
+ const auditChain = planHashes.map((planHash) => audits.filter((audit) => audit.planHash === planHash));
321
+ if (auditChain.some((matches) => matches.length !== 1)
322
+ || auditChain[0][0].eventHash !== sourceAudit.eventHash
323
+ || auditChain.at(-1)[0].eventHash !== currentAudit.eventHash) {
324
+ throw new Error('Corrective Plan Risk Audit rebound chain is missing or ambiguous.');
325
+ }
326
+ const sourceAuditIndex = audits.indexOf(auditChain[0][0]);
327
+ if (sourceAuditIndex < 0
328
+ || sourceAuditIndex + auditChain.length !== audits.length
329
+ || auditChain.some((matches, index) => audits[sourceAuditIndex + index] !== matches[0])) {
330
+ throw new Error('Corrective Plan Risk Audit rebound evidence is not the contiguous current audit suffix.');
331
+ }
332
+ chain.forEach((record, index) => {
333
+ const before = auditChain[index][0];
334
+ const after = auditChain[index + 1][0];
335
+ const expectedSummary = `${before.summary} Rebound automatically after content-only Task context refresh.`;
336
+ if (before.knowledgeMapRevision !== record.fromKnowledgeMapRevision
337
+ || before.knowledgeMapHash !== record.fromKnowledgeMapHash
338
+ || after.knowledgeMapRevision !== record.toKnowledgeMapRevision
339
+ || after.knowledgeMapHash !== record.toKnowledgeMapHash
340
+ || after.previousEventHash !== before.eventHash
341
+ || after.taskId !== before.taskId
342
+ || after.briefHash !== before.briefHash
343
+ || after.briefHash !== task.briefHash
344
+ || before.planner !== after.planner
345
+ || before.auditor !== after.auditor
346
+ || before.decision !== after.decision
347
+ || before.splitRationale !== after.splitRationale
348
+ || after.summary !== expectedSummary
349
+ || before.structuralProductionEdgeAuthority !== after.structuralProductionEdgeAuthority
350
+ || JSON.stringify(before.stepClassifications) !== JSON.stringify(after.stepClassifications)) {
351
+ throw new Error('Corrective Plan Risk Audit rebound does not match a knowledge-only Plan hop.');
352
+ }
353
+ });
354
+ }
355
+ function validateAuthorization(store, repositoryRoot, task, authorization, expectedHead, blockers) {
356
+ try {
357
+ const root = store.taskRoot(task.projectId, task.id);
358
+ const briefHash = store.hashArtifact(root, 'brief.md');
359
+ const planHash = store.hashArtifact(root, 'plan.md');
360
+ if (task.briefHash !== briefHash || task.planHash !== planHash
361
+ || authorization.briefHash !== briefHash || authorization.planHash !== planHash
362
+ || !authorization.mechanicalFeasibility || authorization.headCommit !== expectedHead) {
363
+ blockers.push('Execution authorization does not bind the current Brief, Plan, and HEAD.');
364
+ return;
365
+ }
366
+ assertMechanicalFeasibilityFresh(repositoryRoot, task, authorization.mechanicalFeasibility, briefHash, planHash);
367
+ }
368
+ catch (error) {
369
+ blockers.push(error instanceof Error ? error.message : String(error));
370
+ }
371
+ }
372
+ //# sourceMappingURL=root-cause-replan-carryover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-cause-replan-carryover.js","sourceRoot":"","sources":["../../../src/alpha6/root-cause-replan-carryover.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAA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
@@ -6,7 +6,7 @@
6
6
  */
7
7
  declare const CLI_ACTIONS_LITERAL: {
8
8
  readonly gateway: readonly ["handshake"];
9
- readonly update: readonly ["preflight", "pending-review-source-preflight", "pending-review-dependency-preflight", "pending-review-dependency-recover", "rescue-preflight", "dependency-provenance-preflight", "dependency-provenance-recover", "historical-step-dependency-preflight", "historical-step-dependency-recover", "downstream-proof-dependency-preflight", "downstream-proof-dependency-recover", "downstream-proof-replan-update-preflight", "downstream-proof-replan-dependency-preflight", "downstream-proof-replan-dependency-recover", "plan-integrity-update-preflight", "plan-integrity-dependency-preflight", "plan-integrity-dependency-recover"];
9
+ readonly update: readonly ["preflight", "pending-review-source-preflight", "pending-review-dependency-preflight", "pending-review-dependency-recover", "rescue-preflight", "dependency-provenance-preflight", "corrective-carryover-preflight", "dependency-provenance-recover", "historical-step-dependency-preflight", "historical-step-dependency-recover", "downstream-proof-dependency-preflight", "downstream-proof-dependency-recover", "downstream-proof-replan-update-preflight", "downstream-proof-replan-dependency-preflight", "downstream-proof-replan-dependency-recover", "plan-integrity-update-preflight", "plan-integrity-dependency-preflight", "plan-integrity-dependency-recover"];
10
10
  readonly delegation: readonly ["prepare", "grant", "list", "show", "revoke"];
11
11
  readonly 'project-memory': readonly ["scan", "show", "status", "approve", "reconcile"];
12
12
  readonly state: readonly ["migrate", "adoption-prepare", "adoption-apply"];
@@ -13,6 +13,7 @@ const CLI_ACTIONS_LITERAL = {
13
13
  'pending-review-dependency-recover',
14
14
  'rescue-preflight',
15
15
  'dependency-provenance-preflight',
16
+ 'corrective-carryover-preflight',
16
17
  'dependency-provenance-recover',
17
18
  'historical-step-dependency-preflight',
18
19
  'historical-step-dependency-recover',
@@ -1 +1 @@
1
- {"version":3,"file":"cli-actions.js","sourceRoot":"","sources":["../../src/cli-actions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG;IAC1B,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,MAAM,EAAE;QACN,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S;QACT,MAAM;QACN,UAAU;QACV,UAAU;QACV,yBAAyB;QACzB,sBAAsB;QACtB,oBAAoB;QACpB,kBAAkB;QAClB,gBAAgB;QAChB,iBAAiB;QACjB,WAAW;QACX,UAAU;QACV,QAAQ;QACR,QAAQ;KACT;IACD,KAAK,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAgD,mBAAmB,CAAC;AAO5F,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACpF,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,SAAS,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAY,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAAkC,CAAC;IACrE,OAAO,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;AAC9C,CAAC"}
package/dist/src/cli.js CHANGED
@@ -26,6 +26,10 @@ const CLI_HELP_SPECS = {
26
26
  requiredOptions: ['--id'],
27
27
  optionalOptions: ['--repo', '--json'],
28
28
  },
29
+ 'update corrective-carryover-preflight': {
30
+ requiredOptions: ['--id'],
31
+ optionalOptions: ['--repo', '--json'],
32
+ },
29
33
  'task historical-step-provenance-preflight': {
30
34
  requiredOptions: ['--id'],
31
35
  optionalOptions: ['--repo', '--json'],
@@ -531,6 +535,9 @@ async function dispatch(args) {
531
535
  if (noun === 'update' && action === 'dependency-provenance-preflight') {
532
536
  return workflow.dependencyProvenanceRecoveryPreflight(repo, required(args, 'id'));
533
537
  }
538
+ if (noun === 'update' && action === 'corrective-carryover-preflight') {
539
+ return workflow.correctiveCarryoverUpdatePreflight(repo, required(args, 'id'));
540
+ }
534
541
  if (noun === 'task' && action === 'historical-step-provenance-preflight') {
535
542
  return workflow.historicalStepProvenanceRecoveryPreflight(repo, required(args, 'id'));
536
543
  }