codex-workflow-v2 2.0.0-alpha.7.2 → 2.0.0-beta.1
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 +23 -5
- package/dist/src/alpha6/milestone.d.ts +17 -0
- package/dist/src/alpha6/milestone.js +54 -0
- package/dist/src/alpha6/milestone.js.map +1 -1
- package/dist/src/alpha6/remediation.d.ts +18 -1
- package/dist/src/alpha6/remediation.js +458 -9
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/beta1/project-transaction.d.ts +52 -0
- package/dist/src/beta1/project-transaction.js +297 -0
- package/dist/src/beta1/project-transaction.js.map +1 -0
- package/dist/src/cli.js +23 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +39 -0
- package/dist/src/diagnostics.d.ts +11 -0
- package/dist/src/diagnostics.js +54 -0
- package/dist/src/diagnostics.js.map +1 -1
- package/dist/src/git.js +2 -5
- package/dist/src/git.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/src/workflow.d.ts +11 -1
- package/dist/src/workflow.js +519 -56
- package/dist/src/workflow.js.map +1 -1
- package/docs/alpha7.2.1-remediation-recovery-brief.md +86 -0
- package/docs/autonomy-guardrails.md +3 -2
- package/docs/beta1-stabilization-brief.md +165 -0
- package/docs/delegated-approval.md +4 -3
- package/docs/development-flow.md +6 -4
- package/docs/project-memory.md +7 -5
- package/docs/release.md +9 -2
- package/docs/split-required-recovery.md +53 -0
- package/docs/stable-release-defect-register.md +268 -0
- package/package.json +2 -2
- package/plugins/codex-workflow-gateway/references/protocol.md +6 -2
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +9 -2
- package/schemas/remediation-mode-recovery-event.schema.json +42 -0
- package/schemas/task.schema.json +3 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# Stable Release Defect Register
|
|
2
|
+
|
|
3
|
+
This register captures defects and operational gaps found while running the
|
|
4
|
+
alpha.7 line against the `signal_v4` Milestone 3 lifecycle. It is intentionally
|
|
5
|
+
separate from implementation briefs: an item stays here until it is either
|
|
6
|
+
verified fixed by a regression test or explicitly classified as downstream-only.
|
|
7
|
+
|
|
8
|
+
Last reviewed: 2026-08-15.
|
|
9
|
+
|
|
10
|
+
## Severity and status
|
|
11
|
+
|
|
12
|
+
- **Confirmed** means the behavior was reproduced from package or downstream evidence.
|
|
13
|
+
- **Investigation** means the risk is concrete, but the package defect boundary is not yet proven.
|
|
14
|
+
- **Closed-regression** means a patch exists; the stable release must retain its regression coverage.
|
|
15
|
+
- **Downstream** means the finding belongs to `signal_v4`, not to the workflow package.
|
|
16
|
+
|
|
17
|
+
## Workflow findings closed for beta.1
|
|
18
|
+
|
|
19
|
+
### WF-STABLE-001 — `locks repair` exposes a full writer token
|
|
20
|
+
|
|
21
|
+
- Status: Closed-regression in beta.1
|
|
22
|
+
- Severity: High
|
|
23
|
+
- Area: lock recovery, CLI output, secret handling
|
|
24
|
+
- Evidence: the `locks repair` result includes the complete credential-bearing writer token rather
|
|
25
|
+
than a redacted value or one-time bounded handoff.
|
|
26
|
+
- Risk: a transcript, log, screenshot, or delegated agent output can disclose authority that permits
|
|
27
|
+
state mutation.
|
|
28
|
+
- Stable-release requirement:
|
|
29
|
+
- never print the full token in ordinary JSON or human-readable output;
|
|
30
|
+
- return only a redacted fingerprint unless an explicit secure handoff channel is used;
|
|
31
|
+
- add CLI, JSON-envelope, logging, snapshot, and error-path tests proving no token leakage;
|
|
32
|
+
- preserve deterministic recovery and avoid making the token unrecoverable before ownership is
|
|
33
|
+
safely transferred.
|
|
34
|
+
|
|
35
|
+
### WF-STABLE-002 — standalone Project Knowledge `next` is misleadingly attributed to a failed Task
|
|
36
|
+
|
|
37
|
+
- Status: Closed-regression in beta.1
|
|
38
|
+
- Severity: Medium
|
|
39
|
+
- Area: `next`, Project Knowledge Map, remediation terminality
|
|
40
|
+
- Signal replay evidence:
|
|
41
|
+
- Task `TASK-01M00W190K3V3HM68Q3QVSH1AY` is `needs_fix` with
|
|
42
|
+
`STEP-002-FORMALIZATION-CONTRACTS` failed and a `split-required` decision;
|
|
43
|
+
- after a top-level reconcile, `next` correctly returns scope `project-memory`, action
|
|
44
|
+
`project-memory approve`, revision `168`, but also returns that failed Task as `taskId`.
|
|
45
|
+
- Risk: an agent or operator can interpret a standalone project approval as permission to refresh or
|
|
46
|
+
resume the terminal remediation path.
|
|
47
|
+
- Stable-release requirement:
|
|
48
|
+
- standalone Project Knowledge actions must not look like Task execution actions;
|
|
49
|
+
- either omit `taskId` or expose it under an explicit non-authorizing field such as
|
|
50
|
+
`triggerTaskId`/`stalenessOriginTaskId`;
|
|
51
|
+
- state clearly that approval cannot authorize, refresh, or resume the referenced Task;
|
|
52
|
+
- add a replay for `split-required -> main branch reconcile -> standalone approval next`.
|
|
53
|
+
|
|
54
|
+
### WF-STABLE-003 — terminal `split-required` is routed into unsafe Knowledge rebind
|
|
55
|
+
|
|
56
|
+
- Status: Closed-regression in beta.1
|
|
57
|
+
- Severity: Critical
|
|
58
|
+
- Area: corrective terminal decisions, Milestone membership evolution, `next`
|
|
59
|
+
- Signal replay evidence:
|
|
60
|
+
- after human approval of Project Knowledge Map revision `169`, exact `next` returns
|
|
61
|
+
`task knowledge-rebind` for `TASK-01M00W190K3V3HM68Q3QVSH1AY` at revision `28`;
|
|
62
|
+
- the Task is `needs_fix`, its guarded Step is failed, and its current corrective decision is
|
|
63
|
+
`split-required`;
|
|
64
|
+
- `taskCanRebindKnowledge` accepts every `needs_fix` Task without checking a hard-blocking
|
|
65
|
+
corrective decision;
|
|
66
|
+
- repository `next` lets Knowledge Map rebind override the Task-level `doctor` result for the
|
|
67
|
+
`split-required` posture;
|
|
68
|
+
- `rebindTaskKnowledge` changes the Plan hash, sets status to
|
|
69
|
+
`awaiting_execution_authorization`, clears review/block state, and supersedes execution
|
|
70
|
+
authorization without preserving the terminal decision on the rebound Plan;
|
|
71
|
+
- no Task cancellation transition exists, and a started Task remains repository-actionable while
|
|
72
|
+
its Milestone is active even if membership disposition is changed.
|
|
73
|
+
- Risk: following exact `next` can detach the new Plan hash from the recorded `split-required`
|
|
74
|
+
decision and make the failed Task appear authorizable again. Ignoring `next` to create or
|
|
75
|
+
reclassify a replacement Task cannot remove the started failed Task from repository routing.
|
|
76
|
+
- Stable-release requirement:
|
|
77
|
+
- reject `knowledge-rebind` and `context-refresh` before the first write when the current
|
|
78
|
+
corrective posture is `split-required` or `stop-escalate`;
|
|
79
|
+
- keep terminal corrective decisions effective across Project Knowledge changes without
|
|
80
|
+
rebinding or rewriting the historical Task Plan;
|
|
81
|
+
- provide one unambiguous replacement route with explicit old/new Task relationship;
|
|
82
|
+
- require atomic or journal-recoverable membership evolution;
|
|
83
|
+
- prevent both orphan replacement Tasks and a still-required terminal Task;
|
|
84
|
+
- make repository `next` return that replacement route rather than `knowledge-rebind`;
|
|
85
|
+
- add deterministic and real-agent E2E coverage for
|
|
86
|
+
`split-required -> Project Knowledge approval -> replacement -> Milestone continuation`.
|
|
87
|
+
|
|
88
|
+
### WF-STABLE-004 — workflow package upgrades can remain stranded on a Task branch
|
|
89
|
+
|
|
90
|
+
- Status: Closed-regression in beta.1
|
|
91
|
+
- Severity: Medium
|
|
92
|
+
- Area: update instructions, branch ownership, Milestone base verification
|
|
93
|
+
- Evidence: dependency commit `3f45abc88f7b85091c484d0b84f4c96d1dfeb045` pinned
|
|
94
|
+
`codex-workflow-v2@2.0.0-alpha.7.2.1` only on the failed Task branch while local `main`, the
|
|
95
|
+
Milestone base, remained on alpha.7.1. Recovery required a manually scoped cherry-pick producing
|
|
96
|
+
`fabd1c868a9baa74c7ef273bf0272753c7927812` on local `main`.
|
|
97
|
+
- Risk: diagnostics run with one package version while Milestone creation or replacement work starts
|
|
98
|
+
from another, invalidating assumptions and repeating already-fixed lifecycle failures.
|
|
99
|
+
- Stable-release requirement:
|
|
100
|
+
- update preflight and documentation must distinguish current worktree version from Milestone base
|
|
101
|
+
branch version;
|
|
102
|
+
- provide an explicit dependency-only landing check before lifecycle work continues;
|
|
103
|
+
- fail closed when declared, locked, installed, current-branch, and base-branch versions diverge;
|
|
104
|
+
- never suggest merging unrelated product commits to transport a workflow dependency update.
|
|
105
|
+
|
|
106
|
+
### WF-STABLE-005 — agent guidance did not make replacement membership evolution explicit
|
|
107
|
+
|
|
108
|
+
- Status: Closed-regression in beta.1
|
|
109
|
+
- Severity: Medium
|
|
110
|
+
- Area: recovery prompts, operator guidance
|
|
111
|
+
- Evidence: the generated post-approval prompt said to create a thin required replacement Task but
|
|
112
|
+
did not explicitly require reclassification of the old failed membership and Milestone
|
|
113
|
+
reauthorization through exact Core transitions.
|
|
114
|
+
- Risk: correct package primitives can still be used in the wrong order, recreating an apparently
|
|
115
|
+
active but non-completable Milestone.
|
|
116
|
+
- Stable-release requirement:
|
|
117
|
+
- ship a canonical `split-required` operator/delegate recovery prompt;
|
|
118
|
+
- require `status`/`next` after every state boundary;
|
|
119
|
+
- distinguish Task creation, replacement linkage, membership evolution, and execution
|
|
120
|
+
reauthorization;
|
|
121
|
+
- prohibit manual state editing and resumption of the failed Step.
|
|
122
|
+
|
|
123
|
+
### WF-STABLE-006 — composite context refresh has no multi-file crash-recovery journal
|
|
124
|
+
|
|
125
|
+
- Status: Closed-regression in beta.1
|
|
126
|
+
- Severity: High
|
|
127
|
+
- Area: Project Knowledge refresh, Task rebind, delegated reauthorization, durability
|
|
128
|
+
- Evidence: alpha.7.1 validates the complete transition before its first canonical write and uses
|
|
129
|
+
atomic replacement for each individual file, but the composite transition performs multiple file
|
|
130
|
+
writes without a transaction journal. A process or machine failure between those writes can leave
|
|
131
|
+
a partially applied cross-file transition.
|
|
132
|
+
- Risk: the repository can be clean while Project Knowledge, Task binding, authorization, and audit
|
|
133
|
+
sidecars disagree after a crash. Prevalidation prevents logical rejection after the first write but
|
|
134
|
+
cannot recover an interrupted physical write sequence.
|
|
135
|
+
- Stable-release requirement:
|
|
136
|
+
- introduce a project-local transaction journal or an equivalent recoverable commit protocol;
|
|
137
|
+
- define deterministic roll-forward/rollback semantics for every write boundary;
|
|
138
|
+
- make recovery idempotent and preserve append-only audit history;
|
|
139
|
+
- add crash-injection tests before and after each canonical and sidecar write;
|
|
140
|
+
- prove `doctor`, `status`, and `next` detect and route every interrupted legacy/candidate shape;
|
|
141
|
+
- never silently treat a partial refresh as authorized.
|
|
142
|
+
|
|
143
|
+
### WF-STABLE-007 — full validation commands may race through shared build/clean outputs
|
|
144
|
+
|
|
145
|
+
- Status: Closed-regression in beta.1
|
|
146
|
+
- Severity: Medium if confirmed
|
|
147
|
+
- Area: maintainer validation, reproducibility
|
|
148
|
+
- Evidence: concurrent `npm test` and `npm run validate` runs stopped producing reliable completion
|
|
149
|
+
evidence after both reached shared test/build phases. A later sequential run continued normally.
|
|
150
|
+
The observed behavior is consistent with shared `build`/`clean` output contention, but the exact
|
|
151
|
+
cause has not been isolated.
|
|
152
|
+
- Risk: maintainers can mistake a hung or corrupted concurrent run for passing release evidence, or
|
|
153
|
+
waste hours waiting on a validation process that cannot complete deterministically.
|
|
154
|
+
- Verification required:
|
|
155
|
+
- reproduce with process-level tracing and isolated logs;
|
|
156
|
+
- identify shared directories, cleanup commands, ports, caches, and child processes;
|
|
157
|
+
- distinguish a package-script race from a test-runner or environment defect.
|
|
158
|
+
- Stable-release requirement if confirmed:
|
|
159
|
+
- isolate run outputs/resources or enforce an explicit single-run lock with a clear diagnostic;
|
|
160
|
+
- ensure interruption cleans up child processes and resources;
|
|
161
|
+
- document whether concurrent full validation is supported;
|
|
162
|
+
- add a deterministic concurrency regression where practical.
|
|
163
|
+
|
|
164
|
+
### WF-STABLE-008 — replacement Task local start required a manual base-branch switch
|
|
165
|
+
|
|
166
|
+
- Status: Closed-regression in beta.1
|
|
167
|
+
- Severity: Low
|
|
168
|
+
- Area: local Task start, replacement autonomy, Git preconditions
|
|
169
|
+
- Evidence: the final disposable E2E correctly materialized and reauthorized the replacement, but
|
|
170
|
+
its first `task start` was safely rejected because the clean checkout still pointed at the
|
|
171
|
+
cancelled Task branch instead of `main`; the Delegate recovered by switching branches and retrying.
|
|
172
|
+
- Stable guard: local Task start resolves the exact declared base ref and creates the new Task branch
|
|
173
|
+
from that ref even when another clean Task branch is checked out. Dirty worktrees and external
|
|
174
|
+
ownership rules remain fail-closed.
|
|
175
|
+
|
|
176
|
+
## Beta.1 closure evidence
|
|
177
|
+
|
|
178
|
+
- `WF-STABLE-001`: CLI integration proves both inspection and stale repair return only a token
|
|
179
|
+
fingerprint and never the writer token.
|
|
180
|
+
- `WF-STABLE-002`: repository navigation returns diagnostic provenance as
|
|
181
|
+
`stalenessOriginTaskId` with `authorizesTask: false`; eligible atomic refresh is a Task-scoped
|
|
182
|
+
top-level action.
|
|
183
|
+
- `WF-STABLE-003`: deterministic terminal replay and the disposable real-agent Milestone prove
|
|
184
|
+
`split-required -> replacement -> reauthorization -> merge -> final acceptance`, with the old
|
|
185
|
+
Task cancelled, linked, immutable in history, and without a retained writer lease.
|
|
186
|
+
- `WF-STABLE-004`: update-preflight regressions cover declared, locked, installed, current-branch,
|
|
187
|
+
and active Milestone base versions plus dependency-only transport guidance.
|
|
188
|
+
- `WF-STABLE-005`: `docs/split-required-recovery.md` and the packaged gateway protocol define one
|
|
189
|
+
exact replacement ordering and prohibit manual membership/state mutation.
|
|
190
|
+
- `WF-STABLE-006`: beta transaction regressions inject ordinary failure and dead-process exit at
|
|
191
|
+
every target-write boundary, then prove rollback or idempotent roll-forward, including file
|
|
192
|
+
deletion. Context refresh and replacement both use the project journal.
|
|
193
|
+
- `WF-STABLE-007`: a deterministic second full-validation owner fails immediately with
|
|
194
|
+
`VALIDATION_ALREADY_RUNNING`; the sequential release suite completed normally.
|
|
195
|
+
- `WF-STABLE-008`: the local branch-start regression begins on a clean historical Task branch and
|
|
196
|
+
proves the new Task branch is created from the exact `main` commit.
|
|
197
|
+
|
|
198
|
+
## Downstream findings to retain as E2E fixtures
|
|
199
|
+
|
|
200
|
+
### SIGNAL-M3-001 — stable identifier validation misses real U+0000 after line terminators
|
|
201
|
+
|
|
202
|
+
- Status: Downstream confirmed defect
|
|
203
|
+
- Owner: `signal_v4`
|
|
204
|
+
- Workflow relevance: use as the thin replacement-Task fixture for validating `split-required`
|
|
205
|
+
recovery; do not implement the product fix in this repository.
|
|
206
|
+
- Required downstream acceptance: reject real U+0000 in every position, including immediately after
|
|
207
|
+
line terminators, without weakening other stable-identifier rules.
|
|
208
|
+
|
|
209
|
+
### SIGNAL-M3-002 — Project Knowledge has an unresolved `ownership` gap
|
|
210
|
+
|
|
211
|
+
- Status: Downstream gap, currently non-blocking
|
|
212
|
+
- Owner: `signal_v4`
|
|
213
|
+
- Evidence: candidate Knowledge Map revision `168`, hash
|
|
214
|
+
`8d775d82fb1aec85322a923ecf62053453160376033f45bd3c7e2a8c2588d51d`, reports no conflicts
|
|
215
|
+
and one missing `ownership` category source.
|
|
216
|
+
- Rule: do not expand the NUL replacement Task to fix this gap. Track it as separate project
|
|
217
|
+
documentation work.
|
|
218
|
+
|
|
219
|
+
### SIGNAL-M3-003 — local `main` has no configured `origin`
|
|
220
|
+
|
|
221
|
+
- Status: Downstream operational risk
|
|
222
|
+
- Owner: `signal_v4`
|
|
223
|
+
- Evidence: local `main` is at `fabd1c868a9baa74c7ef273bf0272753c7927812`, but `git ls-remote
|
|
224
|
+
--heads origin main` fails because `origin` is not configured.
|
|
225
|
+
- Risk: a local dependency correction may be mistaken for a shared or durable project update.
|
|
226
|
+
- Rule: resolve repository remote/backup policy separately; do not let workflow lifecycle commands
|
|
227
|
+
infer permission to publish.
|
|
228
|
+
|
|
229
|
+
## Closed alpha.7 regressions that must not recur
|
|
230
|
+
|
|
231
|
+
### WF-REG-001 — context-only Knowledge Map rebinding invalidated `continue-fix`
|
|
232
|
+
|
|
233
|
+
- Status: Closed-regression in alpha.7.2
|
|
234
|
+
- Stable guard: semantic Plan equality must preserve an authorized `continue-fix`; semantic changes
|
|
235
|
+
must invalidate it; recovery remains append-only and non-mutating on failure.
|
|
236
|
+
|
|
237
|
+
### WF-REG-002 — recovered corrective decision still produced `TOKEN_RECOVERY_NO_GO`
|
|
238
|
+
|
|
239
|
+
- Status: Closed-regression in alpha.7.2.1
|
|
240
|
+
- Stable guard: an append-only remediation-mode recovery must restore the exact allowed transition
|
|
241
|
+
without a fourth remediation run, duplicate decision, manual state edit, or writer-lease bypass.
|
|
242
|
+
|
|
243
|
+
### WF-REG-003 — delegated creation of exact Plan-declared supporting Knowledge sources was blocked
|
|
244
|
+
|
|
245
|
+
- Status: Closed-regression in alpha.7.1
|
|
246
|
+
- Stable guard: only exact normalized Plan-declared supporting sources with
|
|
247
|
+
`knowledgeImpact=create` may be added; wildcard, directory, canonical, unauthorized, removal,
|
|
248
|
+
category/authority changes, gaps, and conflicts remain blocked before the first write.
|
|
249
|
+
|
|
250
|
+
### WF-REG-004 — E2E history contained a spurious review failure from the harness
|
|
251
|
+
|
|
252
|
+
- Status: Closed-regression in alpha.7.1 E2E evidence
|
|
253
|
+
- Stable guard: fresh real-agent E2E evidence must separate harness/setup failures from lifecycle
|
|
254
|
+
review attempts and must not pollute the Task remediation history.
|
|
255
|
+
|
|
256
|
+
### WF-REG-005 — `next` offered work that the exact transition would reject
|
|
257
|
+
|
|
258
|
+
- Status: Closed-regression in alpha.7.2
|
|
259
|
+
- Stable guard: `next` must use the same binding, recovery, terminal-decision, and corruption
|
|
260
|
+
predicates as the exact mutating transition. If the transition is guaranteed to reject, `next`
|
|
261
|
+
must return the recovery/blocking action instead of a Task run.
|
|
262
|
+
|
|
263
|
+
## Stable-release exit rule
|
|
264
|
+
|
|
265
|
+
The stable release is not ready while any Confirmed workflow finding above is open. Investigation
|
|
266
|
+
items must be either reproduced and fixed or closed with recorded evidence that Core already provides
|
|
267
|
+
the required safe semantics. Downstream findings do not block the package by themselves, but the NUL
|
|
268
|
+
fixture must complete the real-agent replacement path through final Milestone acceptance.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-workflow-v2",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"clean": "node --eval \"import('node:fs').then(({rmSync}) => { rmSync('dist', {recursive:true, force:true}); rmSync('.test-dist', {recursive:true, force:true}); })\"",
|
|
41
41
|
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/mark-cli-executable.mjs",
|
|
42
42
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
43
|
-
"test": "
|
|
43
|
+
"test": "node scripts/with-validation-lock.mjs test",
|
|
44
44
|
"validate": "npm run typecheck && npm test",
|
|
45
45
|
"pack:check": "npm run build && npm pack --dry-run",
|
|
46
46
|
"smoke:downstream": "npm run build && node scripts/downstream-smoke.mjs",
|
|
@@ -25,6 +25,8 @@ Current capability set:
|
|
|
25
25
|
- `delegated-approval-v1`
|
|
26
26
|
- `task-knowledge-rebind-v1`
|
|
27
27
|
- `task-context-refresh-v1`
|
|
28
|
+
- `terminal-task-replacement-transaction-v1`
|
|
29
|
+
- `project-composite-transaction-journal-v1`
|
|
28
30
|
- `corrective-plan-audit-v1`
|
|
29
31
|
- `safe-update-preflight-v1`
|
|
30
32
|
- `strict-reviewer-v1`
|
|
@@ -127,8 +129,10 @@ classifications. A planned new scanner-visible Knowledge file must be declared w
|
|
|
127
129
|
directories, and inferred authority are not declarations; only Core may decide whether the final
|
|
128
130
|
diff is eligible for delegated refresh.
|
|
129
131
|
|
|
130
|
-
Use `task context-refresh` only when the same `next` response
|
|
131
|
-
exact grant. Pass Task revision, map revision, delegate actor, and
|
|
132
|
+
Use `task context-refresh` only when the same `next` response returns it as the top-level action and
|
|
133
|
+
exposes `contextRefresh` for the exact grant. Pass Task revision, map revision, delegate actor, and
|
|
134
|
+
grant ID. Never run standalone `project-memory reconcile` first; Core blocks that non-atomic route
|
|
135
|
+
when the exact delegated composite is available. The composite
|
|
132
136
|
operation accepts content-hash-only drift and, under a Milestone Autonomy Grant, an exact
|
|
133
137
|
supporting-source addition predeclared by the current execution-authorized Task Plan. Core checks
|
|
134
138
|
the full fail-closed predicate; do not reconstruct it in the gateway. When `next` instead returns
|
|
@@ -51,12 +51,19 @@ scanner category. Do not replace the path with a wildcard or directory, do not i
|
|
|
51
51
|
authority, and do not claim delegated-refresh eligibility; Core decides eligibility from the
|
|
52
52
|
resulting repository diff and current authorization state.
|
|
53
53
|
|
|
54
|
-
When `next`
|
|
55
|
-
the returned Task/map revisions, actor, and grant.
|
|
54
|
+
When `next` returns top-level `action: task context-refresh`, use only that atomic action for
|
|
55
|
+
the returned Task/map revisions, actor, and grant. Do not run standalone `project-memory reconcile`
|
|
56
|
+
first: Core rejects it because it would create a human-approval gap and strand the Task. A
|
|
57
|
+
source-set change is eligible only when
|
|
56
58
|
Core identifies it as a Plan-bounded supporting-source addition under the same Milestone
|
|
57
59
|
Autonomy Grant. Never infer eligibility from the Plan yourself; if Core returns
|
|
58
60
|
`contextRefreshBlocked.unsafeDifferences`, use the ordinary visible Knowledge Map flow.
|
|
59
61
|
|
|
62
|
+
When `next` reports terminal `split-required`, follow `docs/split-required-recovery.md` from the
|
|
63
|
+
installed package. The only valid continuation is the exact `task replacement-materialize`
|
|
64
|
+
transition (or creation of its one ready Discovery when requested). Never rebind, refresh, replan,
|
|
65
|
+
authorize, or resume the historical Task, and never emulate the membership changes manually.
|
|
66
|
+
|
|
60
67
|
## Product Or Workflow Graph Refresh
|
|
61
68
|
|
|
62
69
|
1. Run `graph refresh-request --kind product|workflow --mode moderate`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://codex-workflow.local/schemas/remediation-mode-recovery-event.schema.json",
|
|
4
|
+
"title": "Codex Workflow V2 Remediation Mode Recovery Event",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"eventId", "taskId", "stepId", "taskRevision", "remediationEventId",
|
|
9
|
+
"remediationEventHash", "correctiveDecisionEventId", "correctiveDecisionEventHash",
|
|
10
|
+
"correctiveDecisionRecoveryEventId", "correctiveDecisionRecoveryEventHash",
|
|
11
|
+
"attemptOrdinal", "planHash", "actor", "c1ClaimEventHash",
|
|
12
|
+
"writerLeaseTokenHash", "fromMode", "toMode", "reason",
|
|
13
|
+
"previousEventHash", "recordedAt", "eventHash"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"eventId": { "type": "string", "pattern": "^RMR-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
17
|
+
"taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
18
|
+
"stepId": { "type": "string", "pattern": "^STEP-[0-9]{3}(?:-[A-Z0-9-]+)?$" },
|
|
19
|
+
"taskRevision": { "type": "integer", "minimum": 1 },
|
|
20
|
+
"remediationEventId": { "type": "string", "pattern": "^RME-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
21
|
+
"remediationEventHash": { "$ref": "#/$defs/hash64" },
|
|
22
|
+
"correctiveDecisionEventId": { "type": "string", "pattern": "^CRD-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
23
|
+
"correctiveDecisionEventHash": { "$ref": "#/$defs/hash64" },
|
|
24
|
+
"correctiveDecisionRecoveryEventId": { "type": "string", "pattern": "^CDR-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
25
|
+
"correctiveDecisionRecoveryEventHash": { "$ref": "#/$defs/hash64" },
|
|
26
|
+
"attemptOrdinal": { "const": 3 },
|
|
27
|
+
"planHash": { "$ref": "#/$defs/hash64" },
|
|
28
|
+
"actor": { "type": "string", "minLength": 1 },
|
|
29
|
+
"c1ClaimEventHash": { "$ref": "#/$defs/nullableHash64" },
|
|
30
|
+
"writerLeaseTokenHash": { "$ref": "#/$defs/nullableHash64" },
|
|
31
|
+
"fromMode": { "const": "ordinary" },
|
|
32
|
+
"toMode": { "const": "corrective" },
|
|
33
|
+
"reason": { "const": "alpha7.2-recovered-continue-fix-mode-omission" },
|
|
34
|
+
"previousEventHash": { "$ref": "#/$defs/nullableHash64" },
|
|
35
|
+
"recordedAt": { "type": "string", "format": "date-time" },
|
|
36
|
+
"eventHash": { "$ref": "#/$defs/hash64" }
|
|
37
|
+
},
|
|
38
|
+
"$defs": {
|
|
39
|
+
"hash64": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
40
|
+
"nullableHash64": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
|
|
41
|
+
}
|
|
42
|
+
}
|
package/schemas/task.schema.json
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"additionalProperties": false
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"replacementForTaskId": { "type": ["string", "null"], "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
57
|
+
"replacedByTaskId": { "type": ["string", "null"], "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" }
|
|
56
58
|
}
|
|
57
59
|
}
|