codex-workflow-v2 2.0.0-beta.12 → 2.0.0-beta.12.10

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 (62) hide show
  1. package/README.md +65 -5
  2. package/dist/src/alpha6/downstream-proof.d.ts +68 -0
  3. package/dist/src/alpha6/downstream-proof.js +604 -0
  4. package/dist/src/alpha6/downstream-proof.js.map +1 -0
  5. package/dist/src/alpha6/milestone.d.ts +6 -2
  6. package/dist/src/alpha6/milestone.js +164 -10
  7. package/dist/src/alpha6/milestone.js.map +1 -1
  8. package/dist/src/alpha6/plan-risk.js +2 -2
  9. package/dist/src/alpha6/plan-risk.js.map +1 -1
  10. package/dist/src/alpha6/remediation.d.ts +8 -3
  11. package/dist/src/alpha6/remediation.js +374 -9
  12. package/dist/src/alpha6/remediation.js.map +1 -1
  13. package/dist/src/alpha6/review.d.ts +6 -0
  14. package/dist/src/alpha6/review.js +12 -0
  15. package/dist/src/alpha6/review.js.map +1 -1
  16. package/dist/src/alpha7/corrective-recovery.d.ts +8 -1
  17. package/dist/src/alpha7/corrective-recovery.js +406 -26
  18. package/dist/src/alpha7/corrective-recovery.js.map +1 -1
  19. package/dist/src/cli.js +135 -5
  20. package/dist/src/cli.js.map +1 -1
  21. package/dist/src/contracts.d.ts +154 -3
  22. package/dist/src/dependency-provenance.d.ts +9 -2
  23. package/dist/src/dependency-provenance.js +70 -8
  24. package/dist/src/dependency-provenance.js.map +1 -1
  25. package/dist/src/git.d.ts +1 -1
  26. package/dist/src/git.js +6 -2
  27. package/dist/src/git.js.map +1 -1
  28. package/dist/src/historical-step-provenance.d.ts +20 -0
  29. package/dist/src/historical-step-provenance.js +111 -0
  30. package/dist/src/historical-step-provenance.js.map +1 -0
  31. package/dist/src/state/corrective-replan-executor.js +5 -0
  32. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  33. package/dist/src/version.d.ts +1 -1
  34. package/dist/src/version.js +1 -1
  35. package/dist/src/version.js.map +1 -1
  36. package/dist/src/workflow.d.ts +40 -2
  37. package/dist/src/workflow.js +1440 -65
  38. package/dist/src/workflow.js.map +1 -1
  39. package/docs/autonomy-guardrails.md +91 -1
  40. package/docs/decisions.md +14 -0
  41. package/docs/delegated-approval.md +6 -1
  42. package/docs/development-flow.md +60 -5
  43. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  44. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  45. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  46. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +97 -7
  47. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +68 -9
  48. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +150 -33
  49. package/docs/release.md +51 -8
  50. package/docs/updating-existing-project.md +155 -2
  51. package/docs/validation-report.md +101 -94
  52. package/package.json +7 -2
  53. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
  54. package/plugins/codex-workflow-gateway/references/protocol.md +69 -1
  55. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +156 -1
  56. package/schemas/authorization-event.schema.json +8 -1
  57. package/schemas/downstream-proof-invalidation-event.schema.json +71 -0
  58. package/schemas/downstream-proof-replan-recovery-event.schema.json +61 -0
  59. package/schemas/milestone-scope-change-event.schema.json +25 -1
  60. package/schemas/stop-escalate-override-event.schema.json +45 -0
  61. package/schemas/task.schema.json +104 -0
  62. package/scripts/generate-pdf-docs.py +13 -2
@@ -24,6 +24,30 @@ and self-contradictory classifications. `split-required` and `stop-escalate` blo
24
24
  authorization. The sidecar, not informal Plan prose, is
25
25
  the source of truth for which Steps require strict review.
26
26
 
27
+ ## Audited remediation topology
28
+
29
+ A current pre-execution `stop-escalate` may prove that the Plan is blocked by a missing upstream
30
+ capability rather than by an implementation defect inside the Task. Beta.12.10 handles only this
31
+ shape without a new human approval. Repository `next` first requires one ordinary Discovery whose
32
+ facts, scope, constraints, and acceptance describe the exact missing capability. When ready, it
33
+ advertises `milestone remediation-materialize` with the blocked Task/Milestone revisions, audit
34
+ binding, and required predecessor frontier.
35
+
36
+ The transition is safe by construction rather than by agent judgment. Its input cannot supply a
37
+ replacement Milestone outcome, success signal, acceptance, checks, or arbitrary membership graph.
38
+ Core appends one required Task, copies the blocked Task's exact direct predecessor frontier, adds
39
+ the remediation Task as one new dependency of the blocked Task, and changes nothing else. It runs
40
+ under an idle, clean observation boundary and records one hash-chained `audited-remediation`
41
+ scope-change event. Reuse of the same Plan Risk Audit is rejected.
42
+
43
+ The previous current Milestone execution authorization and exact blocking audit derive a new
44
+ `corrective-derived` Milestone execution authorization. While that authority remains current,
45
+ `next.correctiveDerivedApproval` may authorize and finally accept required Tasks using the exact
46
+ derived actor, without a human or delegation grant. This does not bypass Plan Risk Audit,
47
+ mechanical feasibility, C1 handoff, Step checks/commits, strict review, Task review, dependency
48
+ runnability, clean-Git requirements, or final Milestone acceptance. Any later arbitrary scope
49
+ change supersedes this authority.
50
+
27
51
  Guarded categories cover:
28
52
 
29
53
  - forward database or state migrations;
