codex-workflow-v2 2.0.0-alpha.7.2.1 → 2.0.0-beta.2

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.
Files changed (39) hide show
  1. package/README.md +24 -5
  2. package/dist/src/alpha6/milestone.d.ts +27 -0
  3. package/dist/src/alpha6/milestone.js +152 -1
  4. package/dist/src/alpha6/milestone.js.map +1 -1
  5. package/dist/src/beta1/project-transaction.d.ts +52 -0
  6. package/dist/src/beta1/project-transaction.js +297 -0
  7. package/dist/src/beta1/project-transaction.js.map +1 -0
  8. package/dist/src/cli.js +239 -4
  9. package/dist/src/cli.js.map +1 -1
  10. package/dist/src/contracts.d.ts +20 -0
  11. package/dist/src/diagnostics.d.ts +11 -0
  12. package/dist/src/diagnostics.js +54 -0
  13. package/dist/src/diagnostics.js.map +1 -1
  14. package/dist/src/git.js +2 -5
  15. package/dist/src/git.js.map +1 -1
  16. package/dist/src/reviewer.d.ts +4 -0
  17. package/dist/src/reviewer.js +24 -7
  18. package/dist/src/reviewer.js.map +1 -1
  19. package/dist/src/version.d.ts +1 -1
  20. package/dist/src/version.js +1 -1
  21. package/dist/src/version.js.map +1 -1
  22. package/dist/src/workflow.d.ts +28 -1
  23. package/dist/src/workflow.js +658 -54
  24. package/dist/src/workflow.js.map +1 -1
  25. package/docs/autonomy-guardrails.md +11 -3
  26. package/docs/beta1-stabilization-brief.md +165 -0
  27. package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
  28. package/docs/delegated-approval.md +4 -3
  29. package/docs/development-flow.md +23 -6
  30. package/docs/project-memory.md +7 -5
  31. package/docs/release.md +16 -2
  32. package/docs/split-required-recovery.md +54 -0
  33. package/docs/stable-release-defect-register.md +597 -0
  34. package/docs/updating-existing-project.md +2 -0
  35. package/package.json +2 -2
  36. package/plugins/codex-workflow-gateway/references/protocol.md +62 -3
  37. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +53 -2
  38. package/references/state-machine.md +4 -1
  39. package/schemas/task.schema.json +3 -1
