codex-workflow-v2 2.0.0-alpha.7.2.1 → 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 +12 -4
- 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/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 +19 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +20 -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 +10 -1
- package/dist/src/workflow.js +473 -47
- package/dist/src/workflow.js.map +1 -1
- 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/task.schema.json +3 -1
|
@@ -88,8 +88,9 @@ not a human approval, while auditor independence remains mandatory.
|
|
|
88
88
|
|
|
89
89
|
## Atomic context refresh
|
|
90
90
|
|
|
91
|
-
When `next
|
|
92
|
-
composite transition
|
|
91
|
+
When `next` returns top-level `action: task context-refresh` with an exact option, a
|
|
92
|
+
project-scoped delegate may run one composite transition and must not run standalone reconcile
|
|
93
|
+
first:
|
|
93
94
|
|
|
94
95
|
```text
|
|
95
96
|
task context-refresh
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Codex Workflow V2 2.0.0-beta.1 Stabilization Brief
|
|
2
|
+
|
|
3
|
+
Status: implementation complete; release candidate awaiting user authorization for commit/tag/push/publish
|
|
4
|
+
|
|
5
|
+
Baseline: `v2.0.0-alpha.7.2.1` (`1214b4c`)
|
|
6
|
+
|
|
7
|
+
Primary evidence register: [stable-release-defect-register.md](stable-release-defect-register.md)
|
|
8
|
+
|
|
9
|
+
## Objective
|
|
10
|
+
|
|
11
|
+
Produce one feature-frozen beta release that closes every confirmed workflow defect found during
|
|
12
|
+
the `signal_v4` Milestone 3 alpha.7 replay, resolves or evidence-closes the remaining validation
|
|
13
|
+
concurrency investigation, preserves every alpha.7 regression guard, and proves that a real agent can
|
|
14
|
+
recover a terminal `split-required` Task by creating a replacement Task without reviving or rewriting
|
|
15
|
+
the historical Task.
|
|
16
|
+
|
|
17
|
+
No intermediate npm version is published. `signal_v4` and its external workflow state are read-only
|
|
18
|
+
evidence. Workflow V2 is not used to organize this repository's implementation.
|
|
19
|
+
|
|
20
|
+
## Release scope
|
|
21
|
+
|
|
22
|
+
### B1 — Secret-safe lock recovery (`WF-STABLE-001`)
|
|
23
|
+
|
|
24
|
+
- `locks repair` must never expose a plaintext writer token in ordinary CLI JSON, logs, errors, or
|
|
25
|
+
snapshots.
|
|
26
|
+
- A repaired lease may expose only non-authorizing metadata and a token fingerprint.
|
|
27
|
+
- If ownership recovery needs a new credential, it must use an explicit one-time handoff boundary
|
|
28
|
+
rather than a reusable token in general diagnostics.
|
|
29
|
+
|
|
30
|
+
### B2 — Terminal corrective routing and replacement (`WF-STABLE-002/003`)
|
|
31
|
+
|
|
32
|
+
- `split-required` and `stop-escalate` outrank Project Knowledge reconcile, approval, rebind, context
|
|
33
|
+
refresh, authorization, and Task run.
|
|
34
|
+
- `task knowledge-rebind` and `task context-refresh` reject these postures before their first write.
|
|
35
|
+
- A Project Knowledge change cannot detach a terminal corrective decision from its historical Plan.
|
|
36
|
+
- `next` must expose an explicit replacement route for `split-required`; `stop-escalate` remains a
|
|
37
|
+
hard stop.
|
|
38
|
+
- Replacement must be one journal-recoverable transition that:
|
|
39
|
+
- consumes one ready Task Discovery;
|
|
40
|
+
- materializes a new Task with a new ID and the same active Milestone;
|
|
41
|
+
- changes the old membership from `required` to `cancelled` with a reason;
|
|
42
|
+
- adds the replacement as `required` with an explicit relationship reason;
|
|
43
|
+
- marks the old Task `cancelled` without changing its Plan, Steps, review, remediation, corrective,
|
|
44
|
+
result, or evidence history;
|
|
45
|
+
- revokes the cancelled Task's writer lease in the same recoverable transaction;
|
|
46
|
+
- absorbs exact safe Plan-bound Knowledge drift through the active Milestone Autonomy Grant in
|
|
47
|
+
that transaction, so the replacement Task can be planned without a stranded standalone gate;
|
|
48
|
+
- supersedes Milestone execution authorization and increments membership revision;
|
|
49
|
+
- leaves no orphan Task or partial membership state after process interruption;
|
|
50
|
+
- is idempotently recoverable from its journal.
|
|
51
|
+
- Normal standalone Project Knowledge actions must identify a triggering Task only as diagnostic
|
|
52
|
+
provenance, never as implied Task authorization.
|
|
53
|
+
- When an exact delegated atomic context refresh is eligible, `next` must return it as the top-level
|
|
54
|
+
action and standalone reconcile must fail before writing; an agent cannot create an avoidable
|
|
55
|
+
human-approval gap by selecting the nested Project Knowledge sub-transition.
|
|
56
|
+
|
|
57
|
+
### B3 — Update/base diagnostics and canonical recovery guidance (`WF-STABLE-004/005`)
|
|
58
|
+
|
|
59
|
+
- Update diagnostics must distinguish the current checkout from an active Milestone base branch and
|
|
60
|
+
report exact declared, locked, installed, current-branch, and base-branch workflow versions.
|
|
61
|
+
- Divergence must fail closed before lifecycle work continues and must recommend dependency-only
|
|
62
|
+
transport rather than merging product commits.
|
|
63
|
+
- Documentation must include one canonical `split-required` recovery prompt and exact ordering for
|
|
64
|
+
replacement, membership evolution, Milestone reauthorization, new Task planning, and execution.
|
|
65
|
+
|
|
66
|
+
### B4 — Composite context-refresh durability (`WF-STABLE-006`)
|
|
67
|
+
|
|
68
|
+
- Project Knowledge reconcile/approval, Task Plan rebind, rebound risk-audit evidence, and execution
|
|
69
|
+
authorization must use a recoverable multi-file transaction.
|
|
70
|
+
- All semantic and authority checks happen before the first target write.
|
|
71
|
+
- Crash recovery is deterministic and idempotent at every write boundary.
|
|
72
|
+
- `doctor`, `status`, and `next` detect an incomplete transaction and return the exact recovery action;
|
|
73
|
+
no partial refresh is treated as authorized.
|
|
74
|
+
|
|
75
|
+
### B5 — Deterministic maintainer validation (`WF-STABLE-007`)
|
|
76
|
+
|
|
77
|
+
- Reproduce or disprove shared-output contention between full validation commands.
|
|
78
|
+
- If confirmed, serialize destructive build/test output preparation or isolate per-run artifacts.
|
|
79
|
+
- Concurrent invocation must either complete independently or fail immediately with a clear,
|
|
80
|
+
non-secret diagnostic; it must not hang silently.
|
|
81
|
+
- Child processes and temporary resources are cleaned up after interruption.
|
|
82
|
+
|
|
83
|
+
## Required deterministic evidence
|
|
84
|
+
|
|
85
|
+
1. Exact `signal_v4` replay:
|
|
86
|
+
`split-required -> Knowledge Map 169 active -> next replacement -> replacement transaction -> old
|
|
87
|
+
Task immutable/terminal -> new required Task planning`.
|
|
88
|
+
2. Negative rebind/context-refresh tests for `split-required` and `stop-escalate` proving zero writes.
|
|
89
|
+
3. Replacement rejection tests for wrong Task, wrong Milestone, wrong decision, non-ready Discovery,
|
|
90
|
+
semantic Milestone changes, stale revisions, expired/wrong actor autonomy, corrupt sidecars, and
|
|
91
|
+
duplicate retries.
|
|
92
|
+
4. Crash injection before and after every replacement and context-refresh transaction write.
|
|
93
|
+
5. CLI/output scans proving writer tokens are absent.
|
|
94
|
+
6. Base-version divergence tests for clean and dirty repositories and unrelated product commits.
|
|
95
|
+
7. Concurrent validation reproduction with bounded completion.
|
|
96
|
+
8. All existing unit, integration, milestone, alpha.6, alpha.7, packaging, plugin, downstream smoke,
|
|
97
|
+
release, and root regression checks.
|
|
98
|
+
|
|
99
|
+
## Real-agent acceptance
|
|
100
|
+
|
|
101
|
+
Create a fresh disposable downstream project with isolated `CODEX_HOME`, workflow state, plugin root,
|
|
102
|
+
and a locally packed beta candidate. A real Delegate must complete:
|
|
103
|
+
|
|
104
|
+
1. Discovery and initial Milestone assembly.
|
|
105
|
+
2. A guarded Task with three failed strict reviews, `continue-fix`, and a terminal
|
|
106
|
+
`split-required` decision.
|
|
107
|
+
3. A Project Knowledge change and human-style approval boundary.
|
|
108
|
+
4. The exact replacement transition without rebind of the failed Task.
|
|
109
|
+
5. Replacement Task implementation, review, merge, remaining required Task completion, Milestone
|
|
110
|
+
validation, and final acceptance.
|
|
111
|
+
|
|
112
|
+
The E2E is invalid if the harness injects lifecycle failures, edits external state, reuses a stale
|
|
113
|
+
plugin cache, bypasses `next`, or requires a fourth remediation attempt.
|
|
114
|
+
|
|
115
|
+
## Final evidence
|
|
116
|
+
|
|
117
|
+
- Deterministic package suite: all beta.1 transaction, terminal-routing, Knowledge refresh,
|
|
118
|
+
diagnostics, concurrency, alpha.6, alpha.7, integration, Milestone, and workflow regressions pass.
|
|
119
|
+
- Crash replay covers rollback and dead-process roll-forward at every tested write boundary,
|
|
120
|
+
including deletion of the cancelled Task writer lease.
|
|
121
|
+
- Real-agent disposable run:
|
|
122
|
+
`test-runs/2.0.0-beta.1/replacement-e2e-final`.
|
|
123
|
+
- Historical Task `TASK-01M02N276D6AE83VBVRH17RDQY` ended `cancelled` at revision 18 and links to
|
|
124
|
+
replacement Task `TASK-01M02NMZZBVCA4TZKK6WG724RY`.
|
|
125
|
+
- Replacement Task passed its guarded Step review and independent final review, then merged as
|
|
126
|
+
`c8d45be7f3165731cf891a47e88a112f76d0119f`.
|
|
127
|
+
- Milestone `MS-01M02N1M9M1CT8RHYGSZH8ETHC` reached `accepted` revision 7; final `next` returned
|
|
128
|
+
repository `idle`.
|
|
129
|
+
- The run exposed one additional bounded UX defect: local replacement start initially required a
|
|
130
|
+
manual return from the cancelled Task branch to `main`. The final candidate makes local Task start
|
|
131
|
+
create its branch from the exact declared base ref even when another clean Task branch is checked
|
|
132
|
+
out, with a deterministic regression.
|
|
133
|
+
|
|
134
|
+
## Non-goals
|
|
135
|
+
|
|
136
|
+
- Fixing the downstream `signal_v4` NUL validator in this repository.
|
|
137
|
+
- Deleting historical Milestones, Tasks, branches, chats, worktrees, or append-only evidence.
|
|
138
|
+
- Broadening delegated authority or removing human final acceptance.
|
|
139
|
+
- Publishing, tagging, pushing, or modifying `signal_v4` without separate user authorization.
|
|
140
|
+
- Declaring `2.0.0` stable before the new real `signal_v4` Milestone completes successfully.
|
|
141
|
+
|
|
142
|
+
## Release gate
|
|
143
|
+
|
|
144
|
+
`2.0.0-beta.1` is recommended only when all confirmed findings are closed, every investigation is
|
|
145
|
+
resolved with evidence, deterministic and crash replay pass, the real-agent disposable Milestone
|
|
146
|
+
reaches final acceptance, an independent final audit has no unresolved material finding, and the
|
|
147
|
+
release diff contains no downstream product implementation.
|
|
148
|
+
|
|
149
|
+
## Final audit and residual risks
|
|
150
|
+
|
|
151
|
+
No material requirement gap remains in the beta.1 scope. The final source audit confirmed that
|
|
152
|
+
authority checks precede replacement/context-refresh target writes, cancelled Task authority is
|
|
153
|
+
deleted inside the same recoverable transaction, terminal decisions outrank Knowledge navigation,
|
|
154
|
+
and ordinary CLI output contains no reusable writer credential.
|
|
155
|
+
|
|
156
|
+
Residual beta risks are bounded:
|
|
157
|
+
|
|
158
|
+
- the project journal is a local-process/local-filesystem recovery protocol, not a distributed
|
|
159
|
+
cross-host transaction service; cross-machine synchronization remains outside the package
|
|
160
|
+
contract;
|
|
161
|
+
- the final real-agent run encountered and safely recovered the clean-branch start precondition;
|
|
162
|
+
the final candidate fixes that behavior and covers it deterministically, but the entire long E2E
|
|
163
|
+
was not repeated solely for that Git convenience change;
|
|
164
|
+
- `2.0.0` stable remains gated on a successful new real `signal_v4` Milestone, as stated in the
|
|
165
|
+
non-goals.
|
|
@@ -160,9 +160,10 @@ exact `task step-complete` из `next`, а core выполняет checks, со
|
|
|
160
160
|
записывает evidence. Worker не использует grant. При изменении Knowledge Map
|
|
161
161
|
выполни reconcile; approve разрешён только при exact project_memory.approve
|
|
162
162
|
option этого project-scoped grant. Затем knowledge-rebind и новая authorization.
|
|
163
|
-
Если next
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
Если next возвращает top-level `action: task context-refresh` и exact `contextRefresh` для того же
|
|
164
|
+
grant, выполни только `task context-refresh`; не запускай перед ним standalone reconcile. Exact
|
|
165
|
+
Plan-declared supporting additions допустимы только когда их признал Core. При любом другом
|
|
166
|
+
изменении source set, category/authority, gaps или conflicts используй обычный видимый процесс.
|
|
166
167
|
|
|
167
168
|
После submit запусти отдельный Independent Reviewer; Reviewer не использует
|
|
168
169
|
grant и не исправляет код. После второго failed review не запускай очередной
|
package/docs/development-flow.md
CHANGED
|
@@ -50,10 +50,12 @@ active Worker Step, a no-op binding, an invalid knowledge target, or a modified
|
|
|
50
50
|
artifact. After the user authorizes the rebound Plan, execution resumes in the existing
|
|
51
51
|
workspace; if all Steps are complete, the next action is submission.
|
|
52
52
|
|
|
53
|
-
When `next
|
|
54
|
-
`task context-refresh`
|
|
55
|
-
execution reauthorization. Core validates both approval
|
|
56
|
-
|
|
53
|
+
When `next` returns top-level `action: task context-refresh` with an eligible grant,
|
|
54
|
+
`task context-refresh` composes reconcile, delegated map approval, rebind, and delegated
|
|
55
|
+
execution reauthorization. Do not run standalone reconcile first. Core validates both approval
|
|
56
|
+
transitions before writing. It permits content-only drift and exact Plan-declared supporting-source
|
|
57
|
+
additions under Milestone autonomy; every unsafe source-set, category, scope, authority, gap, or
|
|
58
|
+
conflict change is rejected.
|
|
57
59
|
|
|
58
60
|
Submission requires a clean, auditable Task history and records evidence for the exact
|
|
59
61
|
Task head. `task review-launch` starts a separate read-only reviewer. A passing fresh review
|
package/docs/project-memory.md
CHANGED
|
@@ -30,12 +30,14 @@ definition, status, and evidence record, records the old/new binding, supersedes
|
|
|
30
30
|
authorization, and cannot run while a Step is in progress. If local state is lost, the map
|
|
31
31
|
is rebuilt from repository files.
|
|
32
32
|
|
|
33
|
-
For delegated autonomy, repository `next`
|
|
34
|
-
active and inspection proves
|
|
33
|
+
For delegated autonomy, repository `next` returns top-level `action: task context-refresh` and an
|
|
34
|
+
exact `contextRefresh` option when the stored map was active and inspection proves eligible drift.
|
|
35
|
+
Do not run standalone reconcile first. `task context-refresh` then performs
|
|
35
36
|
reconcile, delegated map approval, Task rebind, and delegated execution authorization while
|
|
36
|
-
preserving the ordinary audit events.
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
preserving the ordinary audit events. In addition to content-only drift, a Milestone Autonomy Grant
|
|
38
|
+
may admit one or more exact Plan-declared supporting sources. The command rejects removed,
|
|
39
|
+
undeclared, canonical, category/scope/authority-changing, gap-changing, and conflicting sources.
|
|
40
|
+
Those changes remain visible for normal classification and approval.
|
|
39
41
|
|
|
40
42
|
## Codebase graph
|
|
41
43
|
|
package/docs/release.md
CHANGED
|
@@ -20,14 +20,21 @@ The downstream smoke packs the actual tarball, installs it into an empty tempora
|
|
|
20
20
|
runs the packaged CLI handshake, and proves installation created none of `.codex`, `.tasks`,
|
|
21
21
|
`.increments`, or `.memory-bank` in that project.
|
|
22
22
|
|
|
23
|
-
For
|
|
23
|
+
For beta.1, the release gate also relies on `npm run release:check` to fail if:
|
|
24
24
|
|
|
25
25
|
- canonical entity schema 2 shapes drift;
|
|
26
26
|
- protocol 1 compatibility is no longer additive;
|
|
27
27
|
- the delegated transition allow-list expands;
|
|
28
28
|
- schema-2 adoption is presented as `state migrate` instead of posture sidecars;
|
|
29
29
|
- alpha.7 rescue, Milestone autonomy (including guarded content refresh), derived actor, or
|
|
30
|
-
proof-obligation capabilities and schemas are absent from the packaged surface
|
|
30
|
+
proof-obligation capabilities and schemas are absent from the packaged surface;
|
|
31
|
+
- terminal Task replacement, project-level transaction recovery, secret-safe lock diagnostics,
|
|
32
|
+
version/base diagnostics, or serialized maintainer validation are missing.
|
|
33
|
+
|
|
34
|
+
Full `npm test` and `npm run validate` invocations share destructive build outputs and are therefore
|
|
35
|
+
single-owner operations. A concurrent invocation fails immediately with
|
|
36
|
+
`VALIDATION_ALREADY_RUNNING`; retry it after the owner exits. Stale process locks are recovered
|
|
37
|
+
automatically.
|
|
31
38
|
|
|
32
39
|
Tag releases as `v<package-version>`. The tag workflow verifies the tag/package match and
|
|
33
40
|
uses npm trusted publishing with public access. For a public GitHub repository and public
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Canonical `split-required` recovery
|
|
2
|
+
|
|
3
|
+
Use this procedure only when the exact package-local `next` response identifies a terminal
|
|
4
|
+
`split-required` decision. Never rebind, refresh, replan, authorize, or resume the historical Task.
|
|
5
|
+
|
|
6
|
+
## Delegate prompt
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
Continue the active Milestone through the package-local codex-workflow-v2 Core only.
|
|
10
|
+
|
|
11
|
+
1. Run `codex-workflow status --repo .` and `codex-workflow next --repo .`. Treat every returned
|
|
12
|
+
revision and action as authoritative. Stop on corruption, stop-escalate, version divergence, or
|
|
13
|
+
an unexpected action. Do not edit workflow state or sidecars.
|
|
14
|
+
2. Confirm that `next` reports the historical Task as `split-required`. Do not run
|
|
15
|
+
`task knowledge-rebind`, `task context-refresh`, `task plan-set`, `task authorize`, or `task run`
|
|
16
|
+
for that Task.
|
|
17
|
+
3. If `next` says `discovery start`, create one thin replacement Discovery containing only the
|
|
18
|
+
failed Step's remaining outcome, exact acceptance, constraints, and explicit out-of-scope. Make
|
|
19
|
+
it `ready_to_materialize`, then run `status` and `next` again.
|
|
20
|
+
4. When `next` returns `task replacement-materialize`, run that exact command with its old Task,
|
|
21
|
+
Discovery, and Milestone revisions, a precise replacement title, and the current authorized
|
|
22
|
+
actor. This single transaction must consume the Discovery, cancel/link the historical Task,
|
|
23
|
+
create/link the replacement Task, change both memberships, supersede Milestone execution
|
|
24
|
+
authorization, and leave the Milestone awaiting reauthorization. Do not perform a separate
|
|
25
|
+
scope change for these effects.
|
|
26
|
+
5. Run `status` and `next`. Verify: old Task `cancelled`; old membership `cancelled`; new Task
|
|
27
|
+
`planning` and `replacementForTaskId` points to the old Task; new membership `required`;
|
|
28
|
+
Milestone `awaiting_execution_authorization`. If any relation is missing, stop and run `doctor`.
|
|
29
|
+
6. Follow the exact `next` transition to reauthorize the changed Milestone. Run `status` and `next`
|
|
30
|
+
again. Do not reuse the historical Task's Plan or authorization.
|
|
31
|
+
7. Plan the replacement Task from its own Brief, record the required Plan Risk Audit, authorize it,
|
|
32
|
+
prepare and claim its C1 handoff, and execute only the exact Step returned by `next`. Run
|
|
33
|
+
`status` and `next` after every state boundary.
|
|
34
|
+
8. Complete review, final acceptance, merge, remaining required Tasks, Milestone validation, and
|
|
35
|
+
Milestone final acceptance through exact Core transitions. Never create a fourth remediation
|
|
36
|
+
attempt for the historical Task.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Exact replacement command shape
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
codex-workflow task replacement-materialize --repo . \
|
|
43
|
+
--id TASK-OLD \
|
|
44
|
+
--expected-revision OLD_TASK_REVISION \
|
|
45
|
+
--discovery DISC-REPLACEMENT \
|
|
46
|
+
--expected-discovery-revision DISCOVERY_REVISION \
|
|
47
|
+
--expected-milestone-revision MILESTONE_REVISION \
|
|
48
|
+
--title "Thin replacement title" \
|
|
49
|
+
--actor agent:milestone-coordinator
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Copy revisions from the same `next` response. If multiple ready Discoveries exist, Core refuses to
|
|
53
|
+
guess; choose the intended Discovery explicitly after reviewing its raw content.
|
|
@@ -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`.
|