@@ -74,7 +98,50 @@ default. `replan` is accepted only with `planConflict.planClause`, `whyFixCannot
74
98
  `minimalPlanChange`; Core retains that evidence in the hash-chained Step-review event and routes
75
99
  the failed Step to `task plan-set`. Replan may change implementation Steps only. Explicit historical
76
100
  `continue-fix`, `replan-required`, `split-required`, and `stop-escalate` decisions remain readable;
77
- an explicit split or stop still outranks ordinary execution.
101
+ an explicit split or stop still outranks ordinary execution except for the narrow beta.11
102
+ attempt-four stop compatibility route below.
103
+
104
+ ### Human-confirmed beta.11 attempt-four stop compatibility
105
+
106
+ Beta.12.1 can resume one historical shape that beta.11 stopped mechanically: the same failed
107
+ guarded Step has exactly two `ordinary` remediation events, one `corrective` third event, an exact
108
+ attempt-3 `continue-fix` decision, and an attempt-4 `stop-escalate` decision under the unchanged
109
+ Plan. Fresh `next` advertises `task stop-override-prepare` only for that shape and only on a clean
110
+ local Task branch with no Step in progress, writer lease, Task transaction, or Core operation.
111
+
112
+ Preparation is read-only and binds Task revision, Step, both corrective decisions, all three
113
+ remediation events, Plan hash, Git HEAD, package version, actor, and reason to an `SOO-*`
114
+ confirmation code. In a later explicit user turn, invoke `task stop-override-apply` with the same
115
+ inputs and code. Apply appends `stop-escalate-overrides.jsonl`; it never deletes or rewrites the
116
+ original stop. A stale binding, wrong code, duplicate/conflicting override, or damaged hash chain
117
+ fails before continuation. Delegation is not accepted for this Human gate.
118
+
119
+ This is not a general stop reversal. It does not apply to `split-required`, semantic Plan drift, a
120
+ different attempt ordinal, missing attempt-3 continue authority, or an agent-authored semantic stop
121
+ outside the beta.11 policy shape. After a valid append, attempt four returns to the normal `task run`
122
+ then strict-review cycle; review quality and all later corrective decisions remain unchanged.
123
+
124
+ Beta.12.4 also handles the case where the accepted third attempt changed approved Project Knowledge
125
+ and package self-updates added later refreshes: the already-applied override may be followed by one
126
+ or more ordinary delegated `task context-refresh` transitions before attempt four starts. A fresh
127
+ `next` resumes `task run` only when Core can prove all of the following together: the same exact
128
+ three-event remediation history and stop override remain hash-valid; every adjacent Plan differs
129
+ only in its canonical Knowledge Map binding line; the Knowledge rebinds and mechanical Plan Risk
130
+ Audit rebounds form one contiguous source-to-current chain; and the refreshed approval plus current
131
+ execution authorization share the valid delegated authority. If Git HEAD advanced, every
132
+ intervening commit must have one exact registered dependency-provenance recovery, one parent, a
133
+ `systemCommits` binding, and exactly the `package.json`/`package-lock.json` diff. The proof is derived
134
+ from existing append-only evidence, so this route does not create a second recovery journal.
135
+ Missing evidence, semantic Plan change, an unregistered/product commit, a broken chain, or damaged
136
+ chronology routes to `doctor` rather than weakening the generic two-attempt corrective recovery gate.
137
+
138
+ If fresh navigation performs the final content refresh before the matching dependency-provenance
139
+ recovery, that later administrative recovery may advance the Task revision without invalidating the
140
+ mechanical audit. Core accepts the revision only when the exact count of post-audit recovery records
141
+ fully explains the difference: each record must belong to the already verified single-parent Git
142
+ chain, remain ordered, bind a Workflow system commit, and preserve the exact two-file dependency
143
+ diff. A bare greater revision, unrelated Task write, duplicate record, damaged parent, product
144
+ commit, or unverified recovery remains blocked.
78
145
 
79
146
  ### First-failure Plan-integrity recovery
80
147
 
@@ -98,6 +165,29 @@ validation, Risk Audit, Human confirmation, journaled execution, readback, and r
98
165
  authorization. Other check failures use the normal continuable remediation route; they do not
99
166
  receive the narrow Plan-integrity shortcut, but attempt count alone never stops them.
100
167
 
168
+ ### Downstream-proof predecessor recovery
169
+
170
+ Core prevents `task step-complete` when the active proof Step has dirty files outside its own
171
+ `allowedWrites`. A bounded recovery is advertised only when every such file belongs to a completed
172
+ transitive predecessor, the branch and registered Git history are exact, the active Step has no
173
+ completion evidence, and no unrelated path exists. The atomic transition preserves product files
174
+ and HEAD, moves invalidated predecessor commits into historical `invalidatedStepCommits`, clears stale Step
175
+ evidence, supersedes execution authority, yields C1, and routes the same Task to ordinary `plan-set`.
176
+ The route grants no authority to change Task objective, requirements, acceptance, or Milestone
177
+ topology.
178
+
179
+ The beta.12.7 compatibility repair for an accidental post-invalidation Knowledge rebind is similarly
180
+ non-semantic. It may restore `needs_fix` and preserve an exact dirty-worktree binding, but it cannot
181
+ approve a replacement Plan, infer new requirements, or treat preserved bytes as completed evidence.
182
+ After any required Knowledge refresh, the full unfinished remainder is planned again. Carryover into
183
+ execution is valid only when one newly authorized Step owns every bound path and the current
184
+ HEAD/path/content hashes still match; checks and strict review retain their ordinary authority.
185
+
186
+ Docker permission diagnostics are classified before consuming retry authority. Sandbox `EPERM` or
187
+ permission denial gets one exact escalated rerun of the health probe/Plan check. It is not an infra
188
+ failure and cannot authorize a Docker Desktop restart or image substitution. Only an escalated
189
+ invocation that reaches Docker and proves daemon unavailability establishes that failure class.
190
+
101
191
  ## Atomic context refresh
102
192
 
103
193
  When `next` returns top-level `action: task context-refresh` with an exact option, a
package/docs/decisions.md CHANGED
@@ -97,3 +97,17 @@ This document closes the requirement gaps identified during the V2 design review
97
97
  19. **Derived independent actors.** Core derives stable Task Worker and corrective Auditor
98
98
  actors from Task identity. This removes name-selection pauses without weakening C1 claim,
99
99
  lease, or auditor-independence checks.
100
+ 20. **Stop-override authority survives mechanical update chains.** The exact Human-confirmed
101
+ beta.11 attempt-four override remains valid across any contiguous append-only sequence of
102
+ content-only Plan rebinds. Every adjacent immutable Plan, Knowledge rebind, and mechanical
103
+ Plan Risk Audit rebound must agree. Git HEAD may advance only through a contiguous chain of
104
+ already registered dependency-provenance commits, each single-parent and limited to
105
+ `package.json` plus `package-lock.json`. Semantic Plan drift, product commits, missing
106
+ provenance, or broken chronology still fails closed; generic corrective-decision recovery
107
+ remains direct and is not widened.
108
+ 21. **Administrative revision continuity is evidence-accounted.** A dependency-provenance
109
+ recovery recorded after the current mechanical Plan Risk Audit may explain exactly one later
110
+ Task revision without invalidating an already applied stop override. Core counts only ordered
111
+ recovery records from the independently verified override-to-authorization Git chain and
112
+ requires the resulting expected revision to equal the current Task revision. Unexplained
113
+ revisions and damaged provenance remain blocked; this is not a general `revision >=` rule.
@@ -90,7 +90,12 @@ uses the grant and passes `--delegation-grant` to the Core transition.
90
90
 
91
91
  Ordinary semantic Milestone scope changes remain journaled, human-only lifecycle actions. A
92
92
  contract delegate may evolve only the membership graph inside the cryptographically bound
93
- semantic scope.
93
+ semantic scope. The separate beta.12.10 `milestone remediation-materialize` route is not delegation
94
+ and does not widen this allow-list: Core derives it only from a current blocking Plan Risk Audit and
95
+ a previously authorized active Milestone. Its topology effect is fixed to one new required upstream
96
+ Task plus one dependency edge, with all Milestone semantics preserved. The resulting
97
+ `corrective-derived` Task approvals remain valid only while that exact derived Milestone authority
98
+ is current; final Milestone acceptance is unaffected.
94
99
 
95
100
  ### Milestone delegate prompt
96
101
 
@@ -76,8 +76,10 @@ Submission requires a clean, auditable Task history and records evidence for the
76
76
  Task head. `task review-launch` starts a separate read-only reviewer and atomically records its
77
77
  result. If C1 handoff is active, keep `--actor` equal to the current claimant or required actor
78
78
  from `next`; the reviewer identity remains internal to the compound route. A passing fresh review
79
- permits Result creation. Human final acceptance binds Brief, Plan, Result, evidence, and
80
- the accepted head. Base advancement forces synchronization, checks, review, and acceptance
79
+ permits Result creation. Final Task acceptance binds Brief, Plan, Result, evidence, and
80
+ the accepted head. It is human/delegated by default; a Task covered by the current audited-remediation
81
+ Milestone authority uses the exact `correctiveDerivedApproval` actor returned by `next` without a
82
+ new human gate. Base advancement forces synchronization, checks, review, and acceptance
81
83
  to be repeated before merge.
82
84
 
83
85
  The Technical Planner performs a risk review before authorization. Migration work includes a
@@ -99,7 +101,36 @@ the exact evidence-bound early `replan-required` posture; it never edits source,
99
101
  Continue through the advertised corrective yield and corrective replan rather than calling
100
102
  `task run` again.
101
103
 
102
- Execution authorization and final acceptance use the human path by default. If the user has
104
+ If a later proof Step leaves changes both in its own scope and in files owned by a completed
105
+ transitive predecessor, fresh `next` advertises `task downstream-proof-recover` instead of
106
+ `task step-complete`. The command preserves the dirty worktree and HEAD, append-only records the
107
+ invalidated predecessor completion, yields its C1 lease, and returns the same Task to `task plan-set`.
108
+ The replacement Plan must cover the unfinished remainder and pass a fresh Risk Audit and execution
109
+ authorization. Do not stash, reset, commit, or recreate the Task around this route.
110
+
111
+ If the repository is still on a package version that cannot advertise that route, beta.12.6 has
112
+ one update-only bridge. After exact dependency-only commits have aligned the active Milestone base
113
+ and Task branch, `update downstream-proof-dependency-recover` validates recorded history at the
114
+ candidate parent, binds the active proof dirty set by content hash, and registers only the Task
115
+ dependency commit. Product bytes and Step state remain unchanged; fresh `next` must then advertise
116
+ the ordinary `task downstream-proof-recover`. This is not a general dirty-update permission.
117
+
118
+ If beta.12.6 already performed that recovery but a subsequent Knowledge approval mechanically
119
+ rebound its rejected Plan, use only the beta.12.7 stranded-replan bridge advertised by fresh `next`.
120
+ The source preflight runs before dependency transport and binds the exact beta.12.6 Task revision,
121
+ HEAD, dirty paths, and content hash. After dependency-only base/Task commits and provenance recovery,
122
+ `task downstream-proof-replan-recover` restores `needs_fix`. Reconcile/approve stale Project Knowledge,
123
+ then replace the full unfinished Plan. The preserved dirty set may enter execution only through one
124
+ new Step whose `allowedWrites` owns every path and whose fresh `next` reports validated carryover.
125
+ Completing that Step still requires its checks, Core-owned commit, and any guarded strict review.
126
+
127
+ A sandboxed Docker `EPERM`, `operation not permitted`, or `permission denied` result is not a failed
128
+ daemon check. Re-run the exact probe/check once with sandbox escalation without consuming a retry.
129
+ Restart Docker Desktop only with separate authorization after the escalated call reaches Docker and
130
+ proves the daemon unavailable.
131
+
132
+ Execution authorization and final acceptance use the human path by default. The only Core-derived
133
+ exception is a current audited-remediation Milestone authority described below. If the user has
103
134
  previously issued an active delegation grant for the exact transition and scope, the named
104
135
  delegate may perform that transition with `--delegation-grant`. The event keeps the delegate
105
136
  as actor and separately records the principal and policy hash. Expired, revoked, wrong-scope,
@@ -141,6 +172,30 @@ journaled recovery across `state.json`, `plan.json`, and `scope-change-events.js
141
172
  Plan uses the same recovery machinery for its exact two-file `state.json` + `plan.json` commit and