@@ -0,0 +1,597 @@
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
+ ## Beta.2 closure candidates
18
+
19
+ ### WF-STABLE-009 — initial assembly creates a state rejected by `status` and `next`
20
+
21
+ - Status: Closed-regression in beta.2
22
+ - Severity: Critical
23
+ - Area: Milestone initial assembly, reverse membership, repository navigation
24
+ - Evidence: both the beta.1 real-agent E2E and the live read-only `signal_v4` reincarnation
25
+ materialized a first linked planning Task successfully, after which `status` and `next` returned
26
+ `MILESTONE_SCOPE_INCOMPLETE` for the intentionally repairable pre-Plan membership gap.
27
+ - Risk: the documented seven-Task initial assembly cannot follow authoritative `next`; agents must
28
+ either stop before work begins or bypass navigation and invalidate lifecycle evidence.
29
+ - Closure evidence: centralized initial-assembly assessment, deterministic fresh/adopted/unsafe
30
+ regressions, exact copied `signal_v4` snapshot replay, and real-agent seven-Task assembly all pass;
31
+ strict reverse-membership blocking remains active outside the exact predicate.
32
+
33
+ ### WF-STABLE-010 — beta.1 release E2E continued after failed `next`
34
+
35
+ - Status: Closed-regression in beta.2; clean release E2E verified
36
+ - Severity: Critical
37
+ - Area: release evidence, real-agent transcript validation
38
+ - Evidence: the beta.1 final E2E transcript contains failed `status` and `next` calls with
39
+ `MILESTONE_SCOPE_INCOMPLETE`; the Delegate labelled the gap expected, invoked direct
40
+ `milestone plan-set`, and the final audit still accepted the run despite the Brief explicitly
41
+ declaring a `next` bypass invalid.
42
+ - Risk: a real-agent run can conceal a Core lifecycle defect and produce a false release
43
+ recommendation.
44
+ - Candidate evidence: the append-only transcript validator rejects navigation bypasses,
45
+ unadvertised mutations, failed non-retryable mutations, unresolved syntax retries, and
46
+ unterminated harness invocations. Final-21 passed the complete validator with `250/250` events.
47
+
48
+ ### WF-STABLE-011 — pending Task review `next` names a non-autonomous primitive
49
+
50
+ - Status: Closed-regression in beta.2; clean release E2E verified
51
+ - Severity: High
52
+ - Area: Task final review, truthful navigation, real-agent evidence
53
+ - Evidence: the first beta.2 real-agent diagnostic run reached a submitted Task with pending review;
54
+ `next` returned `task review-record`, while the packaged and successfully executed autonomous
55
+ command was `task review-launch`.
56
+ - Risk: an agent following the exact autonomous route appears to bypass authoritative navigation,
57
+ while an agent following the literal response must manufacture reviewer output instead of using
58
+ the isolated reviewer launcher.
59
+ - Candidate evidence: deterministic navigation regressions prove exact `task review-launch` while
60
+ preserving `task result-set` after a passed review. Final-21 completed strict Step review and the
61
+ final independent Task review without a rejected lifecycle mutation.
62
+
63
+ ### WF-STABLE-012 — Core-owned Git transitions omit the sandbox permission contract
64
+
65
+ - Status: Closed-regression in beta.2; clean release E2E verified
66
+ - Severity: High
67
+ - Area: Task execution, truthful navigation, Codex sandbox integration
68
+ - Evidence: the rebuilt beta.2 real-agent E2E followed `next.action = task step-complete`; Core ran
69
+ its owned checks and then failed non-mutating at `git add` because `.git/index.lock` was denied.
70
+ The exact same transition succeeded after a bounded Git-metadata escalation.
71
+ - Risk: a nominally autonomous Milestone learns required authority only by failing a lifecycle
72
+ mutation. This creates noisy retry history, invalidates clean release transcripts, and can strand
73
+ less capable agents despite a valid Plan and grant.
74
+ - Candidate evidence: positive and negative navigation regressions cover the four local Git-writing
75
+ transitions and absence on read-only/external routes. Final-21 consumed the policy before local
76
+ start, Step completion, and Core merge without a rejected lifecycle mutation.
77
+
78
+ ### WF-STABLE-013 — strict reviewer can wait indefinitely or fail before launch
79
+
80
+ - Status: Closed-regression in beta.2; clean release E2E verified
81
+ - Severity: Critical
82
+ - Area: strict Step review, final Task review, non-interactive Codex subprocess lifecycle
83
+ - Evidence: beta.2 `real-agent-release-final-6` left two `task step-review` parents and two nested
84
+ `codex exec` reviewers alive for more than five minutes at unchanged Task revision `6`. Neither
85
+ invocation returned a terminal success or failure result.
86
+ - Additional evidence: beta.2 `real-agent-release-final-10` exposed an integration error in the
87
+ first correction: the global `--ask-for-approval never` option was placed after `exec`, which the
88
+ real Codex CLI rejected with status `2`. Two launch failures consumed the two ordinary
89
+ remediation attempts before the run was stopped.
90
+ - Root cause: the strict reviewer used inherited/default approval behavior despite intentionally
91
+ probing a denied write, the synchronous subprocess had no host-side deadline, and the initial
92
+ correction did not test the real CLI's global-option ordering contract.
93
+ - Risk: an autonomous Milestone can hang forever inside Core before review evidence exists; a retry
94
+ can create a second concurrent reviewer for the same Step/revision.
95
+ - Candidate evidence: strict reviewers now place `approval=never` before the `exec` subcommand,
96
+ retain read-only sandboxing, and have a fixed host-side execution deadline that returns terminal
97
+ `unverified` evidence on timeout. Focused tests assert the exact global-option ordering as well as
98
+ deadline propagation and timeout fail-closed behavior. Final-21 completed both strict reviewer
99
+ invocations under the non-interactive, ephemeral, ignore-config/rules, read-only contract.
100
+
101
+ ### WF-STABLE-014 — transcript validator accepts a started mutation with no terminal result
102
+
103
+ - Status: Closed-regression in beta.2; clean release E2E verified
104
+ - Severity: Critical
105
+ - Area: release evidence, append-only harness transcript, indeterminate mutation recovery
106
+ - Evidence: the incomplete `real-agent-release-final-6` transcript originally returned PASS with
107
+ `181` checked events even though two `task step-review` commentaries had no matching mutation
108
+ result and the Task remained at revision `6`. Final-8 then exposed the same class for read-only
109
+ commands: successful `milestone autonomy-prepare` had no terminal observation event, so the
110
+ wrapper log alone could not distinguish success, failure, or interruption.
111
+ - Risk: a hung or externally interrupted mutation can be presented as valid release evidence; an
112
+ agent may re-enter the same semantic transition without knowing whether the first process is
113
+ still active.
114
+ - Candidate evidence: the validator pairs trusted-harness invocation commentary with the exact
115
+ terminal navigation, mutation, or read-only observation result; rejects failed observations,
116
+ EOF with a pending invocation, and any second command before the pending invocation resolves.
117
+ Immutable final-6 and final-8 transcripts are retained as diagnostic evidence and rejected for
118
+ their respective stranded invocations.
119
+
120
+ ### WF-STABLE-015 — `task plan-set` navigation omits its exact inclusion contract
121
+
122
+ - Status: Closed-regression in beta.2; clean release E2E verified
123
+ - Severity: High
124
+ - Area: Task planning navigation, autonomous Plan construction, fail-before-write usability
125
+ - Evidence: the Delegate followed `next.action = task plan-set` and produced substantive acceptance
126
+ statements, but Core rejected the first Plan because it did not contain the opaque Task acceptance
127
+ ID `AC-001` as an exact array member. The Task remained planning at revision `1`; the transcript
128
+ correctly rejected the run as failed release evidence.
129
+ - Root cause: Core validates exact Task requirement and acceptance ID inclusion, while `next`
130
+ previously exposed only the action and revision. The machine-readable precondition was visible
131
+ only indirectly in large status/Brief output and was not part of the exact transition contract.
132
+ - Candidate evidence: every `task plan-set` navigation now returns `taskPlanContract` with exact
133
+ required requirement IDs, acceptance IDs, current risks, Brief hash, and current Knowledge Map binding. The
134
+ packaged gateway requires planners to copy those exact IDs before adding semantic detail.
135
+
136
+ ### WF-STABLE-016 — Git-completion navigation omits the required writer lease input
137
+
138
+ - Status: Closed-regression in beta.2; clean release E2E verified
139
+ - Severity: High
140
+ - Area: Task completion/merge navigation, writer lease continuity, autonomous execution
141
+ - Evidence: after successful implementation, strict Step review, Task review, result, and delegated
142
+ acceptance, `next` advertised `task merge` plus `gitMutationPolicy`. The Delegate followed that
143
+ response without `--writer-token`; the CLI rejected the invocation before any mutation.
144
+ - Root cause: the mandatory writer lease was enforced by each transition but absent from the exact
145
+ machine-readable navigation contract. The gateway therefore had no local precondition telling it
146
+ to retain and pass the sensitive lease on the first call.
147
+ - Candidate evidence: `next` returns a non-secret `writerTokenContract` for `task step-complete`,
148
+ `task submit`, `task merge`, and `task merge-confirm`, and omits it for non-consuming adjacent
149
+ transitions. The packaged gateway treats it as a first-call precondition and never prints or
150
+ persists the token.
151
+
152
+ ### WF-STABLE-017 — subcommand `--help` is treated as a lifecycle mutation
153
+
154
+ - Status: Closed-regression in beta.2; clean release E2E verified
155
+ - Severity: High
156
+ - Area: CLI command discovery, autonomous execution, release transcript integrity
157
+ - Evidence: after clean seven-Task assembly and an active owner autonomy grant, the real Delegate
158
+ invoked `milestone authorize --help`. The CLI dispatched the underlying lifecycle operation and
159
+ rejected it with `INVALID_ARGUMENT: Missing required option --id` before any state write.
160
+ - Root cause: CLI dispatch had no early help route; parsed `--help` remained an unused option while
161
+ noun/action matching entered the ordinary mutation implementation.
162
+ - Candidate evidence: help is intercepted before repository/state construction, returns exit `0`
163
+ with a machine-readable `readOnly` response at top-level, noun, and action scopes, and never
164
+ requests mutation inputs or changes workflow state. Critical autonomous transitions expose exact
165
+ required and optional option lists. The transcript validator recognizes safe trusted-harness help
166
+ observations, rejects mutation-style help inputs, and requires a fresh successful `next` before
167
+ any subsequent mutation.
168
+
169
+ ### WF-STABLE-018 — credential-bearing receipts are buried after large Task payloads
170
+
171
+ - Status: Closed-regression in beta.2; clean release E2E verified
172
+ - Severity: High
173
+ - Area: C1 handoff, writer lease continuity, autonomous credential consumption
174
+ - Evidence: the real Delegate completed initial assembly through `task handoff-prepare` with zero
175
+ rejected lifecycle calls, then reported that the one-time claim token was unavailable. The raw
176
+ successful CLI result proves that the token was emitted exactly once but was buried after roughly
177
+ 5 KiB of Task/event data; the wrapper did not truncate stdout.
178
+ - Root cause: credential-bearing values shared the same large compatibility payload as canonical
179
+ Task state and context. Although Core emitted the token correctly, the response supplied no
180
+ compact, prominent transfer receipt for an autonomous consumer.
181
+ - Candidate evidence: `task handoff-prepare` now emits first-field `credentialHandoff`, and `task
182
+ run` emits first-field `writerLeaseReceipt`. Both name the intended next action, source, target or
183
+ owner, option, and sensitivity; the exact credential occurs once, while legacy payload data and
184
+ read-only responses contain no duplicate secret.
185
+
186
+ ### WF-STABLE-019 — claimed Task run requires a lease that navigation says will be issued later
187
+
188
+ - Status: Closed-regression in beta.2; clean release E2E verified
189
+ - Severity: High
190
+ - Area: C1 claim, writer lease continuity, truthful Task navigation
191
+ - Evidence: the real Delegate consumed the first-field claim token and completed `task claim`, then
192
+ safely paused for bounded Git permission. After resume, Core-owned `task start` succeeded. The
193
+ following `next` advertised `task run` without a writer-token contract, and the exact call was
194
+ rejected because claimed posture already required the lease created by claim.
195
+ - Root cause: the first writer-lease receipt was emitted by `task run`, but claimed posture requires
196
+ that same credential as an input to run. `task claim` returned the lease only inside its large
197
+ payload, while action-only navigation intentionally omitted `task run` from the writer contract.
198
+ - Candidate evidence: `task claim` now emits first-field `writerLeaseReceipt` with `task run` as its
199
+ consuming action, and claimed `task run` navigation advertises the exact `--writer-token`
200
+ precondition. Unclaimed runs still acquire their initial lease without a token.
201
+
202
+ ### WF-STABLE-020 — transcript validator rejects safe top-level help
203
+
204
+ - Status: Closed-regression in beta.2
205
+ - Severity: High
206
+ - Area: release transcript integrity, read-only CLI discovery
207
+ - Evidence: phase 1 completed initial assembly, one complete Plan, and autonomy preparation with
208
+ zero rejected lifecycle calls. A successful trusted-harness top-level `--help` was immediately
209
+ followed by fresh successful `next`, but packaged validation returned
210
+ `Unsupported read-only observation`.
211
+ - Root cause: CLI help semantics covered top-level, noun, and action scopes, while the transcript
212
+ recognizer's regular expression required at least one noun before `--help`.
213
+ - Candidate evidence: the validator recognizes bare top-level `--help` as safe help, retains the
214
+ mandatory fresh-`next` barrier, and still rejects failed help or embedded mutation inputs.
215
+
216
+ ### WF-STABLE-021 — checkpoint guidance permits parallel invocations rejected by release validation
217
+
218
+ - Status: Closed-regression in beta.2; clean release E2E verified
219
+ - Severity: Critical
220
+ - Area: gateway protocol, release transcript integrity, lifecycle checkpoints
221
+ - Evidence: `real-agent-release-final-21` completed phase-1 initial assembly with no individually
222
+ rejected command, but four times started `next` before the paired `status` had emitted its
223
+ terminal result (or vice versa). The strict validator rejected the first overlap with
224
+ `INCOMPLETE_INVOCATION` at event index `29`, before owner grant or Task execution.
225
+ - Root cause: the packaged gateway required both `status` and `next` after each boundary but did not
226
+ state that the first invocation must terminate before the second starts. Real agents may
227
+ parallelize independent-looking read-only calls, while the append-only validation contract
228
+ deliberately treats overlapping lifecycle invocations as indeterminate evidence.
229
+ - Candidate evidence: Skill, protocol, recovery guide, and E2E Brief now require terminal
230
+ `status` followed by terminal `next` and explicitly prohibit parallel tool batches. An exact
231
+ transcript fixture proves that overlapping checkpoint starts remain rejected. The final clean
232
+ `real-agent-release-final-21` followed every `status` then `next` checkpoint sequentially through
233
+ final acceptance; the complete transcript validates at `250/250` with no overlap.
234
+
235
+ ### WF-STABLE-022 — raw real-agent evidence persists one-time C1 credentials
236
+
237
+ - Status: Closed-regression in beta.2; clean release E2E verified
238
+ - Severity: Critical
239
+ - Area: real-agent evidence, C1 credentials, release security
240
+ - Evidence: the corrected `real-agent-release-final-21` consumed credential-first handoff, claim,
241
+ and run receipts successfully, but Codex `exec --json` serialized the literal `--claim-token`,
242
+ `--writer-token`, and credential-bearing stdout into the raw session JSONL. The semantic lifecycle
243
+ log remained secret-free, but the raw diagnostic artifact contradicted the stated memory-only
244
+ handling rule.
245
+ - Root cause: raw Codex JSONL was redirected directly to evidence without a streaming redaction
246
+ boundary. A language-model tool call necessarily contains the CLI argument it invokes, even when
247
+ the agent does not echo the value in prose.
248
+ - Candidate evidence: a streaming structural sanitizer removes exact credential fields and CLI
249
+ options before JSONL is persisted, preserves non-secret token metrics, and provides a fail-closed
250
+ post-run inspection mode. Deterministic tests cover command arguments, embedded receipt JSON,
251
+ structured receipts, and already-sanitized evidence. The final clean final-21 used the streaming
252
+ sanitizer from process start for both phases; fail-closed inspection reports zero credential
253
+ findings in both persisted raw JSONL artifacts.
254
+
255
+ ### WF-STABLE-023 — claimed strict-review navigation omits its writer lease precondition
256
+
257
+ - Status: Closed-regression in beta.2; clean release E2E verified
258
+ - Severity: Critical
259
+ - Area: claimed C1 review, truthful navigation, writer lease continuity
260
+ - Evidence: sanitized `real-agent-release-final-21` completed one guarded Step and its Core-owned
261
+ commit, then `next` advertised `task step-review` without `writerTokenContract`. The exact first
262
+ call was rejected non-mutating with `TRANSITION_BLOCKED` because claimed posture requires the
263
+ active lease token.
264
+ - Root cause: navigation enumerated always-lease-bound completion actions and claimed `task run`,
265
+ but not the later claimed-C1 mutations that call the same handoff authorization predicate.
266
+ - Candidate evidence: writer-token navigation is now posture-aware for every claimed-C1 action
267
+ that can consume an optional lease, including `task step-review` and `task review-launch`.
268
+ Regressions cover both claimed review boundaries while preserving token-free unclaimed review
269
+ navigation. The final clean final-21 exposed the contract and succeeded on the first call for
270
+ both `task step-review` and `task review-launch`, with zero rejected lifecycle mutations.
271
+
272
+ ## Beta.2 current evidence
273
+
274
+ - The first `real-agent-release-final-21` is immutable diagnostic evidence for WF-STABLE-021: its
275
+ lifecycle commands individually succeeded, but packaged validation rejected four overlapping
276
+ checkpoint pairs. It stopped before owner grant and was not resumed.
277
+
278
+ - Final clean `real-agent-release-final-21` used a rebuilt tarball with SHA-256
279
+ `24a7b69b0ada9d922946a8c0c593384d5806d58a35e04fae171d26f83585ac4f` and an isolated
280
+ `final21` marketplace/plugin cache. Phase 1 assembled exactly seven linked Tasks and stopped at
281
+ the autonomy gate; phase 2 completed the sole required guarded Task, strict Step review,
282
+ content-only context refresh, final review, delegated acceptance, Core merge, Milestone
283
+ validation, and delegated Milestone final acceptance. Task
284
+ `TASK-01M04B516YDHY5D1B78S2XEV0S` is `merged` at revision `14`; Milestone
285
+ `MS-01M04B42MC7VCEKTQ7K8ZYK0G1` is `accepted` at revision `5`; accepted head is
286
+ `64a2e58e030dfb95f5f5724fb1825b02143ffaa7`. Final `next` is repository idle with
287
+ `discovery start`. Transcript validation passes `250/250`, both credential scans report zero
288
+ findings, waived Tasks executed is zero, and rejected lifecycle mutations is zero.
289
+ - Post-WF-STABLE-023 full sequential validation on Node `24.17.0` passed `153/153` in
290
+ `644031 ms`. Plugin check, release check, isolated-cache dry-pack, downstream smoke, root
291
+ workflow regression, and `git diff --check` passed. The E2E-tested pre-evidence-doc tarball SHA-1 is
292
+ `4519d05b31fa08b39f5f5f9f9e2b9f0e13941935`.
293
+
294
+ - Post-WF-STABLE-020 sequential package validation passed `149/149` under Node `24.17.0`.
295
+ Current validation accepts the immutable `final-20` phase-1 transcript as `132/132`, while its
296
+ packaged pre-fix validator deterministically rejects it. Rebuilt package dry-pack, plugin check,
297
+ release check, downstream smoke, root regression, and `git diff --check` passed; dry-pack shasum
298
+ is `d5ca042dd1bb90e52c6d5313dafa6730e5d3795f`.
299
+ - Post-WF-STABLE-019 sequential package validation passed `149/149` under Node `24.17.0`.
300
+ Rebuilt package dry-pack, plugin validation, release check, downstream smoke, root workflow
301
+ regression, and `git diff --check` all passed; dry-pack shasum is
302
+ `547166399294368c89ae7c581192cf81a6391638`.
303
+ - Post-WF-STABLE-018 sequential package validation passed `147/147` under Node `24.17.0`.
304
+ Rebuilt package dry-pack with isolated npm cache, plugin validation, release check, downstream
305
+ smoke, root workflow regression, and `git diff --check` all passed; package shasum is
306
+ `04571ca2f51f48661c984e8d16a2e32c336efe64`.
307
+ - Final post-WF-STABLE-015 sequential package validation passed `141/141` under Node `24.17.0`.
308
+ - Package archive, downstream smoke, plugin validation, release check, and root workflow regression
309
+ passed on the rebuilt candidate. One root-regression setup attempt lacked Node on the child-process
310
+ `PATH`; the authoritative rerun with the declared Node 24 environment passed.
311
+ - Exact copied `signal_v4` snapshot replay passed without live-project or live-state writes.
312
+ - Disposable final-6 phase 1 assembled seven Tasks and stopped cleanly at the autonomy boundary.
313
+ Phase 2 authorized and completed the guarded Step, then correctly stopped as invalid evidence
314
+ when strict Step review remained indeterminate.
315
+ - Disposable final-11 assembled all seven Tasks and authorized the Milestone, then stopped on the
316
+ first rejected `task plan-set` because exact `AC-001` inclusion was not discoverable from `next`.
317
+ It is immutable diagnostic evidence for WF-STABLE-015, not release evidence.
318
+ - Disposable final-12 reached delegated Task acceptance and `task merge`, then stopped on the first
319
+ rejected merge because `next` did not advertise mandatory `--writer-token`. It is immutable
320
+ diagnostic evidence for WF-STABLE-016, not release evidence.
321
+ - Disposable final-13 passed clean bootstrap/preflight but the real Codex transport failed before
322
+ the first workflow action. It made no workflow mutation and is external diagnostic evidence, not
323
+ a package-defect or release signal.
324
+ - Disposable final-16 cleared transport, completed initial assembly and the owner grant, then
325
+ stopped on the first rejected `milestone authorize --help`. It is immutable diagnostic evidence
326
+ for WF-STABLE-017, not release evidence.
327
+ - Disposable final-17 completed seven-Task initial assembly with zero rejected mutations and proved
328
+ read-only help plus fresh `next`, but the packaged validator still rejected that help observation.
329
+ It stopped before owner grant and is immutable WF-STABLE-017 diagnostic evidence.
330
+ - Disposable final-18 completed initial assembly through C1 handoff preparation with zero rejected
331
+ lifecycle calls. It then exposed WF-STABLE-018: the exact one-time claim token existed in complete
332
+ stdout but was buried after the large Task/event payload and was not retained by the Delegate.
333
+ The run is immutable diagnostic evidence and is not eligible for continuation or release evidence.
334
+ - Disposable final-19 completed seven-Task assembly, delegated authorization, credential-first
335
+ handoff/claim, and bounded Core `task start`. It then exposed WF-STABLE-019 when claimed
336
+ `task run` was advertised without its already-bound lease precondition and was rejected once.
337
+ The run is immutable diagnostic evidence and is not eligible for continuation.
338
+ - Disposable final-20 completed clean seven-Task phase-1 assembly and autonomy preparation with no
339
+ rejected lifecycle call, then exposed WF-STABLE-020 when transcript validation rejected safe
340
+ top-level help plus fresh `next`. No owner grant was issued; the run is immutable diagnostic
341
+ evidence and is not eligible for continuation.
342
+ - The rebuilt tarball, fresh clean final-acceptance/idle E2E, transcript/security checks, and all
343
+ deterministic/package release gates are green. The independent source/evidence audit completed
344
+ with `PASS`, found no material blocker, and confirmed the beta.2 release recommendation.
345
+
346
+ ## Workflow findings closed for beta.1
347
+
348
+ ### WF-STABLE-001 — `locks repair` exposes a full writer token
349
+
350
+ - Status: Closed-regression in beta.1
351
+ - Severity: High
352
+ - Area: lock recovery, CLI output, secret handling
353
+ - Evidence: the `locks repair` result includes the complete credential-bearing writer token rather
354
+ than a redacted value or one-time bounded handoff.
355
+ - Risk: a transcript, log, screenshot, or delegated agent output can disclose authority that permits
356
+ state mutation.
357
+ - Stable-release requirement:
358
+ - never print the full token in ordinary JSON or human-readable output;
359
+ - return only a redacted fingerprint unless an explicit secure handoff channel is used;
360
+ - add CLI, JSON-envelope, logging, snapshot, and error-path tests proving no token leakage;
361
+ - preserve deterministic recovery and avoid making the token unrecoverable before ownership is
362
+ safely transferred.
363
+
364
+ ### WF-STABLE-002 — standalone Project Knowledge `next` is misleadingly attributed to a failed Task
365
+
366
+ - Status: Closed-regression in beta.1
367
+ - Severity: Medium
368
+ - Area: `next`, Project Knowledge Map, remediation terminality
369
+ - Signal replay evidence:
370
+ - Task `TASK-01M00W190K3V3HM68Q3QVSH1AY` is `needs_fix` with
371
+ `STEP-002-FORMALIZATION-CONTRACTS` failed and a `split-required` decision;
372
+ - after a top-level reconcile, `next` correctly returns scope `project-memory`, action
373
+ `project-memory approve`, revision `168`, but also returns that failed Task as `taskId`.
374
+ - Risk: an agent or operator can interpret a standalone project approval as permission to refresh or
375
+ resume the terminal remediation path.
376
+ - Stable-release requirement:
377
+ - standalone Project Knowledge actions must not look like Task execution actions;
378
+ - either omit `taskId` or expose it under an explicit non-authorizing field such as
379
+ `triggerTaskId`/`stalenessOriginTaskId`;
380
+ - state clearly that approval cannot authorize, refresh, or resume the referenced Task;
381
+ - add a replay for `split-required -> main branch reconcile -> standalone approval next`.
382
+
383
+ ### WF-STABLE-003 — terminal `split-required` is routed into unsafe Knowledge rebind
384
+
385
+ - Status: Closed-regression in beta.1
386
+ - Severity: Critical
387
+ - Area: corrective terminal decisions, Milestone membership evolution, `next`
388
+ - Signal replay evidence:
389
+ - after human approval of Project Knowledge Map revision `169`, exact `next` returns
390
+ `task knowledge-rebind` for `TASK-01M00W190K3V3HM68Q3QVSH1AY` at revision `28`;
391
+ - the Task is `needs_fix`, its guarded Step is failed, and its current corrective decision is
392
+ `split-required`;
393
+ - `taskCanRebindKnowledge` accepts every `needs_fix` Task without checking a hard-blocking
394
+ corrective decision;
395
+ - repository `next` lets Knowledge Map rebind override the Task-level `doctor` result for the
396
+ `split-required` posture;
397
+ - `rebindTaskKnowledge` changes the Plan hash, sets status to
398
+ `awaiting_execution_authorization`, clears review/block state, and supersedes execution
399
+ authorization without preserving the terminal decision on the rebound Plan;
400
+ - no Task cancellation transition exists, and a started Task remains repository-actionable while
401
+ its Milestone is active even if membership disposition is changed.
402
+ - Risk: following exact `next` can detach the new Plan hash from the recorded `split-required`
403
+ decision and make the failed Task appear authorizable again. Ignoring `next` to create or
404
+ reclassify a replacement Task cannot remove the started failed Task from repository routing.
405
+ - Stable-release requirement:
406
+ - reject `knowledge-rebind` and `context-refresh` before the first write when the current
407
+ corrective posture is `split-required` or `stop-escalate`;
408
+ - keep terminal corrective decisions effective across Project Knowledge changes without
409
+ rebinding or rewriting the historical Task Plan;
410
+ - provide one unambiguous replacement route with explicit old/new Task relationship;
411
+ - require atomic or journal-recoverable membership evolution;
412
+ - prevent both orphan replacement Tasks and a still-required terminal Task;
413
+ - make repository `next` return that replacement route rather than `knowledge-rebind`;
414
+ - add deterministic and real-agent E2E coverage for
415
+ `split-required -> Project Knowledge approval -> replacement -> Milestone continuation`.
416
+
417
+ ### WF-STABLE-004 — workflow package upgrades can remain stranded on a Task branch
418
+
419
+ - Status: Closed-regression in beta.1
420
+ - Severity: Medium
421
+ - Area: update instructions, branch ownership, Milestone base verification
422
+ - Evidence: dependency commit `3f45abc88f7b85091c484d0b84f4c96d1dfeb045` pinned
423
+ `codex-workflow-v2@2.0.0-alpha.7.2.1` only on the failed Task branch while local `main`, the
424
+ Milestone base, remained on alpha.7.1. Recovery required a manually scoped cherry-pick producing
425
+ `fabd1c868a9baa74c7ef273bf0272753c7927812` on local `main`.
426
+ - Risk: diagnostics run with one package version while Milestone creation or replacement work starts
427
+ from another, invalidating assumptions and repeating already-fixed lifecycle failures.
428
+ - Stable-release requirement:
429
+ - update preflight and documentation must distinguish current worktree version from Milestone base
430
+ branch version;
431
+ - provide an explicit dependency-only landing check before lifecycle work continues;
432
+ - fail closed when declared, locked, installed, current-branch, and base-branch versions diverge;
433
+ - never suggest merging unrelated product commits to transport a workflow dependency update.
434
+
435
+ ### WF-STABLE-005 — agent guidance did not make replacement membership evolution explicit
436
+
437
+ - Status: Closed-regression in beta.1
438
+ - Severity: Medium
439
+ - Area: recovery prompts, operator guidance
440
+ - Evidence: the generated post-approval prompt said to create a thin required replacement Task but
441
+ did not explicitly require reclassification of the old failed membership and Milestone
442
+ reauthorization through exact Core transitions.
443
+ - Risk: correct package primitives can still be used in the wrong order, recreating an apparently
444
+ active but non-completable Milestone.
445
+ - Stable-release requirement:
446
+ - ship a canonical `split-required` operator/delegate recovery prompt;
447
+ - require sequential terminal `status` then terminal `next` after every state boundary;
448
+ - distinguish Task creation, replacement linkage, membership evolution, and execution
449
+ reauthorization;
450
+ - prohibit manual state editing and resumption of the failed Step.
451
+
452
+ ### WF-STABLE-006 — composite context refresh has no multi-file crash-recovery journal
453
+
454
+ - Status: Closed-regression in beta.1
455
+ - Severity: High
456
+ - Area: Project Knowledge refresh, Task rebind, delegated reauthorization, durability
457
+ - Evidence: alpha.7.1 validates the complete transition before its first canonical write and uses
458
+ atomic replacement for each individual file, but the composite transition performs multiple file
459
+ writes without a transaction journal. A process or machine failure between those writes can leave
460
+ a partially applied cross-file transition.
461
+ - Risk: the repository can be clean while Project Knowledge, Task binding, authorization, and audit
462
+ sidecars disagree after a crash. Prevalidation prevents logical rejection after the first write but
463
+ cannot recover an interrupted physical write sequence.
464
+ - Stable-release requirement:
465
+ - introduce a project-local transaction journal or an equivalent recoverable commit protocol;
466
+ - define deterministic roll-forward/rollback semantics for every write boundary;
467
+ - make recovery idempotent and preserve append-only audit history;
468
+ - add crash-injection tests before and after each canonical and sidecar write;
469
+ - prove `doctor`, `status`, and `next` detect and route every interrupted legacy/candidate shape;
470
+ - never silently treat a partial refresh as authorized.
471
+
472
+ ### WF-STABLE-007 — full validation commands may race through shared build/clean outputs
473
+
474
+ - Status: Closed-regression in beta.1
475
+ - Severity: Medium if confirmed
476
+ - Area: maintainer validation, reproducibility
477
+ - Evidence: concurrent `npm test` and `npm run validate` runs stopped producing reliable completion
478
+ evidence after both reached shared test/build phases. A later sequential run continued normally.
479
+ The observed behavior is consistent with shared `build`/`clean` output contention, but the exact
480
+ cause has not been isolated.
481
+ - Risk: maintainers can mistake a hung or corrupted concurrent run for passing release evidence, or
482
+ waste hours waiting on a validation process that cannot complete deterministically.
483
+ - Verification required:
484
+ - reproduce with process-level tracing and isolated logs;
485
+ - identify shared directories, cleanup commands, ports, caches, and child processes;
486
+ - distinguish a package-script race from a test-runner or environment defect.
487
+ - Stable-release requirement if confirmed:
488
+ - isolate run outputs/resources or enforce an explicit single-run lock with a clear diagnostic;
489
+ - ensure interruption cleans up child processes and resources;
490
+ - document whether concurrent full validation is supported;
491
+ - add a deterministic concurrency regression where practical.
492
+
493
+ ### WF-STABLE-008 — replacement Task local start required a manual base-branch switch
494
+
495
+ - Status: Closed-regression in beta.1
496
+ - Severity: Low
497
+ - Area: local Task start, replacement autonomy, Git preconditions
498
+ - Evidence: the final disposable E2E correctly materialized and reauthorized the replacement, but
499
+ its first `task start` was safely rejected because the clean checkout still pointed at the
500
+ cancelled Task branch instead of `main`; the Delegate recovered by switching branches and retrying.
501
+ - Stable guard: local Task start resolves the exact declared base ref and creates the new Task branch
502
+ from that ref even when another clean Task branch is checked out. Dirty worktrees and external
503
+ ownership rules remain fail-closed.
504
+
505
+ ## Beta.1 closure evidence
506
+
507
+ - `WF-STABLE-001`: CLI integration proves both inspection and stale repair return only a token
508
+ fingerprint and never the writer token.
509
+ - `WF-STABLE-002`: repository navigation returns diagnostic provenance as
510
+ `stalenessOriginTaskId` with `authorizesTask: false`; eligible atomic refresh is a Task-scoped
511
+ top-level action.
512
+ - `WF-STABLE-003`: deterministic terminal replay and the disposable real-agent Milestone prove
513
+ `split-required -> replacement -> reauthorization -> merge -> final acceptance`, with the old
514
+ Task cancelled, linked, immutable in history, and without a retained writer lease.
515
+ - `WF-STABLE-004`: update-preflight regressions cover declared, locked, installed, current-branch,
516
+ and active Milestone base versions plus dependency-only transport guidance.
517
+ - `WF-STABLE-005`: `docs/split-required-recovery.md` and the packaged gateway protocol define one
518
+ exact replacement ordering and prohibit manual membership/state mutation.
519
+ - `WF-STABLE-006`: beta transaction regressions inject ordinary failure and dead-process exit at
520
+ every target-write boundary, then prove rollback or idempotent roll-forward, including file
521
+ deletion. Context refresh and replacement both use the project journal.
522
+ - `WF-STABLE-007`: a deterministic second full-validation owner fails immediately with
523
+ `VALIDATION_ALREADY_RUNNING`; the sequential release suite completed normally.
524
+ - `WF-STABLE-008`: the local branch-start regression begins on a clean historical Task branch and
525
+ proves the new Task branch is created from the exact `main` commit.
526
+
527
+ ## Downstream findings to retain as E2E fixtures
528
+
529
+ ### SIGNAL-M3-001 — stable identifier validation misses real U+0000 after line terminators
530
+
531
+ - Status: Downstream confirmed defect
532
+ - Owner: `signal_v4`
533
+ - Workflow relevance: use as the thin replacement-Task fixture for validating `split-required`
534
+ recovery; do not implement the product fix in this repository.
535
+ - Required downstream acceptance: reject real U+0000 in every position, including immediately after
536
+ line terminators, without weakening other stable-identifier rules.
537
+
538
+ ### SIGNAL-M3-002 — Project Knowledge has an unresolved `ownership` gap
539
+
540
+ - Status: Downstream gap, currently non-blocking
541
+ - Owner: `signal_v4`
542
+ - Evidence: candidate Knowledge Map revision `168`, hash
543
+ `8d775d82fb1aec85322a923ecf62053453160376033f45bd3c7e2a8c2588d51d`, reports no conflicts
544
+ and one missing `ownership` category source.
545
+ - Rule: do not expand the NUL replacement Task to fix this gap. Track it as separate project
546
+ documentation work.
547
+
548
+ ### SIGNAL-M3-003 — local `main` has no configured `origin`
549
+
550
+ - Status: Downstream operational risk
551
+ - Owner: `signal_v4`
552
+ - Evidence: local `main` is at `fabd1c868a9baa74c7ef273bf0272753c7927812`, but `git ls-remote
553
+ --heads origin main` fails because `origin` is not configured.
554
+ - Risk: a local dependency correction may be mistaken for a shared or durable project update.
555
+ - Rule: resolve repository remote/backup policy separately; do not let workflow lifecycle commands
556
+ infer permission to publish.
557
+
558
+ ## Closed alpha.7 regressions that must not recur
559
+
560
+ ### WF-REG-001 — context-only Knowledge Map rebinding invalidated `continue-fix`
561
+
562
+ - Status: Closed-regression in alpha.7.2
563
+ - Stable guard: semantic Plan equality must preserve an authorized `continue-fix`; semantic changes
564
+ must invalidate it; recovery remains append-only and non-mutating on failure.
565
+
566
+ ### WF-REG-002 — recovered corrective decision still produced `TOKEN_RECOVERY_NO_GO`
567
+
568
+ - Status: Closed-regression in alpha.7.2.1
569
+ - Stable guard: an append-only remediation-mode recovery must restore the exact allowed transition
570
+ without a fourth remediation run, duplicate decision, manual state edit, or writer-lease bypass.
571
+
572
+ ### WF-REG-003 — delegated creation of exact Plan-declared supporting Knowledge sources was blocked
573
+
574
+ - Status: Closed-regression in alpha.7.1
575
+ - Stable guard: only exact normalized Plan-declared supporting sources with
576
+ `knowledgeImpact=create` may be added; wildcard, directory, canonical, unauthorized, removal,
577
+ category/authority changes, gaps, and conflicts remain blocked before the first write.
578
+
579
+ ### WF-REG-004 — E2E history contained a spurious review failure from the harness
580
+
581
+ - Status: Closed-regression in alpha.7.1 E2E evidence
582
+ - Stable guard: fresh real-agent E2E evidence must separate harness/setup failures from lifecycle
583
+ review attempts and must not pollute the Task remediation history.
584
+
585
+ ### WF-REG-005 — `next` offered work that the exact transition would reject
586
+
587
+ - Status: Closed-regression in alpha.7.2
588
+ - Stable guard: `next` must use the same binding, recovery, terminal-decision, and corruption
589
+ predicates as the exact mutating transition. If the transition is guaranteed to reject, `next`
590
+ must return the recovery/blocking action instead of a Task run.
591
+
592
+ ## Stable-release exit rule
593
+
594
+ The stable release is not ready while any Confirmed workflow finding above is open. Investigation
595
+ items must be either reproduced and fixed or closed with recorded evidence that Core already provides
596
+ the required safe semantics. Downstream findings do not block the package by themselves, but the NUL
597
+ fixture must complete the real-agent replacement path through final Milestone acceptance.
@@ -29,6 +29,8 @@ adoption posture.
29
29
  используйте внешний точный runner alpha.7 только для `update rescue-preflight`. Продолжать
30
30
  можно лишь при `eligible=true`; допустимы только перечисленные им `locks repair` и
31
31
  `task step-review`. Этот путь не меняет dependency и не разрешает другие команды alpha.7.
32
+ Для `task step-review` используйте lifecycle-actor из `next` или rescue-preflight; это claimant
33
+ или required actor, а не identity независимого reviewer-процесса.
32
34
  После terminal review выполните обычный Knowledge reconcile/rebind, доведите Task до безопасной
33
35
  границы и только затем обновляйте package/lock обычным способом.
34
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-alpha.7.2.1",
3
+ "version": "2.0.0-beta.2",
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": "npm run build && tsc -p tsconfig.test.json && node --test .test-dist/tests/*.test.js",
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",