codex-workflow-v2 2.0.0-beta.12.6 → 2.0.0-beta.12.7
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 +15 -3
- package/dist/src/alpha6/downstream-proof.d.ts +35 -1
- package/dist/src/alpha6/downstream-proof.js +310 -2
- package/dist/src/alpha6/downstream-proof.js.map +1 -1
- package/dist/src/alpha6/plan-risk.js +2 -2
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/cli.js +34 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +30 -1
- package/dist/src/dependency-provenance.d.ts +2 -2
- package/dist/src/dependency-provenance.js +26 -13
- package/dist/src/dependency-provenance.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflow.d.ts +8 -1
- package/dist/src/workflow.js +369 -30
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +7 -0
- package/docs/development-flow.md +9 -0
- package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
- package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +18 -5
- package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +18 -7
- package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +25 -12
- package/docs/release.md +7 -1
- package/docs/updating-existing-project.md +24 -0
- package/docs/validation-report.md +90 -91
- package/package.json +2 -1
- package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +15 -0
- package/schemas/downstream-proof-invalidation-event.schema.json +1 -0
- package/schemas/downstream-proof-replan-recovery-event.schema.json +61 -0
- package/schemas/task.schema.json +34 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AAY,CAAC,CAAC;IAChD,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC,YAAY,CAAC,CAAC;IACpD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAgC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/G,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const PACKAGE_NAME = "codex-workflow-v2";
|
|
2
|
-
export declare const PACKAGE_VERSION = "2.0.0-beta.12.
|
|
2
|
+
export declare const PACKAGE_VERSION = "2.0.0-beta.12.7";
|
package/dist/src/version.js
CHANGED
package/dist/src/workflow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AdoptionPostureEvent, type ContextEnvelope, type CorrectivePlanAuditInput, type DependencyProvenanceRecoveryPreflight, type DelegationGrant, type DelegationGrantGate, type DelegationPolicyInput, type DiscoveryState, type MilestonePlanInput, type MilestoneProgressProjection, type MilestoneState, type KnowledgeSelection, type GraphBinding, type GraphKind, type GraphMode, type GraphRefreshEvidence, type GraphRefreshRequest, type PlanRiskAuditEvent, type PublicWriterLease, type PublicWriterLeaseDiagnostic, type PublicWriterLeaseRepairResult, type ProjectKnowledgeMap, type ReviewInput, type StopEscalateOverrideEvent, type StopEscalateOverridePreparation, type TaskPlanInput, type TaskContextRefreshResult, type TaskState, type UpdatePreflightResult, type WriterCredentialResult, type WriterCredentialStatus, type WorkflowObservation, type WorkflowRole, type WorkspaceOwner } from './contracts.js';
|
|
2
2
|
import { appendTaskClaim, appendTaskHandback, readTaskC1Posture } from './alpha6/handoff.js';
|
|
3
|
-
import { prepareDownstreamProofInvalidation } from './alpha6/downstream-proof.js';
|
|
3
|
+
import { prepareDownstreamProofInvalidation, prepareDownstreamProofReplanRecovery } from './alpha6/downstream-proof.js';
|
|
4
4
|
import { type AdoptionPreparation } from './alpha6/adoption.js';
|
|
5
5
|
import { type RecordPlanRiskAuditInput } from './alpha6/plan-risk.js';
|
|
6
6
|
import { type ActiveMilestoneAutonomy, type MilestoneAutonomyPreparation } from './alpha7/autonomy.js';
|
|
@@ -112,6 +112,10 @@ export declare class WorkflowService {
|
|
|
112
112
|
task: TaskState;
|
|
113
113
|
invalidation: ReturnType<typeof prepareDownstreamProofInvalidation>['event'];
|
|
114
114
|
};
|
|
115
|
+
recoverDownstreamProofReplan(repository: string, taskId: string, expectedTaskRevision: number, actor: string, reason: string): {
|
|
116
|
+
task: TaskState;
|
|
117
|
+
recovery: ReturnType<typeof prepareDownstreamProofReplanRecovery>['event'];
|
|
118
|
+
};
|
|
115
119
|
private correctiveReplanController;
|
|
116
120
|
private observationSnapshot;
|
|
117
121
|
prepareDelegation(repository: string, input: DelegationPolicyInput): DelegationGrantGate;
|
|
@@ -229,8 +233,11 @@ export declare class WorkflowService {
|
|
|
229
233
|
};
|
|
230
234
|
dependencyProvenanceRecoveryPreflight(repository: string, taskId: string): DependencyProvenanceRecoveryPreflight;
|
|
231
235
|
activeDownstreamProofDependencyRecoveryPreflight(repository: string, taskId: string): DependencyProvenanceRecoveryPreflight;
|
|
236
|
+
downstreamProofReplanUpdatePreflight(repository: string, taskId: string): Record<string, unknown>;
|
|
237
|
+
downstreamProofReplanDependencyRecoveryPreflight(repository: string, taskId: string): DependencyProvenanceRecoveryPreflight;
|
|
232
238
|
recoverDependencyProvenance(repository: string, taskId: string, expectedRevision: number, actor: string, reason: string): TaskState;
|
|
233
239
|
recoverActiveDownstreamProofDependencyProvenance(repository: string, taskId: string, expectedRevision: number, actor: string, reason: string): TaskState;
|
|
240
|
+
recoverDownstreamProofReplanDependencyProvenance(repository: string, taskId: string, expectedRevision: number, actor: string, reason: string): TaskState;
|
|
234
241
|
private recoverDependencyProvenanceCandidate;
|
|
235
242
|
milestoneProgress(repository: string, milestoneId: string): MilestoneProgressProjection;
|
|
236
243
|
alpha6StrictReviewRescuePreflight(repository: string): Alpha6StrictReviewRescuePreflight;
|
package/dist/src/workflow.js
CHANGED
|
@@ -11,9 +11,9 @@ import { WorkflowError } from './errors.js';
|
|
|
11
11
|
import { bindGraphEvidence, createGraphRefreshRequest, fallbackGraphBinding, inspectGraphBinding, validateGraphRequestCurrent, } from './graph.js';
|
|
12
12
|
import { inspectLocalDependency, inspectWorkflowVersions } from './diagnostics.js';
|
|
13
13
|
import { appendTaskClaim, appendTaskHandback, appendTaskHandoff, appendTaskWriterCredentialReplacement, assertTaskClaimAllowed, assertTaskMutationAllowedByC1, defaultTaskWorkerActor, prepareTaskCorrectiveYield, readTaskC1Posture, } from './alpha6/handoff.js';
|
|
14
|
-
import { assessDownstreamProofRecovery, downstreamProofInvalidationSidecar, prepareDownstreamProofInvalidation, readDownstreamProofInvalidations, } from './alpha6/downstream-proof.js';
|
|
14
|
+
import { assessDownstreamProofCarryover, assessDownstreamProofReplanRecovery, assessDownstreamProofRecovery, downstreamProofInvalidationSidecar, downstreamProofReplanRecoverySidecar, prepareDownstreamProofInvalidation, prepareDownstreamProofReplanRecovery, readDownstreamProofInvalidations, readDownstreamProofReplanRecoveries, } from './alpha6/downstream-proof.js';
|
|
15
15
|
import { applyAdoptionPosture, assertAdoptionBaselinePreserved, buildAdoptionPreparation, initializeProjectRegistrationAdoption, readCurrentAdoptionPosture, } from './alpha6/adoption.js';
|
|
16
|
-
import { appendCurrentPlanRiskAudit, appendReboundPlanRiskAudit, readCurrentPlanRiskAudit, validatePlanRiskAuditCandidate, } from './alpha6/plan-risk.js';
|
|
16
|
+
import { appendCurrentPlanRiskAudit, appendReboundPlanRiskAudit, readCurrentPlanRiskAudit, readPlanRiskAuditEvents, validatePlanRiskAuditCandidate, } from './alpha6/plan-risk.js';
|
|
17
17
|
import { appendCorrectiveDecisionEvent, appendPlanIntegrityRecoveryDecision, appendRemediationEvent, appendRemediationModeRecovery, appendStopEscalateOverride, assertCorrectiveAuditorIndependence, assertGuardedRemediationAttemptAllowed, defaultCorrectiveAuditorActor, findCurrentGuardedRemediationPosture, findRemediationModeRecoveryCandidate, findFailedGuardedStepRequiringCorrectiveDecision, readGuardedRemediationPostureForStep, readCorrectiveDecisionEvents, readRemediationEvents, prepareStopEscalateOverride, stopEscalateOverrideDecisionEventIds, } from './alpha6/remediation.js';
|
|
18
18
|
import { assessPlanIntegrityRecovery, defaultPlanIntegrityRecoveryActor, } from './alpha6/plan-integrity.js';
|
|
19
19
|
import { assertMechanicalFeasibilityFresh, evaluateMechanicalFeasibility, hashMechanicalFeasibilityEvidence, } from './alpha6/mechanical-feasibility.js';
|
|
@@ -281,6 +281,92 @@ export class WorkflowService {
|
|
|
281
281
|
invalidation: invalidation.event,
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
+
recoverDownstreamProofReplan(repository, taskId, expectedTaskRevision, actor, reason) {
|
|
285
|
+
const context = this.#mutationContext(repository);
|
|
286
|
+
const task = this.store.readTask(context.identity.projectId, taskId);
|
|
287
|
+
assertExpectedRevision(task, expectedTaskRevision);
|
|
288
|
+
// This repair intentionally runs before Project Knowledge refresh: the exact
|
|
289
|
+
// dependency-only transport can make the current map stale, while the
|
|
290
|
+
// recovery assessment still binds the stranded Task to its recorded rebind.
|
|
291
|
+
const observation = this.observationSnapshot(repository).observation;
|
|
292
|
+
if (observation.kind !== 'assessment') {
|
|
293
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Downstream-proof replan recovery requires a coherent observation boundary.', {
|
|
294
|
+
observation,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
const currentPlanRiskAuditExists = readPlanRiskAuditEvents(this.store, task).some((event) => event.taskRevision === task.revision && event.planHash === task.planHash);
|
|
298
|
+
const assessment = assessDownstreamProofReplanRecovery(this.store, context.identity.repositoryRoot, task, { currentPlanRiskAuditExists });
|
|
299
|
+
const environmentBlockers = [
|
|
300
|
+
...(!assessment.dependencyRecoveryCommit
|
|
301
|
+
? ['The exact beta.12.7 dependency compatibility must be registered before Task recovery.']
|
|
302
|
+
: []),
|
|
303
|
+
...(observation.leases.length > 0 ? ['No active or stale Task writer lease may exist.'] : []),
|
|
304
|
+
...(observation.pendingProjectTransactions.length > 0
|
|
305
|
+
|| observation.pendingMilestoneTransactions.length > 0
|
|
306
|
+
|| observation.pendingTaskTransactions.length > 0
|
|
307
|
+
? ['No pending Workflow transaction may exist.'] : []),
|
|
308
|
+
...(observation.corruptTaskTransactions.length > 0 ? ['No corrupt Task transaction may exist.'] : []),
|
|
309
|
+
...(observation.coreTaskOperations.length > 0 ? ['No Core Task operation may exist.'] : []),
|
|
310
|
+
];
|
|
311
|
+
if (!assessment.applicable || !assessment.eligible || environmentBlockers.length > 0) {
|
|
312
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Task is not eligible for bounded downstream-proof replan recovery.', {
|
|
313
|
+
taskId,
|
|
314
|
+
blockers: [...assessment.blockers, ...environmentBlockers],
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
const now = this.now();
|
|
318
|
+
const resultTask = {
|
|
319
|
+
...task,
|
|
320
|
+
revision: task.revision + 1,
|
|
321
|
+
updatedAt: now.toISOString(),
|
|
322
|
+
status: 'needs_fix',
|
|
323
|
+
authorizations: task.authorizations.map((authorization) => authorization.kind === 'execution' && authorization.decision === 'approved'
|
|
324
|
+
? { ...authorization, decision: 'superseded' }
|
|
325
|
+
: authorization),
|
|
326
|
+
review: emptyReview(),
|
|
327
|
+
resultHash: null,
|
|
328
|
+
evidenceHash: null,
|
|
329
|
+
blockReason: `${assessment.invalidation.activeStepId} downstream-proof recovery requires replacement of the full unfinished Step Plan before execution can resume.`,
|
|
330
|
+
};
|
|
331
|
+
const recovery = prepareDownstreamProofReplanRecovery(this.store, resultTask, assessment, { previousTaskRevision: task.revision, actor, reason }, now);
|
|
332
|
+
const projectRoot = this.store.projectRoot(task.projectId);
|
|
333
|
+
const relative = (absolute) => path.relative(projectRoot, absolute).split(path.sep).join('/');
|
|
334
|
+
const taskRoot = this.store.taskRoot(task.projectId, task.id);
|
|
335
|
+
applyProjectTransaction({
|
|
336
|
+
projectRoot,
|
|
337
|
+
projectId: task.projectId,
|
|
338
|
+
transactionId: `tx-${createEntityId('TASK', now.getTime()).toLowerCase()}`,
|
|
339
|
+
kind: 'downstream-proof-replan-recovery',
|
|
340
|
+
now,
|
|
341
|
+
targets: [
|
|
342
|
+
{
|
|
343
|
+
path: relative(path.join(taskRoot, downstreamProofReplanRecoverySidecar())),
|
|
344
|
+
content: recovery.postimage,
|
|
345
|
+
},
|
|
346
|
+
{ path: relative(path.join(taskRoot, 'state.json')), content: `${JSON.stringify(resultTask, null, 2)}\n` },
|
|
347
|
+
],
|
|
348
|
+
validate: () => {
|
|
349
|
+
const saved = this.store.readTask(task.projectId, task.id);
|
|
350
|
+
const events = readDownstreamProofReplanRecoveries(this.store, saved);
|
|
351
|
+
if (saved.revision !== resultTask.revision
|
|
352
|
+
|| saved.status !== 'needs_fix'
|
|
353
|
+
|| saved.planHash !== task.planHash
|
|
354
|
+
|| events.at(-1)?.eventHash !== recovery.event.eventHash
|
|
355
|
+
|| headCommit(context.identity.repositoryRoot) !== recovery.event.preservedHeadCommit
|
|
356
|
+
|| JSON.stringify(changedFiles(context.identity.repositoryRoot).sort())
|
|
357
|
+
!== JSON.stringify(recovery.event.dirtyFiles)) {
|
|
358
|
+
throw new WorkflowError('STATE_CORRUPT', 'Downstream-proof replan recovery transaction readback failed.', {
|
|
359
|
+
taskId,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
validateTaskHistory(context.identity.repositoryRoot, saved);
|
|
363
|
+
},
|
|
364
|
+
});
|
|
365
|
+
return {
|
|
366
|
+
task: this.store.readTask(task.projectId, task.id),
|
|
367
|
+
recovery: recovery.event,
|
|
368
|
+
};
|
|
369
|
+
}
|
|
284
370
|
correctiveReplanController(repository) {
|
|
285
371
|
const identity = resolveRepositoryIdentity(repository);
|
|
286
372
|
return createCorrectiveReplanPublicController({
|
|
@@ -1177,7 +1263,10 @@ export class WorkflowService {
|
|
|
1177
1263
|
const overriddenStopDecisionEventIds = stopEscalateOverrideDecisionEventIds(this.store, task);
|
|
1178
1264
|
const currentHardBlockingDecisions = currentPlanCorrectiveDecisions.filter((event) => event.decision === 'split-required'
|
|
1179
1265
|
|| (event.decision === 'stop-escalate' && !overriddenStopDecisionEventIds.has(event.eventId)));
|
|
1180
|
-
const
|
|
1266
|
+
const downstreamReplanRecovered = readDownstreamProofReplanRecoveries(this.store, task)
|
|
1267
|
+
.some((event) => event.resultTaskRevision === task.revision && event.reboundPlanHash === task.planHash);
|
|
1268
|
+
const currentPlanRiskAudit = (task.status === 'needs_fix' || currentReplanDecisions.length > 0)
|
|
1269
|
+
&& !downstreamReplanRecovered
|
|
1181
1270
|
? readCurrentPlanRiskAudit(this.store, task)
|
|
1182
1271
|
: null;
|
|
1183
1272
|
const classifiedCorrectivePosture = currentReplanDecisions.length > 0 && currentPlanRiskAudit
|
|
@@ -1946,9 +2035,18 @@ export class WorkflowService {
|
|
|
1946
2035
|
}
|
|
1947
2036
|
const knowledgeMap = this.assertTaskKnowledgeBinding(context.identity.repositoryRoot, task);
|
|
1948
2037
|
const dirty = changedFiles(context.identity.repositoryRoot);
|
|
1949
|
-
|
|
2038
|
+
const downstreamProofCarryover = step.status === 'planned' && dirty.length > 0
|
|
2039
|
+
? assessDownstreamProofCarryover(this.store, context.identity.repositoryRoot, task, stepId)
|
|
2040
|
+
: null;
|
|
2041
|
+
if (step.status === 'planned'
|
|
2042
|
+
&& dirty.length > 0
|
|
2043
|
+
&& !resumesCorrectiveReplan
|
|
2044
|
+
&& !downstreamProofCarryover?.eligible) {
|
|
1950
2045
|
throw new WorkflowError('GIT_PRECONDITION_FAILED', `${stepId} must start from a clean checkout.`, {
|
|
1951
2046
|
changedFiles: dirty,
|
|
2047
|
+
...(downstreamProofCarryover?.applicable
|
|
2048
|
+
? { downstreamProofCarryoverBlockers: downstreamProofCarryover.blockers }
|
|
2049
|
+
: {}),
|
|
1952
2050
|
});
|
|
1953
2051
|
}
|
|
1954
2052
|
const dirtyOutsideStep = dirty.filter((file) => !pathAllowed(file, step.allowedWrites));
|
|
@@ -2944,13 +3042,117 @@ export class WorkflowService {
|
|
|
2944
3042
|
invalidatedStepIds: assessment.invalidatedSteps.map((step) => step.stepId),
|
|
2945
3043
|
});
|
|
2946
3044
|
}
|
|
3045
|
+
downstreamProofReplanUpdatePreflight(repository, taskId) {
|
|
3046
|
+
const snapshot = this.observationSnapshot(repository);
|
|
3047
|
+
if (snapshot.observation.kind !== 'assessment') {
|
|
3048
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Downstream-proof replan update preflight requires a coherent observation boundary.', {
|
|
3049
|
+
observation: snapshot.observation,
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
const task = snapshot.tasks.find((candidate) => candidate.id === taskId);
|
|
3053
|
+
if (!task)
|
|
3054
|
+
throw new WorkflowError('NOT_FOUND', `Task ${taskId} was not found in this repository.`);
|
|
3055
|
+
const currentPlanRiskAuditExists = readPlanRiskAuditEvents(this.store, task).some((event) => event.taskRevision === task.revision && event.planHash === task.planHash);
|
|
3056
|
+
const assessment = assessDownstreamProofReplanRecovery(this.store, snapshot.identity.repositoryRoot, task, { currentPlanRiskAuditExists });
|
|
3057
|
+
const versions = inspectWorkflowVersions(snapshot.identity.repositoryRoot, [task.baseBranch]);
|
|
3058
|
+
const sourceVersion = '2.0.0-beta.12.6';
|
|
3059
|
+
const versionSurfaces = {
|
|
3060
|
+
declared: versions.declared,
|
|
3061
|
+
locked: versions.locked,
|
|
3062
|
+
installed: versions.installed,
|
|
3063
|
+
currentBranch: versions.currentBranch,
|
|
3064
|
+
baseBranch: versions.milestoneBases.find((base) => base.branch === task.baseBranch)?.version ?? null,
|
|
3065
|
+
};
|
|
3066
|
+
const blockers = [
|
|
3067
|
+
...assessment.blockers,
|
|
3068
|
+
...(String(PACKAGE_VERSION) === sourceVersion ? ['Recovery runner must be newer than the beta.12.6 source package.'] : []),
|
|
3069
|
+
...Object.entries(versionSurfaces)
|
|
3070
|
+
.filter(([, version]) => version !== sourceVersion)
|
|
3071
|
+
.map(([surface]) => `${surface} Workflow version must equal the stranded source ${sourceVersion}.`),
|
|
3072
|
+
...(snapshot.observation.leases.length > 0 ? ['No active or stale Task writer lease may exist.'] : []),
|
|
3073
|
+
...(snapshot.observation.pendingProjectTransactions.length > 0
|
|
3074
|
+
|| snapshot.observation.pendingMilestoneTransactions.length > 0
|
|
3075
|
+
|| snapshot.observation.pendingTaskTransactions.length > 0
|
|
3076
|
+
? ['No pending Workflow transaction may exist.'] : []),
|
|
3077
|
+
...(snapshot.observation.corruptTaskTransactions.length > 0 ? ['No corrupt Task transaction may exist.'] : []),
|
|
3078
|
+
...(snapshot.observation.coreTaskOperations.length > 0 ? ['No Core Task operation may exist.'] : []),
|
|
3079
|
+
];
|
|
3080
|
+
return {
|
|
3081
|
+
readOnly: true,
|
|
3082
|
+
eligible: assessment.applicable && assessment.eligible && blockers.length === 0,
|
|
3083
|
+
action: assessment.applicable && assessment.eligible && blockers.length === 0
|
|
3084
|
+
? 'update downstream-proof-replan-transport'
|
|
3085
|
+
: null,
|
|
3086
|
+
projectId: task.projectId,
|
|
3087
|
+
taskId: task.id,
|
|
3088
|
+
taskRevision: task.revision,
|
|
3089
|
+
sourceVersion,
|
|
3090
|
+
targetVersion: PACKAGE_VERSION,
|
|
3091
|
+
sourceHeadCommit: assessment.invalidation?.preservedHeadCommit ?? null,
|
|
3092
|
+
taskBranch: task.taskBranch,
|
|
3093
|
+
baseBranch: task.baseBranch,
|
|
3094
|
+
dirtyFiles: assessment.compatibility?.dirtyFiles ?? [],
|
|
3095
|
+
dirtyWorktreeHash: assessment.compatibility?.dirtyWorktreeHash ?? null,
|
|
3096
|
+
requiredTransport: [
|
|
3097
|
+
'Commit only package.json and package-lock.json on the active Milestone base.',
|
|
3098
|
+
'Commit only the same dependency files on the Task branch while preserving all product bytes.',
|
|
3099
|
+
'Install the exact target package, then follow fresh next to dependency registration.',
|
|
3100
|
+
],
|
|
3101
|
+
blockers,
|
|
3102
|
+
};
|
|
3103
|
+
}
|
|
3104
|
+
downstreamProofReplanDependencyRecoveryPreflight(repository, taskId) {
|
|
3105
|
+
const snapshot = this.observationSnapshot(repository);
|
|
3106
|
+
if (snapshot.observation.kind !== 'assessment') {
|
|
3107
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Downstream-proof replan dependency recovery requires a coherent observation boundary.', {
|
|
3108
|
+
observation: snapshot.observation,
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
const task = snapshot.tasks.find((candidate) => candidate.id === taskId);
|
|
3112
|
+
if (!task)
|
|
3113
|
+
throw new WorkflowError('NOT_FOUND', `Task ${taskId} was not found in this repository.`);
|
|
3114
|
+
let candidateParent = null;
|
|
3115
|
+
try {
|
|
3116
|
+
candidateParent = runGit(snapshot.identity.repositoryRoot, ['rev-parse', 'HEAD^']);
|
|
3117
|
+
}
|
|
3118
|
+
catch {
|
|
3119
|
+
candidateParent = null;
|
|
3120
|
+
}
|
|
3121
|
+
const currentPlanRiskAuditExists = readPlanRiskAuditEvents(this.store, task).some((event) => event.taskRevision === task.revision && event.planHash === task.planHash);
|
|
3122
|
+
const assessment = candidateParent
|
|
3123
|
+
? assessDownstreamProofReplanRecovery(this.store, snapshot.identity.repositoryRoot, task, {
|
|
3124
|
+
historyBoundary: 'HEAD^',
|
|
3125
|
+
preservedHeadCommit: candidateParent,
|
|
3126
|
+
currentPlanRiskAuditExists,
|
|
3127
|
+
})
|
|
3128
|
+
: null;
|
|
3129
|
+
if (!assessment?.applicable || !assessment.eligible || !assessment.compatibility) {
|
|
3130
|
+
const ordinary = this.inspectDependencyProvenanceCandidate(snapshot, task);
|
|
3131
|
+
return {
|
|
3132
|
+
...ordinary,
|
|
3133
|
+
eligible: false,
|
|
3134
|
+
action: null,
|
|
3135
|
+
activeDownstreamProof: null,
|
|
3136
|
+
downstreamProofReplan: null,
|
|
3137
|
+
blockers: [...new Set([
|
|
3138
|
+
...ordinary.blockers,
|
|
3139
|
+
...(assessment?.blockers ?? []),
|
|
3140
|
+
'The Task must preserve the exact beta.12.6 downstream-proof invalidation and accidental knowledge-rebind boundary.',
|
|
3141
|
+
])],
|
|
3142
|
+
};
|
|
3143
|
+
}
|
|
3144
|
+
return this.inspectDependencyProvenanceCandidate(snapshot, task, null, assessment.compatibility);
|
|
3145
|
+
}
|
|
2947
3146
|
recoverDependencyProvenance(repository, taskId, expectedRevision, actor, reason) {
|
|
2948
3147
|
return this.recoverDependencyProvenanceCandidate(repository, taskId, expectedRevision, actor, reason, false);
|
|
2949
3148
|
}
|
|
2950
3149
|
recoverActiveDownstreamProofDependencyProvenance(repository, taskId, expectedRevision, actor, reason) {
|
|
2951
3150
|
return this.recoverDependencyProvenanceCandidate(repository, taskId, expectedRevision, actor, reason, true);
|
|
2952
3151
|
}
|
|
2953
|
-
|
|
3152
|
+
recoverDownstreamProofReplanDependencyProvenance(repository, taskId, expectedRevision, actor, reason) {
|
|
3153
|
+
return this.recoverDependencyProvenanceCandidate(repository, taskId, expectedRevision, actor, reason, 'downstream-replan');
|
|
3154
|
+
}
|
|
3155
|
+
recoverDependencyProvenanceCandidate(repository, taskId, expectedRevision, actor, reason, recoveryMode) {
|
|
2954
3156
|
const normalizedActor = actor.trim();
|
|
2955
3157
|
const normalizedReason = reason.trim();
|
|
2956
3158
|
if (!normalizedActor)
|
|
@@ -2962,7 +3164,9 @@ export class WorkflowService {
|
|
|
2962
3164
|
const currentHead = headCommit(context.identity.repositoryRoot);
|
|
2963
3165
|
const prior = current.dependencyProvenanceRecoveries?.find((record) => record.commitSha === currentHead
|
|
2964
3166
|
&& record.packageVersion === PACKAGE_VERSION
|
|
2965
|
-
&&
|
|
3167
|
+
&& (recoveryMode === 'downstream-replan'
|
|
3168
|
+
? Boolean(record.downstreamProofReplan)
|
|
3169
|
+
: Boolean(record.activeDownstreamProof) === recoveryMode));
|
|
2966
3170
|
if (prior && current.systemCommits.includes(currentHead))
|
|
2967
3171
|
return current;
|
|
2968
3172
|
assertExpectedRevision(current, expectedRevision);
|
|
@@ -2970,9 +3174,11 @@ export class WorkflowService {
|
|
|
2970
3174
|
const task = snapshot.tasks.find((candidate) => candidate.id === taskId);
|
|
2971
3175
|
if (!task)
|
|
2972
3176
|
throw new WorkflowError('NOT_FOUND', `Task ${taskId} was not found in this repository.`);
|
|
2973
|
-
const preflight =
|
|
2974
|
-
? this.
|
|
2975
|
-
:
|
|
3177
|
+
const preflight = recoveryMode === 'downstream-replan'
|
|
3178
|
+
? this.downstreamProofReplanDependencyRecoveryPreflight(repository, taskId)
|
|
3179
|
+
: recoveryMode
|
|
3180
|
+
? this.activeDownstreamProofDependencyRecoveryPreflight(repository, taskId)
|
|
3181
|
+
: this.inspectDependencyProvenanceCandidate(snapshot, task);
|
|
2976
3182
|
if (!preflight.eligible || !preflight.commitSha || !preflight.parentCommitSha) {
|
|
2977
3183
|
throw new WorkflowError('GIT_PRECONDITION_FAILED', 'The bounded dependency provenance recovery preflight failed.', {
|
|
2978
3184
|
taskId,
|
|
@@ -2997,6 +3203,9 @@ export class WorkflowService {
|
|
|
2997
3203
|
...(preflight.activeDownstreamProof
|
|
2998
3204
|
? { activeDownstreamProof: preflight.activeDownstreamProof }
|
|
2999
3205
|
: {}),
|
|
3206
|
+
...(preflight.downstreamProofReplan
|
|
3207
|
+
? { downstreamProofReplan: preflight.downstreamProofReplan }
|
|
3208
|
+
: {}),
|
|
3000
3209
|
},
|
|
3001
3210
|
],
|
|
3002
3211
|
}, expectedRevision);
|
|
@@ -3426,6 +3635,22 @@ export class WorkflowService {
|
|
|
3426
3635
|
},
|
|
3427
3636
|
});
|
|
3428
3637
|
}
|
|
3638
|
+
const downstreamProofReplanDependencyRecovery = this.downstreamProofReplanDependencyRecoveryPreflight(repositoryRoot, activeTask.id);
|
|
3639
|
+
if (downstreamProofReplanDependencyRecovery.eligible) {
|
|
3640
|
+
return withAdoption({
|
|
3641
|
+
scope: 'task',
|
|
3642
|
+
id: activeTask.id,
|
|
3643
|
+
status: activeTask.status,
|
|
3644
|
+
action: 'update downstream-proof-replan-dependency-recover',
|
|
3645
|
+
revision: activeTask.revision,
|
|
3646
|
+
dependencyProvenanceRecovery: downstreamProofReplanDependencyRecovery,
|
|
3647
|
+
compatibilityBoundary: {
|
|
3648
|
+
preservesWorktree: true,
|
|
3649
|
+
prerequisite: 'A newer package preflight approved the exact beta.12.6 stranded replan transport before dependency-only commits were created.',
|
|
3650
|
+
continuation: 'Register this dependency commit, then run task downstream-proof-replan-recover.',
|
|
3651
|
+
},
|
|
3652
|
+
});
|
|
3653
|
+
}
|
|
3429
3654
|
const activeTaskMilestone = activeTask.milestoneId
|
|
3430
3655
|
? milestonesById.get(activeTask.milestoneId) ?? null
|
|
3431
3656
|
: null;
|
|
@@ -3449,36 +3674,109 @@ export class WorkflowService {
|
|
|
3449
3674
|
},
|
|
3450
3675
|
}
|
|
3451
3676
|
: value);
|
|
3677
|
+
const currentPlanRiskAuditExists = activeTask.planHash
|
|
3678
|
+
? readPlanRiskAuditEvents(this.store, activeTask).some((event) => event.taskRevision === activeTask.revision && event.planHash === activeTask.planHash)
|
|
3679
|
+
: false;
|
|
3680
|
+
const downstreamReplanRecovery = assessDownstreamProofReplanRecovery(this.store, repositoryRoot, activeTask, { currentPlanRiskAuditExists });
|
|
3681
|
+
if (downstreamReplanRecovery.applicable) {
|
|
3682
|
+
const environmentBlockers = [
|
|
3683
|
+
...(!downstreamReplanRecovery.dependencyRecoveryCommit
|
|
3684
|
+
? ['The exact beta.12.7 dependency compatibility must be registered before Task recovery.']
|
|
3685
|
+
: []),
|
|
3686
|
+
...(status.observation.leases.length > 0 ? ['No active or stale Task writer lease may exist.'] : []),
|
|
3687
|
+
...(status.observation.pendingProjectTransactions.length > 0
|
|
3688
|
+
|| status.observation.pendingMilestoneTransactions.length > 0
|
|
3689
|
+
|| status.observation.pendingTaskTransactions.length > 0
|
|
3690
|
+
? ['No pending Workflow transaction may exist.'] : []),
|
|
3691
|
+
...(status.observation.corruptTaskTransactions.length > 0 ? ['No corrupt Task transaction may exist.'] : []),
|
|
3692
|
+
...(status.observation.coreTaskOperations.length > 0 ? ['No Core Task operation may exist.'] : []),
|
|
3693
|
+
];
|
|
3694
|
+
return withAdoption(withMilestoneCancellation(downstreamReplanRecovery.eligible && environmentBlockers.length === 0
|
|
3695
|
+
? {
|
|
3696
|
+
scope: 'task',
|
|
3697
|
+
id: activeTask.id,
|
|
3698
|
+
status: activeTask.status,
|
|
3699
|
+
action: 'task downstream-proof-replan-recover',
|
|
3700
|
+
revision: activeTask.revision,
|
|
3701
|
+
downstreamProofReplanRecovery: {
|
|
3702
|
+
state: 'eligible',
|
|
3703
|
+
invalidationEventId: downstreamReplanRecovery.invalidation.eventId,
|
|
3704
|
+
sourcePlanHash: downstreamReplanRecovery.invalidation.planHash,
|
|
3705
|
+
reboundPlanHash: activeTask.planHash,
|
|
3706
|
+
dirtyFiles: downstreamReplanRecovery.compatibility.dirtyFiles,
|
|
3707
|
+
dirtyWorktreeHash: downstreamReplanRecovery.compatibility.dirtyWorktreeHash,
|
|
3708
|
+
dependencyRecoveryCommit: downstreamReplanRecovery.dependencyRecoveryCommit,
|
|
3709
|
+
boundedEffect: 'restore-needs-fix-and-return-same-task-to-plan-set',
|
|
3710
|
+
},
|
|
3711
|
+
}
|
|
3712
|
+
: {
|
|
3713
|
+
scope: 'task',
|
|
3714
|
+
id: activeTask.id,
|
|
3715
|
+
status: activeTask.status,
|
|
3716
|
+
action: 'doctor',
|
|
3717
|
+
blockedAction: 'task downstream-proof-replan-recover',
|
|
3718
|
+
revision: activeTask.revision,
|
|
3719
|
+
downstreamProofReplanRecovery: {
|
|
3720
|
+
state: 'blocked',
|
|
3721
|
+
blockers: [...downstreamReplanRecovery.blockers, ...environmentBlockers],
|
|
3722
|
+
},
|
|
3723
|
+
}));
|
|
3724
|
+
}
|
|
3452
3725
|
let activePlanRiskAudit = null;
|
|
3453
3726
|
let planRiskAuditRecovery = null;
|
|
3454
|
-
|
|
3727
|
+
const requiresReplacementPlan = activeTask.status === 'needs_fix'
|
|
3728
|
+
&& !activeTask.steps.some((step) => step.status === 'failed');
|
|
3729
|
+
if (activeTask.planHash && !requiresReplacementPlan) {
|
|
3455
3730
|
try {
|
|
3456
3731
|
activePlanRiskAudit = readCurrentPlanRiskAudit(this.store, activeTask);
|
|
3457
3732
|
}
|
|
3458
3733
|
catch (error) {
|
|
3459
3734
|
if (!(error instanceof WorkflowError) || error.code !== 'TRANSITION_BLOCKED')
|
|
3460
3735
|
throw error;
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3736
|
+
const blockingDecision = error.details.decision;
|
|
3737
|
+
planRiskAuditRecovery = blockingDecision === 'stop-escalate' || blockingDecision === 'split-required'
|
|
3738
|
+
? {
|
|
3739
|
+
scope: 'task',
|
|
3740
|
+
id: activeTask.id,
|
|
3741
|
+
status: activeTask.status,
|
|
3742
|
+
action: blockingDecision === 'stop-escalate' ? 'task plan-set' : 'doctor',
|
|
3743
|
+
blockedAction: 'task authorize',
|
|
3744
|
+
revision: activeTask.revision,
|
|
3745
|
+
planRiskAuditDecision: {
|
|
3746
|
+
state: 'recorded-blocking',
|
|
3747
|
+
decision: blockingDecision,
|
|
3748
|
+
reason: error.message,
|
|
3749
|
+
requiredAction: blockingDecision === 'stop-escalate'
|
|
3750
|
+
? 'Replace the rejected Step Plan before requesting fresh authorization.'
|
|
3751
|
+
: 'Resolve the required cross-Task split through an explicit Milestone topology decision.',
|
|
3752
|
+
},
|
|
3753
|
+
...(blockingDecision === 'stop-escalate'
|
|
3754
|
+
? { taskPlanContract: this.taskPlanContract(status.projectId, activeTask) }
|
|
3755
|
+
: {}),
|
|
3756
|
+
}
|
|
3757
|
+
: {
|
|
3758
|
+
scope: 'task',
|
|
3759
|
+
id: activeTask.id,
|
|
3760
|
+
status: activeTask.status,
|
|
3761
|
+
action: 'task plan-risk-audit',
|
|
3762
|
+
revision: activeTask.revision,
|
|
3763
|
+
planRiskAuditRecovery: {
|
|
3764
|
+
state: 'required',
|
|
3765
|
+
reason: error.message,
|
|
3766
|
+
currentBriefHash: activeTask.briefHash,
|
|
3767
|
+
currentPlanHash: activeTask.planHash,
|
|
3768
|
+
knowledgeMapRevision: activeTask.knowledgeMapRevision,
|
|
3769
|
+
knowledgeMapHash: activeTask.knowledgeMapHash,
|
|
3770
|
+
},
|
|
3771
|
+
};
|
|
3476
3772
|
}
|
|
3477
3773
|
}
|
|
3478
3774
|
const taskNext = activeTask.status === 'planning'
|
|
3479
3775
|
? null
|
|
3480
|
-
:
|
|
3481
|
-
|
|
3776
|
+
: requiresReplacementPlan
|
|
3777
|
+
? this.nextForTaskWithDelegation(status.projectId, repositoryRoot, activeTask, null)
|
|
3778
|
+
: planRiskAuditRecovery
|
|
3779
|
+
?? this.nextForTaskWithDelegation(status.projectId, repositoryRoot, activeTask, activePlanRiskAudit);
|
|
3482
3780
|
// Active Step work must outrank Project Knowledge refresh/rebind. Both completion and
|
|
3483
3781
|
// strict review are executable while context refresh correctly remains forbidden.
|
|
3484
3782
|
const hardStop = taskNext?.action === 'task corrective-decision'
|
|
@@ -3526,7 +3824,9 @@ export class WorkflowService {
|
|
|
3526
3824
|
? this.store.hashArtifact(this.store.taskRoot(status.projectId, activeTask.id), 'plan.md')
|
|
3527
3825
|
: null)
|
|
3528
3826
|
: null;
|
|
3529
|
-
const contextRefreshOptions = action === 'project-memory reconcile'
|
|
3827
|
+
const contextRefreshOptions = action === 'project-memory reconcile'
|
|
3828
|
+
&& taskNext?.action !== 'task plan-set'
|
|
3829
|
+
&& refreshAssessment?.eligible
|
|
3530
3830
|
? this.delegatedContextRefreshOptions(status.projectId, activeTask, knowledgeMap, refreshAssessment.mode)
|
|
3531
3831
|
: [];
|
|
3532
3832
|
if (requestedTask && action === 'project-memory reconcile' && contextRefreshOptions.length === 0) {
|
|
@@ -3574,6 +3874,9 @@ export class WorkflowService {
|
|
|
3574
3874
|
}));
|
|
3575
3875
|
}
|
|
3576
3876
|
const knowledgeMapHash = hashKnowledgeMap(knowledgeMap);
|
|
3877
|
+
if (taskNext?.action === 'task plan-set') {
|
|
3878
|
+
return withAdoption(withMilestoneCancellation(taskNext));
|
|
3879
|
+
}
|
|
3577
3880
|
if (taskCanRebindKnowledge(activeTask) &&
|
|
3578
3881
|
activeTask.planHash &&
|
|
3579
3882
|
(activeTask.knowledgeMapRevision !== knowledgeMap.revision ||
|
|
@@ -3909,6 +4212,12 @@ export class WorkflowService {
|
|
|
3909
4212
|
}
|
|
3910
4213
|
}
|
|
3911
4214
|
const next = this.taskGitNavigationOverride(task) ?? nextForTask(task);
|
|
4215
|
+
const nextStepId = typeof next.stepId === 'string' ? next.stepId : null;
|
|
4216
|
+
const downstreamProofCarryover = next.action === 'task run'
|
|
4217
|
+
&& nextStepId
|
|
4218
|
+
&& changedFiles(repositoryRoot).length > 0
|
|
4219
|
+
? assessDownstreamProofCarryover(this.store, repositoryRoot, task, nextStepId)
|
|
4220
|
+
: null;
|
|
3912
4221
|
let mechanicalFeasibilityOverlay = {};
|
|
3913
4222
|
if (task.status === 'awaiting_execution_authorization' && task.planHash) {
|
|
3914
4223
|
try {
|
|
@@ -4431,6 +4740,29 @@ export class WorkflowService {
|
|
|
4431
4740
|
}
|
|
4432
4741
|
: {}),
|
|
4433
4742
|
...mechanicalFeasibilityOverlay,
|
|
4743
|
+
...(downstreamProofCarryover?.applicable
|
|
4744
|
+
? downstreamProofCarryover.eligible
|
|
4745
|
+
? {
|
|
4746
|
+
downstreamProofCarryover: {
|
|
4747
|
+
state: 'validated',
|
|
4748
|
+
invalidationEventId: downstreamProofCarryover.invalidationEventId,
|
|
4749
|
+
stepId: nextStepId,
|
|
4750
|
+
dirtyFiles: downstreamProofCarryover.dirtyFiles,
|
|
4751
|
+
dirtyWorktreeHash: downstreamProofCarryover.dirtyWorktreeHash,
|
|
4752
|
+
meaning: 'The replacement Step may adopt exactly these preserved uncommitted bytes on task run.',
|
|
4753
|
+
},
|
|
4754
|
+
}
|
|
4755
|
+
: {
|
|
4756
|
+
action: 'doctor',
|
|
4757
|
+
blockedAction: 'task run',
|
|
4758
|
+
downstreamProofCarryover: {
|
|
4759
|
+
state: 'blocked',
|
|
4760
|
+
invalidationEventId: downstreamProofCarryover.invalidationEventId,
|
|
4761
|
+
stepId: nextStepId,
|
|
4762
|
+
blockers: downstreamProofCarryover.blockers,
|
|
4763
|
+
},
|
|
4764
|
+
}
|
|
4765
|
+
: {}),
|
|
4434
4766
|
...(delegatedApprovalOptions.length > 0 ? { delegatedApprovalOptions } : {}),
|
|
4435
4767
|
};
|
|
4436
4768
|
if (handoffPosture.state === 'pending') {
|
|
@@ -4467,6 +4799,12 @@ export class WorkflowService {
|
|
|
4467
4799
|
};
|
|
4468
4800
|
}
|
|
4469
4801
|
assertTaskContextChangeAllowed(task) {
|
|
4802
|
+
if (task.status === 'needs_fix' && !task.steps.some((step) => step.status === 'failed')) {
|
|
4803
|
+
throw new WorkflowError('TRANSITION_BLOCKED', `Task ${task.id} requires a replacement Step Plan; Project Knowledge cannot rebind or refresh the stale Plan.`, {
|
|
4804
|
+
taskId: task.id,
|
|
4805
|
+
requiredAction: 'Run task plan-set with the full unfinished remainder before requesting authorization.',
|
|
4806
|
+
});
|
|
4807
|
+
}
|
|
4470
4808
|
const posture = this.taskTerminalCorrectivePosture(task);
|
|
4471
4809
|
if (!posture)
|
|
4472
4810
|
return;
|
|
@@ -4588,6 +4926,7 @@ export class WorkflowService {
|
|
|
4588
4926
|
if (!taskIsActionableFromRepositoryNext(task, milestonesById, tasksById)
|
|
4589
4927
|
|| !task.planHash
|
|
4590
4928
|
|| !taskCanRebindKnowledge(task)
|
|
4929
|
+
|| (task.status === 'needs_fix' && !task.steps.some((step) => step.status === 'failed'))
|
|
4591
4930
|
|| this.taskHasTerminalCorrectiveDecision(task))
|
|
4592
4931
|
continue;
|
|
4593
4932
|
const assessment = assessDelegatedKnowledgeRefresh(approved, inspected, task, this.store.hashArtifact(this.store.taskRoot(projectId, task.id), 'plan.md'));
|
|
@@ -4717,7 +5056,7 @@ export class WorkflowService {
|
|
|
4717
5056
|
},
|
|
4718
5057
|
};
|
|
4719
5058
|
}
|
|
4720
|
-
inspectDependencyProvenanceCandidate(snapshot, task, activeDownstreamProof = null) {
|
|
5059
|
+
inspectDependencyProvenanceCandidate(snapshot, task, activeDownstreamProof = null, downstreamProofReplan = null) {
|
|
4721
5060
|
const versions = inspectWorkflowVersions(snapshot.identity.repositoryRoot, [task.baseBranch]);
|
|
4722
5061
|
const now = this.now().getTime();
|
|
4723
5062
|
return inspectDependencyProvenanceRecovery(snapshot.identity.repositoryRoot, task, {
|
|
@@ -4737,7 +5076,7 @@ export class WorkflowService {
|
|
|
4737
5076
|
currentBranch: versions.currentBranch,
|
|
4738
5077
|
baseBranch: versions.milestoneBases.find((base) => base.branch === task.baseBranch)?.version ?? null,
|
|
4739
5078
|
},
|
|
4740
|
-
}, activeDownstreamProof);
|
|
5079
|
+
}, activeDownstreamProof, downstreamProofReplan);
|
|
4741
5080
|
}
|
|
4742
5081
|
withTaskNavigationContracts(task, next) {
|
|
4743
5082
|
const action = typeof next.action === 'string' ? next.action : null;
|