142
173
  does not manufacture a scope-change event.
143
174
 
175
+ There is one narrower route for a confirmed pre-execution topology defect. When the current Plan
176
+ Risk Audit for an unstarted required Task records `stop-escalate`, repository `next` routes through
177
+ a remediation Discovery and then `milestone remediation-materialize`. Core accepts no free-form
178
+ Milestone Plan. It atomically:
179
+
180
+ - consumes one ready Discovery and creates one new required remediation Task;
181
+ - makes that Task inherit the blocked Task's exact direct predecessor frontier, all already merged;
182
+ - adds exactly one dependency edge from the blocked Task to the remediation Task;
183
+ - preserves Milestone outcome, success signal, acceptance, checks, prior memberships, discovery,
184
+ and base branch;
185
+ - binds the scope-change sidecar to the exact rejected Task revision, Brief/Plan hashes, and
186
+ `stop-escalate` audit event/hash;
187
+ - supersedes the old execution authorization and records a `corrective-derived` replacement bound
188
+ to the prior authorization and audit.
189
+
190
+ No confirmation code or human approval is used for this route. It is idempotent per audit and
191
+ rejects dirty checkout, active/stale leases, pending operations, a started Task, a non-current
192
+ audit, a changed predecessor frontier, a non-merged predecessor, or any attempt to change Milestone
193
+ semantics. Repository `next` prioritizes the remediation Task. After it merges, `next` returns the
194
+ original Task to `task plan-set`; its replacement Plan and Risk Audit are evaluated normally.
195
+ Current required Tasks may use the exact `correctiveDerivedApproval.actor` returned by `next` for
196
+ Task execution authorization and final acceptance. Worker handoff, checks, commits, strict review,
197
+ and final Milestone acceptance remain ordinary independent gates.
198
+
144
199
  A Milestone has no integration branch. Validation requires all required Tasks to be
145
200
  `merged`, checks the current clean base branch, and writes evidence plus Result. Final
146
201
  acceptance binds those artifacts to the unchanged base HEAD. Cancellation records a reason
@@ -193,11 +248,11 @@ wake a coordinator that has already ended its turn.
193
248
 
194
249
  | Participant | Responsible for | Cannot decide |
195
250
  | --- | --- | --- |
196
- | User / principal | map classifications, direct approvals, delegation policy and revocation, scope changes | implementation evidence |
251
+ | User / principal | map classifications, direct approvals, delegation policy and revocation, arbitrary scope changes | implementation evidence |
197
252
  | Delegate | only transitions explicitly allowed by an active grant | grant creation, expansion, impersonating the principal |
198
253
  | Scope Lead | discovery, facts, unknowns, Task/Milestone recommendation | production edits |
199
254
  | Technical Planner | requirements mapping, Steps, checks, knowledge impact | authorization |
200
- | Delivery Coordinator | valid transitions, dispatch, evidence collection | scope expansion |
255
+ | Delivery Coordinator | valid transitions, dispatch, evidence collection, exact audited-remediation route | arbitrary scope expansion |
201
256
  | Worker | one dispatched Step within allowed paths | adjacent Steps or Plan changes |
202
257
  | Independent Reviewer | isolated comparison of requirements, diff, checks, and evidence | fixes or acceptance |
203
258
  | Core CLI | state, revisions, hashes, locks, Git mechanics, diagnostics | semantic product choices |
@@ -1,10 +1,10 @@
1
1
  ---
2
- title: Codex Workflow V2: архитектура beta.12
2
+ title: Codex Workflow V2: архитектура beta.12.10
3
3
  subtitle: Источники истины, lifecycle, роли, delegation, зависимости Tasks и границы доверия
4
4
  part: Часть 1 из 3 | Архитектура
5
5
  document_version: 2.0
6
- date: 27 августа 2026
7
- subject: Архитектура и границы Codex Workflow V2 beta.12
6
+ date: 31 августа 2026
7
+ subject: Архитектура и границы Codex Workflow V2 beta.12.10
8
8
  ---
9
9
 
10
10
  # 1. Назначение и граница системы
@@ -18,7 +18,7 @@ Codex Workflow V2 - локальный state machine поверх Codex App, Git
18
18
  Система рассчитана на одного пользователя и одну машину. Она не предоставляет distributed locking,
19
19
  криптографическую идентификацию actor string или безопасную синхронизацию state между компьютерами.
20
20
 
21
- ## 1.1. Что beta.12 гарантирует
21
+ ## 1.1. Что beta.12.10 гарантирует
22
22
 
23
23
  - exact project-local npm package и совместимый handshake до lifecycle действий;
24
24
  - Discovery до materialization Task или Milestone;
@@ -26,11 +26,22 @@ Codex Workflow V2 - локальный state machine поверх Codex App, Git
26
26
  - mechanical-feasibility проверку поддерживаемых форм Plan до новой Task authorization;
27
27
  - явный Milestone dependency DAG и один общий runnable predicate для routing, handoff, claim и start;
28
28
  - один C1 writer lease, секретные one-time credentials и Core-owned Step commits;
29
+ - lease-free Human final-acceptance gate: `task result-set` проверяет и освобождает active writer
30
+ lease, а после acceptance merge получает новый credential только через fresh recovery route;
29
31
  - external-sealed Step/Task review в отдельных Codex tasks;
30
32
  - state-bound human gates либо ранее выданные bounded delegation contracts;
31
33
  - journaled recovery для составных переходов и fail-closed поведение при drift/corruption.
32
-
33
- ## 1.2. Что beta.12 не гарантирует
34
+ - bounded recovery, когда downstream proof требует изменить уже завершённый predecessor Step:
35
+ worktree и HEAD сохраняются, stale completion authority снимается, та же Task возвращается в planning.
36
+ - bounded compatibility recovery, если beta.12.6 после этого recovery ошибочно rebind-нула отвергнутый
37
+ Plan: exact dirty bytes сохраняются до нового consolidated Step, а Knowledge refresh не отменяет `plan-set`.
38
+ - corrective Plan сохраняет authority исключённых completed Step commits, а beta.12.9 bounded recovery
39
+ исправляет уже stranded state только при passed strict review и прежнем hash-bound final acceptance.
40
+ - pre-execution `stop-escalate`, доказавший отсутствующую upstream capability, может materialize ровно
41
+ один additive remediation Task без нового Human gate; Core сохраняет Milestone semantics и выводит
42
+ authority из текущей Milestone authorization и exact audit evidence.
43
+
44
+ ## 1.2. Что beta.12.10 не гарантирует
34
45
 
35
46
  - правильность продуктовой идеи или автоматически выбранного provider Task;
36
47
  - semantic sufficiency Plan, если точные факты нельзя доказать поддерживаемым analyzer;
@@ -106,6 +117,11 @@ Discovery -> materialize -> Plan -> Plan Risk Audit
106
117
  -> final acceptance -> merge
107
118
  ```
108
119
 
120
+ `task result-set` является последним execution lease-bound переходом. Он требует рекламируемый
121
+ writer token, освобождает lease до `awaiting_final_acceptance` и тем самым допускает неограниченную
122
+ по времени Human pause без stale-lock блокировки repository. После acceptance прежний token не
123
+ переиспользуется: fresh `next` выдаёт bounded `task writer-credential-replace` для merge.
124
+
109
125
  Fresh Task authorization записывает versioned mechanical-feasibility evidence. Analyzer может
110
126
  выдать `blocked`, `pass` или `unverified`. `unverified` не означает semantic approval; он означает,
111
127
  что поддерживаемая точная грамматика не доказала противоречие.
@@ -218,17 +234,91 @@ Failed review не ограничивает число попыток. Попы
218
234
  `route=replan` допустим только с точным Plan conflict и меняет лишь implementation Steps, не objective,
219
235
  requirements или acceptance. Explicit `split-required` и `stop-escalate` остаются stop/redirect decisions.
220
236
 
237
+ Beta.12.1 добавила одну append-only compatibility оговорку: beta.11 attempt-four
238
+ `stop-escalate` после exact `ordinary, ordinary, corrective` и prior attempt-3 `continue-fix` можно
239
+ возобновить через read-only `stop-override-prepare` и отдельный Human-confirmed
240
+ `stop-override-apply`. Исходный stop сохраняется, `split-required` не подходит, а stale revision,
241
+ Plan, HEAD, lease, transaction или повреждённая chain блокируют переход. Попытка 4 снова проходит
242
+ обычный `task run` и новый strict review.
243
+
244
+ Beta.12.4 сохраняет этот override при последовательности delegated `task context-refresh`, если
245
+ каждая версия Plan изменилась только в canonical Knowledge Map binding. Core проверяет весь
246
+ contiguous rebind/audit chain, mechanical equivalence каждого Plan Risk Audit, общую delegated
247
+ authority и корректную chronology. Git HEAD может продвинуться только через последовательность
248
+ зарегистрированных dependency-provenance commits, каждый из которых меняет ровно package.json и
249
+ package-lock.json. При утрате claimed writer lease используется только одновременно рекламируемый
250
+ `task writer-credential-replace`; semantic Plan drift, разрыв chain или любой другой commit
251
+ возвращают `doctor`.
252
+
253
+ Если последний dependency-provenance recovery записан уже после mechanical audit, он объясняет
254
+ ровно один дополнительный Task revision. Core требует, чтобы audit boundary плюс количество
255
+ проверенных post-audit recoveries точно равнялись current revision; произвольное увеличение
256
+ revision, неверный parent или повреждённая provenance остаются blocker.
257
+
258
+ Dependency-provenance recovery beta.12.1 также сохраняет ранее закоммиченные Task-local поля
259
+ manifest/lock, даже если base их не содержит. Candidate остаётся dependency-only: после удаления
260
+ только Workflow dependency parent и HEAD обязаны совпасть по всем product-owned полям.
261
+
221
262
  beta.11 `task plan-integrity-recover` существует для одного первого checks-failed legacy/late case:
222
263
  отсутствует exact root npm script и текущий Step не может изменить package.json. Recovery не меняет
223
264
  worktree или Plan и не создаёт synthetic second failure; он записывает bound `replan-required`.
224
265
 
266
+ beta.12.6 различает другой случай: активный downstream proof оставил изменения в собственном scope и
267
+ показал необходимость исправить completed transitive predecessor. Fresh `next` вместо невозможного
268
+ `step-complete` рекламирует `task downstream-proof-recover`. Atomic transition сохраняет dirty files и
269
+ HEAD, переносит predecessor commits в historical `invalidatedStepCommits`, очищает только stale Step evidence,
270
+ yield C1 и возвращает ту же Task к новому Plan/risk audit/authorization. Unrelated dirty file,
271
+ non-predecessor ownership, повреждённый journal или unregistered commit fail closed.
272
+
273
+ Если старая версия не может установить этот fix из-за running Step/dirty preflight, beta.12.6
274
+ добавляет отдельный update bridge. После двух exact dependency-only commits на active base и Task
275
+ branch Core проверяет Task history на `HEAD^`, candidate на `HEAD`, все version surfaces, отсутствие
276
+ leases/transactions, predecessor ownership и content hash dirty set. Переход регистрирует только
277
+ dependency commit, не меняет product bytes/Step и делает обычный `task downstream-proof-recover`
278
+ достижимым до manifest-induced Knowledge refresh. Это не общее разрешение dirty update.
279
+
280
+ beta.12.7 закрывает следующий доказанный Signal case: beta.12.6 уже выполнила downstream-proof
281
+ invalidation, но последующее Project Knowledge approval механически вернуло старый двух-Step Plan в
282
+ `awaiting_execution_authorization`. Read-only `update downstream-proof-replan-update-preflight`
283
+ сначала связывает exact beta.12.6 revision, HEAD, шесть dirty paths и content hash. После двух
284
+ dependency-only commits `update downstream-proof-replan-dependency-preflight/recover` регистрирует
285
+ только новый Workflow HEAD. `task downstream-proof-replan-recover` затем атомарно возвращает ту же
286
+ Task в `needs_fix`; stale Knowledge можно reconciliate/approve, но fresh `next` всё равно требует
287
+ новый `task plan-set`. Новый Plan может передать сохранённые bytes только одному Step, который владеет
288
+ всем dirty set. `task run` принимает carryover лишь при exact HEAD/path/hash match, после чего Step
289
+ проходит обычные checks, Core-owned commit и strict review.
290
+
291
+ beta.12.9 закрывает исторический provenance gap corrective replan. Новые replan transitions автоматически
292
+ переносят evidence commits исключённых Steps в `invalidatedStepCommits`. Для уже существующего gap Core
293
+ требует один неожиданный commit, complete passed strict-review chain, verified reviewer attestation и
294
+ совпадающий прежний final acceptance. Если пакет уже зарегистрирован, recovery меняет только Task state.
295
+ Если exact beta.12.9 dependency commit ещё находится в HEAD, отдельный update compatibility route
296
+ регистрирует dependency и historical authority одной revision. Оба пути сохраняют dirty bytes текущего
297
+ Step, не переписывают Git и завершаются fresh обычным `step-complete` flow.
298
+
299
+ beta.12.10 закрывает иной класс тупика до начала выполнения. Если current Plan Risk Audit required Task
300
+ записал `stop-escalate`, потому что нужной upstream capability нет в scope этой Task, Core рекламирует
301
+ audited remediation. Coordinator сначала формализует capability обычным Discovery. Затем одна Project
302
+ transaction append-only создаёт required remediation Task на exact merged predecessor frontier исходной
303
+ Task, добавляет dependency blocked -> remediation и сохраняет все Milestone semantic fields и старые
304
+ memberships. Scope-change event связан с Task revision, Brief/Plan и audit hashes; повторное применение
305
+ того же audit невозможно. Текущая Milestone execution authorization и audit выводят
306
+ `corrective-derived` authority для Task authorize/accept без нового Human gate. Remediation Task проходит
307
+ обычный Plan, audit, C1, commits и reviews. После её merge исходная Task обязана заменить отвергнутый Plan,
308
+ пройти fresh audit и продолжить Step. Final Milestone acceptance не выводится автоматически.
309
+
310
+ Docker socket `EPERM` в sandbox не является доказательством сломанного daemon. Gateway один раз
311
+ повторяет exact health probe или Plan check с sandbox escalation без расходования remediation attempt.
312
+ Restart Docker Desktop требует отдельного разрешения и допустим только после escalated daemon failure.
313
+
225
314
  > **Стоп P04-A:** `split-required` возвращает `STRUCTURAL_REPLACEMENT_REQUIRED` и `structuralReplacementAvailable=false`. Нельзя вызывать retained replacement command, потреблять replacement Discovery или вручную менять topology. Продолжение возможно только после P04-B/P05.
226
315
 
227
316
  # 10. Operational checklist
228
317
 
229
318
  - exact package version установлен, bundled gateway соответствует release и переустановлен;
230
- - handshake подтверждает protocol 2, state schema 2 и beta.12 capabilities;
319
+ - handshake подтверждает protocol 2, state schema 2 и beta.12.10 capabilities;
231
320
  - каждый mutation следует свежему `status -> next` и exact option contract;
321
+ - Docker permission failure сначала классифицируется как sandbox boundary, а не как infra retry;
232
322
  - semantic unknowns и human gates не маскируются delegation;
233
323
  - Task chats создаёт coordinator, credentials остаются только в памяти;
234
324
  - dependencies, progress и review posture берутся из Core projections;
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: Codex Workflow V2: delegated chat-only guide
3
- subtitle: Актуальный beta.12 путь от нового Discovery до принятого Milestone без ручного CLI
3
+ subtitle: Актуальный beta.12.10 путь от нового Discovery до принятого Milestone без ручного CLI
4
4
  part: Часть 2 из 3 | Практика
5
5
  document_version: 2.0
6
- date: 27 августа 2026
7
- subject: Практическое руководство по delegated Discovery и Milestone в Workflow V2 beta.12
6
+ date: 31 августа 2026
7
+ subject: Практическое руководство по delegated Discovery и Milestone в Workflow V2 beta.12.10
8
8
  ---
9
9
 
10
- # 1. Рабочая модель beta.12
10
+ # 1. Рабочая модель beta.12.10
11
11
 
12
12
  Пользователь работает в одном Codex Project и формулирует продуктовый outcome. Coordinator выполняет
13
13
  CLI, создаёт отдельные Task/Reviewer chats и ведёт supervision loop. Workflow Core остаётся authority
@@ -40,7 +40,7 @@ Blocking unknown, scope change, grant issuance или unrecoverable integrity co
40
40
  # 2. Подготовка проекта перед новым Discovery
41
41
 
42
42
  1. Убедитесь, что checkout чистый и выбран правильный repository root.
43
- 2. Установите beta.12 как точную devDependency после публикации release.
43
+ 2. Установите beta.12.10 как точную devDependency после публикации release.
44
44
  3. Обновите и переустановите bundled `codex-workflow-gateway` этого release.
45
45
  4. Проверьте, что declared и installed package versions равны.
46
46
  5. Запустите новый Coordinator chat, не fork старого Milestone conversation.
@@ -56,7 +56,7 @@ AGENTS.md
56
56
  -> doctor только как дополнительная диагностика
57
57
  ```
58
58
 
59
- Handshake beta.12 должен сообщать `packageVersion=2.0.0-beta.12`, `protocolVersion=2`,
59
+ Handshake beta.12.10 должен сообщать `packageVersion=2.0.0-beta.12.10`, `protocolVersion=2`,
60
60
  `stateSchemaVersion=2`, dependency DAG, initial Plan transaction, mechanical feasibility,
61
61
  Milestone autonomy и structural replacement disabled capabilities.
62
62
 
@@ -72,6 +72,7 @@ Milestone autonomy и structural replacement disabled capabilities.
72
72
  | Complete initial Milestone Plan | Human `MAC-*` confirmation | Выдать bounded Milestone autonomy grant |
73
73
  | Task execution | C1 handoff/claim и Core routing | Не использует approval grant как writer credential |
74
74
  | Semantic change | Human scope-change gate | Outcome, success signal, checks, acceptance, discovery, base |
75
+ | Audited pre-execution remediation | Core-derived, без нового Human gate | Только один upstream Task и одна dependency edge; semantic fields неизменны |
75
76
 
76
77
  ## 3.1. Опциональный bootstrap DGR для AUTO
77
78
 
@@ -116,7 +117,7 @@ delegate, scope, transitions и expiry. DGR передаётся только е
116
117
  ```text
117
118
  НОВЫЙ COORDINATOR CHAT
118
119
 
119
- Проведи новый Milestone через Codex Workflow V2 beta.12 в delegated режиме.
120
+ Проведи новый Milestone через Codex Workflow V2 beta.12.10 в delegated режиме.
120
121
  Repository: <ABSOLUTE-REPOSITORY-ROOT>.
121
122
  Milestone ID: AUTO.
122
123
  Delegate actor: agent:milestone-coordinator.
@@ -242,6 +243,10 @@ Credential и approval grant решают разные задачи.
242
243
  4. Claim проверяет dependency binding и возвращает `writerLeaseReceipt`.
243
244
  5. `task run` принимает active writer credential согласно `next.writerTokenContract` и обновляет lease.
244
245
  6. `task step-complete`, review record и другие guarded mutations используют только рекламируемый option.
246
+ 7. После passed final review `task result-set` использует active writer token и освобождает lease до
247
+ `awaiting_final_acceptance`; Human gate не должен удерживать credential.
248
+ 8. После acceptance старый token не используется: fresh `next` рекламирует
249
+ `task writer-credential-replace`, затем разрешает merge или merge confirmation.
245
250
 
246
251
  Нельзя искать token в later payload fields, писать его в prompt/report/evidence или заменять redacted
247
252
  fingerprint. Потеря token не разрешает новый handoff либо lease acquisition вне fresh recovery route.
@@ -293,17 +298,66 @@ Task chat записывает его только при совпадении p
293
298
  | Состояние | Действие |
294
299
  |---|---|
295
300
  | First proven impossible npm check после legacy/late authorization | Только рекламируемый `task plan-integrity-recover` |
301
+ | Downstream proof требует изменить completed predecessor | Только `task downstream-proof-recover`, затем новый Plan/risk audit/authorization в той же Task |
296
302
  | Failed guarded review | Та же Task: исправление и новый strict review без attempt hard stop |
297
303
  | Finding `route=fix` | Продолжить тот же Step; count остаётся диагностикой |
298
304
  | Finding `route=replan` с exact Plan conflict | `task plan-set`, меняются только implementation Steps |
299
305
  | `split-required` | Stop: `STRUCTURAL_REPLACEMENT_REQUIRED`, никаких replacement writes |
300
- | Explicit `stop-escalate` | Terminal user attention |
306
+ | Старая версия + active downstream proof блокируют update | Только beta.12.6 exact dependency commits и advertised `update downstream-proof-dependency-recover` |
307
+ | После downstream recovery beta.12.6 вернула отвергнутый Plan через Knowledge rebind | Только beta.12.7 replan update bridge, затем recovery и новый consolidated Plan той же Task |
308
+ | Corrective Plan потерял authority ранее принятого Step commit | Только advertised beta.12.9 historical-Step preflight/recovery; без rebase/reset и без новой Task |
309
+ | Exact beta.11 attempt-four `stop-escalate` | Только advertised prepare, затем отдельный Human-confirmed apply; исходный stop сохраняется |
310
+ | Pre-execution `stop-escalate` + `auditedRemediation` | Discovery -> `milestone remediation-materialize` -> новый upstream Task -> merge -> replan исходной Task |
311
+ | Любой другой explicit `stop-escalate` | Terminal user attention |
301
312
  | Stale dependency binding | Новый handoff/claim только по fresh `next` |
302
313
  | Review seal drift | Discard review и создать fresh packet |
303
314
 
304
315
  Plan-integrity recovery не редактирует Plan, package.json или worktree и не синтезирует второй failure.
305
316
  P04-A не переносит completed Steps и не rewires dependencies при split.
306
317
 
318
+ Audited remediation beta.12.10 не является generic scope-change. Coordinator использует только exact
319
+ route из fresh `next`: создаёт Discovery для доказанной отсутствующей upstream capability, доводит его
320
+ до ready и вызывает `milestone remediation-materialize` с текущими revisions и exact
321
+ `requiredPredecessorTaskIds`. Core не принимает новый Milestone Plan: сохраняет outcome/success signal,
322
+ acceptance/checks и старые memberships, append-only добавляет один required Task и делает исходную Task
323
+ зависимой от него. Новый Task получает приоритет. Его `task authorize` и `task accept` используют только
324
+ `correctiveDerivedApproval.actor` с `humanApprovalRequired=false`; Worker, checks, commits и reviews
325
+ остаются обычными. После merge fresh `next` возвращает исходную Task к `task plan-set`, свежему Risk
326
+ Audit и как минимум следующему Step. Dirty checkout, lease/transaction, stale audit, started Task,
327
+ неполный predecessor frontier или повторное использование audit означают hard stop.
328
+
329
+ `task downstream-proof-recover` также не редактирует product files и не создаёт новую Task. Он сохраняет
330
+ dirty worktree/HEAD, append-only фиксирует invalidated predecessor evidence, освобождает C1 и возвращает
331
+ текущую Task к `task plan-set`. Если fresh `next` не рекламирует этот переход, вызывать его нельзя.
332
+
333
+ Если этот переход доступен только после update, не stash/reset product work. Обновите active base в
334
+ отдельном worktree и текущую Task branch двумя отдельными commits только `package.json`/lock, установите
335
+ beta.12.6 и требуйте от fresh `next` `update downstream-proof-dependency-recover`. Read-only preflight
336
+ должен вернуть `eligible=true`, exact `HEAD`/`HEAD^`, Task revision, пустые blockers и content-hash
337
+ binding dirty set. Recover регистрирует только dependency HEAD; следующий fresh `next` должен вернуть
338
+ обычный `task downstream-proof-recover`. Любой иной diff/history/dirty path/lease означает stop.
339
+
340
+ Для beta.12.9 historical-Step blocker обновите base в отдельном worktree и Task branch двумя commits
341
+ только package/lock. После install продолжайте лишь при advertised `update historical-step-dependency-recover`
342
+ и preflight, связавшем HEAD/parent, passed+accepted historical SHA, Plan/Step, dirty hash и отсутствие lease.
343
+ Recover сохраняет product bytes; затем обязательны `status -> next -> task step-complete`. Если package
344
+ уже зарегистрирован, используйте advertised `task historical-step-provenance-preflight/recover`.
345
+
346
+ Для exact beta.12.6 stranded-replan shape сначала нужен eligible read-only source preflight с exact
347
+ revision/HEAD/dirty hash. Затем два beta.12.7 dependency-only commits и advertised dependency/replan
348
+ recoveries. После Knowledge refresh `next` обязан остаться на `task plan-set`; новый единый Step должен
349
+ владеть всем dirty set, а `task run` требует `downstreamProofCarryover.state=validated`.
350
+
351
+ Ошибка Docker socket/CLI `EPERM`, `operation not permitted` или `permission denied` в sandbox не считается
352
+ падением daemon и не расходует retry. Повторите exact read-only probe или Plan check один раз с sandbox
353
+ escalation. Не перезапускайте Docker Desktop и не меняйте image без отдельного разрешения и подтверждённого
354
+ escalated daemon failure.
355
+
356
+ После stop override выполняйте только advertised context/dependency recoveries и каждый раз повторяйте
357
+ `status -> next`; attempt 4 требует `stopOverrideContextRebind.state=validated`. Lost credential
358
+ восстанавливает только advertised exact claimant route. Semantic drift, broken chain, необъяснённый HEAD
359
+ или revision означают stop; продолжение разрешено только когда fresh `next` сам вернул `task run`.
360
+
307
361
  # 12. Milestone final acceptance
308
362
 
309
363
  После merge всех required Tasks Coordinator проверяет clean base HEAD и выполняет рекламируемую
@@ -321,7 +375,7 @@ Task/project DGR. `dependencyBinding` для standalone handoff равен null.
321
375
 
322
376
  # 14. Итоговый checklist пользователя
323
377
 
324
- - beta.12 exact package и новый bundled gateway установлены;
378
+ - beta.12.10 exact package и новый bundled gateway установлены;
325
379
  - новый Coordinator chat не является fork старого Milestone;
326
380
  - bootstrap DGR, если нужен, выдан отдельным exact human confirmation;
327
381
  - Discovery не materialized при blocking unknowns;
@@ -330,5 +384,10 @@ Task/project DGR. `dependencyBinding` для standalone handoff равен null.
330
384
  - Coordinator сам создаёт и supervises Task/Reviewer chats;
331
385
  - credentials не появились в prompts, reports или files;
332
386
  - каждый transition пришёл из fresh `next`;
387
+ - beta.11 stop override, если рекламировался, прошёл отдельные prepare и user-confirmed apply без journal rewrite;
388
+ - downstream predecessor recovery, если рекламировался, сохранил worktree и завершился новым Plan authority;
389
+ - active-proof package bridge, если понадобился, зарегистрировал только exact dependency HEAD перед recovery;
390
+ - stranded-replan bridge, если понадобился, завершился новым Plan и полным Step checks/review, а не только сменой navigation;
391
+ - historical-Step recovery, если рекламировался, сохранил exact accepted commit и довёл текущий Step до обычного `step-complete` без history rewrite;
333
392
  - split-required остановился без replacement mutations;
334
393
  - Milestone validation и final acceptance связаны с текущим clean base HEAD.