codex-workflow-v2 2.0.0-beta.13.1 → 2.0.0-beta.13.11

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 (85) hide show
  1. package/README.md +6 -1
  2. package/dist/reviewer-runtime-build.json +44 -20
  3. package/dist/src/alpha6/failed-step-planning-recovery.d.ts +10 -0
  4. package/dist/src/alpha6/failed-step-planning-recovery.js +93 -0
  5. package/dist/src/alpha6/failed-step-planning-recovery.js.map +1 -0
  6. package/dist/src/alpha6/plan-risk.d.ts +3 -0
  7. package/dist/src/alpha6/plan-risk.js +19 -9
  8. package/dist/src/alpha6/plan-risk.js.map +1 -1
  9. package/dist/src/alpha6/preexecution-replan.d.ts +38 -0
  10. package/dist/src/alpha6/preexecution-replan.js +130 -0
  11. package/dist/src/alpha6/preexecution-replan.js.map +1 -0
  12. package/dist/src/alpha6/remediation.d.ts +4 -2
  13. package/dist/src/alpha6/remediation.js +155 -20
  14. package/dist/src/alpha6/remediation.js.map +1 -1
  15. package/dist/src/alpha6/root-cause-replan-carryover.d.ts +18 -0
  16. package/dist/src/alpha6/root-cause-replan-carryover.js +396 -0
  17. package/dist/src/alpha6/root-cause-replan-carryover.js.map +1 -0
  18. package/dist/src/alpha7/autonomy.d.ts +3 -0
  19. package/dist/src/alpha7/autonomy.js +89 -42
  20. package/dist/src/alpha7/autonomy.js.map +1 -1
  21. package/dist/src/change-explanation.d.ts +64 -0
  22. package/dist/src/change-explanation.js +150 -0
  23. package/dist/src/change-explanation.js.map +1 -0
  24. package/dist/src/cli-actions.d.ts +3 -2
  25. package/dist/src/cli-actions.js +6 -0
  26. package/dist/src/cli-actions.js.map +1 -1
  27. package/dist/src/cli.js +73 -1
  28. package/dist/src/cli.js.map +1 -1
  29. package/dist/src/contracts.d.ts +36 -0
  30. package/dist/src/dependency-provenance.d.ts +3 -2
  31. package/dist/src/dependency-provenance.js +33 -2
  32. package/dist/src/dependency-provenance.js.map +1 -1
  33. package/dist/src/domain/plan-semantics.d.ts +11 -0
  34. package/dist/src/domain/plan-semantics.js +49 -0
  35. package/dist/src/domain/plan-semantics.js.map +1 -0
  36. package/dist/src/gateway-handshake.js +2 -0
  37. package/dist/src/gateway-handshake.js.map +1 -1
  38. package/dist/src/lifecycle/corrective-replan.js +3 -3
  39. package/dist/src/lifecycle/corrective-replan.js.map +1 -1
  40. package/dist/src/observed-routes.js +1 -0
  41. package/dist/src/observed-routes.js.map +1 -1
  42. package/dist/src/pending-review-update.d.ts +49 -0
  43. package/dist/src/pending-review-update.js +132 -0
  44. package/dist/src/pending-review-update.js.map +1 -0
  45. package/dist/src/repository.js +16 -4
  46. package/dist/src/repository.js.map +1 -1
  47. package/dist/src/reviewer.js +4 -1
  48. package/dist/src/reviewer.js.map +1 -1
  49. package/dist/src/state/corrective-replan-public-schema.js +15 -2
  50. package/dist/src/state/corrective-replan-public-schema.js.map +1 -1
  51. package/dist/src/state/corrective-replan-public.js +5 -4
  52. package/dist/src/state/corrective-replan-public.js.map +1 -1
  53. package/dist/src/state/corrective-yield-executor.js +12 -3
  54. package/dist/src/state/corrective-yield-executor.js.map +1 -1
  55. package/dist/src/state/store.d.ts +1 -1
  56. package/dist/src/state/store.js +17 -3
  57. package/dist/src/state/store.js.map +1 -1
  58. package/dist/src/version.d.ts +1 -1
  59. package/dist/src/version.js +1 -1
  60. package/dist/src/version.js.map +1 -1
  61. package/dist/src/workflow.d.ts +84 -1
  62. package/dist/src/workflow.js +1610 -355
  63. package/dist/src/workflow.js.map +1 -1
  64. package/docs/beta13.2-signal-review-recovery.md +38 -0
  65. package/docs/change-model.md +118 -0
  66. package/docs/delegated-approval.md +26 -0
  67. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  68. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  69. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  70. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +1 -1
  71. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +3 -5
  72. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +11 -3
  73. package/docs/pending-review-update.md +15 -0
  74. package/docs/release.md +273 -2
  75. package/docs/updating-existing-project.md +10 -2
  76. package/package.json +2 -1
  77. package/plugins/codex-workflow-gateway/references/chat-dispatch.md +204 -0
  78. package/plugins/codex-workflow-gateway/references/protocol.md +11 -0
  79. package/plugins/codex-workflow-gateway/scripts/chat-dispatch.mjs +298 -0
  80. package/plugins/codex-workflow-gateway/scripts/chat-model-policy.mjs +43 -0
  81. package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +55 -3
  82. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +218 -21
  83. package/schemas/preexecution-replan-event.schema.json +45 -0
  84. package/schemas/task.schema.json +55 -0
  85. package/schemas/transition-payloads.schema.json +16 -1
@@ -0,0 +1,38 @@
1
+ # beta.13.2: pending-review recovery
2
+
3
+ ## Confirmed failure
4
+
5
+ Signal M04 T01 completed the product changes for STEP-002 on beta.13.1, but its
6
+ required independent Step review could not be prepared. The cumulative Task diff
7
+ was 2,236,058 bytes, exceeding the default synchronous Git output buffer. The
8
+ checkout remained clean and the completion commit remained recorded; review had
9
+ not passed.
10
+
11
+ After the writer lease expired, repository navigation preferred delegated
12
+ Knowledge context refresh over the pending review's credential recovery. The
13
+ context-refresh executor correctly rejected the still-in-progress Step. Thus
14
+ navigation advertised an action its executor could not perform. Ordinary package
15
+ update was also blocked by the in-progress Step.
16
+
17
+ ## Required recovery guarantees
18
+
19
+ - Large Step and final Task review inputs are complete or fail explicitly; Git
20
+ errors have bounded diagnostics rather than dumping the input corpus.
21
+ - Pending review and its exact writer credential recovery remain ahead of
22
+ Knowledge refresh. Refresh during a running Step stays forbidden.
23
+ - Installation recovery validates the source version, exact Task/Plan/Step and
24
+ completion commit, clean checkout, recorded Git history, review journal, and
25
+ absence of active ownership or transactions.
26
+ - Dependency transport preserves product bytes and the original reviewed commit.
27
+ Pending review never establishes passed-review provenance.
28
+ - The original required review, delegated context refresh, Task acceptance and
29
+ merge remain mandatory after recovery. Grants are not broadened or renewed.
30
+
31
+ ## Release acceptance
32
+
33
+ The package regression suite must cover oversized review inputs and the combined
34
+ pending-review, expired-lease and stale-Knowledge state, including rejection of
35
+ unsafe recovery candidates. Release validation also requires the ordinary package
36
+ and external-review lifecycle gates. Actual Signal recovery must pass the blocked
37
+ Step review and reach a subsequent executable lifecycle boundary; green fixture
38
+ tests alone do not establish that the production Milestone has resumed.
@@ -0,0 +1,118 @@
1
+ # Execution context and change explanation
2
+
3
+ A change is explained before it is attempted. The explanation is not an approval, a new grant,
4
+ or a replacement lifecycle. Existing Core `next` remains authoritative.
5
+
6
+ ## One execution context
7
+
8
+ App dispatch defaults to a worktree. An explicitly requested `executionMode: "local"` creates
9
+ in the saved project instead. Use local only when the user requested that execution environment.
10
+ The dispatch prompt separates repository identity from the child's actual write destination.
11
+ Correlated App readback records the real checkout root. A second readback cannot silently move
12
+ that bound Worker into another checkout, even when both share a Git common directory.
13
+
14
+ Before the first write and after a branch/cwd change, call the packaged registry action
15
+ `dispatch-context-check --reservation-id ... --file ... --project-id ...` with:
16
+
17
+ ```json
18
+ {
19
+ "observation": { "thread": {
20
+ "id": "actual-bound-thread-uuid", "kind": "codex", "hostId": "local",
21
+ "cwd": "/absolute/actual/worker/checkout"
22
+ } },
23
+ "writeRoot": "/absolute/actual/worker/checkout",
24
+ "expectedBranch": "exact-branch-from-fresh-Task"
25
+ }
26
+ ```
27
+
28
+ Use a fresh App `read_thread` observation, never a fabricated cwd. This read-only check detects
29
+ repository, checkout, write-root and branch mismatch. It does not replace Task revision, actor,
30
+ lease/credential or external permission checks. Do not send another create request, change the
31
+ target directory, or hand off an active writer merely to clear a mismatch. Reconcile the existing
32
+ Worker and Workflow context. Tracked dispatch without recorded executionContext needs a correlated `dispatch-observe` before
33
+ this check can match; it does not invent an existing checkout binding.
34
+
35
+ ## One change card
36
+
37
+ `change explain --task TASK-ID --file proposal.json --repo /actual/checkout --json` reads the
38
+ current Task and `next` from one observation. It changes no workflow state or product file.
39
+
40
+ ```json
41
+ {
42
+ "reason": "The current check requires one additional support file.",
43
+ "paths": ["tools/check-support.ts"],
44
+ "intent": "implementation",
45
+ "expectedRevision": 12,
46
+ "executionContext": {
47
+ "cwd": "/absolute/actual/worker/checkout",
48
+ "writeRoot": "/absolute/actual/worker/checkout",
49
+ "expectedBranch": "exact-task-branch"
50
+ },
51
+ "externalDecision": "unknown"
52
+ }
53
+ ```
54
+
55
+ `paths` are exact normalized relative file paths, not globs. `expectedPlanHash` is also accepted.
56
+ Inputs are closed; an agent cannot add a `supportProven` or `approved` flag. `externalDecision:
57
+ "denied"` preserves an external denial as a separate blocker. It does not call or emulate the
58
+ external permission service. `intent` may instead be `membership` or `semantic-scope`; declaring
59
+ intent never proves semantic safety. Omitted context is reported as not supplied, not verified.
60
+
61
+ The card binds Task revision/Plan, HEAD, request and bytes of proposed plus observed dirty paths.
62
+ Undeclared dirty files are included; escaping symlinks block byte inspection. The output contains
63
+ no confirmation/claim/writer values and no proposed file contents. A proposal hash is a diagnostic
64
+ binding, not an apply token; always refresh `next` and ordinary mutation preconditions.
65
+
66
+ ## Adaptation routes
67
+
68
+ - Implementation fixes continue within the same Task when the current Core route permits it.
69
+ Review count alone does not select corrective planning.
70
+ - `bounded-plan-amendment` appears only when Core advertises the exact eligible check-support
71
+ scope extension and every out-of-Step file is covered by that evidence. Execute the existing
72
+ `task plan-integrity-recover` route and fresh `next`; its existing atomic evidence and authority
73
+ rules apply. The card never edits `allowedWrites`, enlarges a grant, or supplies an arbitrary
74
+ new Plan. This release reuses the proven bounded amendment mechanism rather than adding a
75
+ competing mutation protocol.
76
+ - An unproved additional file requires Plan review. No broad glob or diff-size rule grants
77
+ automatic extension. Runtime changes and component-owner recovery retain their current audits.
78
+ - Corrective planning and downstream recovery retain existing Task/Worker identity and historical
79
+ evidence. A Knowledge context refresh does not resolve a Plan conflict.
80
+ - Membership is distinct from implementation. Existing audited remediation and full-contract
81
+ membership evolution remain the only corresponding machine routes. A reported membership
82
+ intent does not authorize deletion of a required Task or weakened acceptance.
83
+ - Semantic scope requires an explicit user decision. External denial remains independent of
84
+ Workflow grants and file scope.
85
+
86
+ `requiresUser: null` means the card has not established a specific human gate, not that all
87
+ checks passed. The card is advisory and cannot intercept arbitrary editor/tool writes. Gateway
88
+ agents must invoke the context check and fresh Core route before writing. No claim is made that
89
+ an external approval system will accept the resulting operation.
90
+
91
+ For a legacy Worker already bound before dispatch markers existed, the read-only context check
92
+ uses its existing thread/host plus a freshly supplied Task repository root. It explicitly reports
93
+ that historical checkout provenance is unavailable, preserves the legacy registry bytes and
94
+ never creates or adopts another Worker. A tracked Worker whose checkout changes still reports a
95
+ mismatch; no automatic App handoff or silent registry migration is performed.
96
+
97
+ ## Later independent corrective evidence after a fix review
98
+
99
+ A failed guarded Step can reveal a Plan obstruction after its immutable strict review recorded
100
+ `fix` without a Plan conflict. On a clean current Task checkout, after at least two real remediation
101
+ failures and with no decision already bound to the current ordinal, `next` can expose the optional
102
+ `correctiveDecisionOption`. The ordinary fix action remains the default. No failure, repeated run,
103
+ review rewrite or arbitrary scope extension is required to obtain an independent corrective audit.
104
+ The option is absent while a Step runs, a pending handoff exists, or an earlier navigation gate
105
+ blocks ordinary continuation. Existing writer/C1 actor and token requirements still apply; a
106
+ legitimate claimed Worker credential does not disable this independent audit route.
107
+
108
+ Only a genuine independent audit justifies using the existing `task corrective-decision` command.
109
+ Its resulting append-only decision preserves the original review and completed Steps. A decision
110
+ requiring replan leads to the existing corrective yield/prepare/confirmation route, including its
111
+ separate Human gate; the option supplies no replacement authority, grant or permission to write
112
+ additional files. A conflicting existing decision cannot be overwritten.
113
+
114
+ The option's revision, Brief/Plan/HEAD and remediation event hashes describe the observation used
115
+ for the audit. They are not a new apply token or additional executor-enforced hash contract: the
116
+ existing executor checks its revision, current decision ordinal, audit independence and actor/token
117
+ preconditions. Refresh `next` and audit evidence before recording, including after a HEAD change
118
+ that does not change the Task revision. Never treat stale option output as authorization.
@@ -66,6 +66,32 @@ half of an atomic content-only Task context refresh in that Milestone. Standalon
66
66
  approval remains project-scoped. The contract does not add a generic delegation transition:
67
67
  outcome, success signal, acceptance, checks, discovery, and base branch remain immutable.
68
68
 
69
+ ## Full contract during an active Milestone
70
+
71
+ The human may request `milestone autonomy-prepare` / `milestone autonomy-grant` while a
72
+ Milestone is `active`, as well as before its initial execution. This supports first full
73
+ issuance or replacement after expiry/revocation without resetting the Milestone, altering
74
+ its Plan or completed Task evidence, or recreating its Worker. Planning, blocked, validating,
75
+ final-acceptance and terminal Milestones are not eligible for this route.
76
+
77
+ Preparation is read-only. It requires a coherent registered repository, a complete current
78
+ Plan and active Knowledge Map. Its MAC binds the status, revision, Plan, semantic scope,
79
+ principal, delegate, exact expiry (at most 72 hours), policy and previous authority state.
80
+ Show this complete contract and obtain a separate exact human confirmation. Never renew a
81
+ contract automatically or treat general delegated execution as permission to issue authority.
82
+
83
+ A still-valid full contract cannot be replaced. An explicitly revoked or expired contract
84
+ may be replaced using a freshly prepared MAC. The previous confirmed code cannot undo a
85
+ revocation. Exact retries retain the same contract/grant; an interrupted event-first write
86
+ can be completed only with its original matching confirmation. Issuance and milestone grant
87
+ revocation share a Milestone lock. History remains append-only.
88
+
89
+ `next` exposes optional `activeMilestoneAutonomyOptions` even when a linked Task is selected;
90
+ this does not change the immediate Task action or waive its credential/review/recovery gates.
91
+ A coexisting generic grant remains unchanged and does not gain membership evolution or atomic
92
+ context-refresh authority. The new full contract carries those existing bounded capabilities;
93
+ it never grants standalone Project Knowledge approval or a semantic scope change.
94
+
69
95
  ## Starting a delegate chat
70
96
 
71
97
  A grant does not start an agent and is not attached to a Codex chat automatically. Open a new
@@ -463,7 +463,7 @@ Restart Docker Desktop требует отдельного разрешения
463
463
  # 10. Operational checklist
464
464
 
465
465
  - exact package version установлен, bundled gateway соответствует release и переустановлен;
466
- - handshake подтверждает `packageVersion=2.0.0-beta.13.1`, protocol 2, state schema 2 и beta.13
466
+ - handshake подтверждает `packageVersion=2.0.0-beta.13.11`, protocol 2, state schema 2 и beta.13
467
467
  capabilities;
468
468
  - routine observation начинается с компактного `status`; `status --full` запрашивается только для
469
469
  расследования, которому действительно нужна полная historical projection;
@@ -57,7 +57,7 @@ AGENTS.md
57
57
  -> doctor только как дополнительная диагностика
58
58
  ```
59
59
 
60
- Handshake beta.13.1 должен сообщать `packageVersion=2.0.0-beta.13.1`, `protocolVersion=2`,
60
+ Handshake beta.13.11 должен сообщать `packageVersion=2.0.0-beta.13.11`, `protocolVersion=2`,
61
61
  `stateSchemaVersion=2`, dependency DAG, initial Plan transaction, mechanical feasibility,
62
62
  Milestone autonomy, host-safe credential reference, failed-Step continuation transaction,
63
63
  cause-bound rolling refinement, structural production edge, compact status, reviewer runtime preflight,
@@ -168,8 +168,6 @@ base HEAD. Final acceptance выполняй только по exact eligible gr
168
168
  текущему MSA-code; иначе покажи полный requiredHumanGate и остановись.
169
169
  ```
170
170
 
171
- <!-- pagebreak -->
172
-
173
171
  ## 4.1. Что должно получиться до autonomy gate
174
172
 
175
173
  - Discovery без blocking unknowns;
@@ -481,8 +479,8 @@ Task/project DGR. `dependencyBinding` для standalone handoff равен null.
481
479
 
482
480
  # 14. Итоговый checklist пользователя
483
481
 
484
- - beta.13.1 exact package и новый bundled gateway установлены; handshake показывает
485
- `packageVersion=2.0.0-beta.13.1`, protocol/state schema `2/2` и beta.13 capabilities;
482
+ - beta.13.10 exact package и новый bundled gateway установлены; handshake показывает
483
+ `packageVersion=2.0.0-beta.13.11`, protocol/state schema `2/2` и beta.13 capabilities;
486
484
  - новый Coordinator chat не является fork старого Milestone;
487
485
  - bootstrap DGR, если нужен, выдан отдельным exact human confirmation;
488
486
  - Discovery не materialized при blocking unknowns;
@@ -15,7 +15,7 @@ authority сами: mutating permission определяется runtime state
15
15
 
16
16
  | Параметр beta.13 | Значение |
17
17
  |---|---|
18
- | npm package | `codex-workflow-v2@2.0.0-beta.13.1` |
18
+ | npm package | `codex-workflow-v2@2.0.0-beta.13.11` |
19
19
  | protocolVersion | 2 |
20
20
  | stateSchemaVersion | 2 |
21
21
  | lifecycle epoch | 2 |
@@ -333,7 +333,7 @@ local reviewer внутри Codex App sandbox.
333
333
  | Повтор stable reviewer `causeId` с `planConflict=true` | Root-cause replan той же Task обязателен |
334
334
  | Похожий prose, номер попытки или reviewer cause без Plan conflict | Не создаёт replan authority |
335
335
  | Finding `route=fix` или route отсутствует | Продолжить ту же Task/Step независимо от attempt count |
336
- | Finding `route=replan` с exact Plan conflict | `task plan-set`; меняются только implementation Steps |
336
+ | Finding `route=replan` с exact Plan conflict, включая первый провал | Штатный corrective yield/replan; повторный run запрещён, меняются только implementation Steps |
337
337
  | `route=replan` без exact conflict | Невалидный review result, state не меняется |
338
338
  | Explicit `split-required` | Structural replacement stop |
339
339
  | Exact beta.11 attempt-four `stop-escalate` | Append-only Human-confirmed compatibility override |
@@ -669,6 +669,14 @@ beta.12.19 runner выдаёт `compatibilityMode=post-rebind-dirty-carryover`,
669
669
  обычный dependency-only transport, repository-local registration, Knowledge rebind, PRA,
670
670
  authorization, checks, Core commit и sealed review. Human approval не добавляется.
671
671
 
672
+ В beta.13.10 `task context-refresh` различает `authority=execution` и
673
+ `authority=planning-only`. Для начатой Task с failed Step, сохранённым stop-PRA и
674
+ проверенной историей Knowledge-only rebind безопасный content-only refresh обновляет
675
+ Knowledge-привязку и сохраняет отрицательный аудит. Task остаётся
676
+ `awaiting_execution_authorization`: разрешение исполнения не создаётся.
677
+ Далее требуется прежний corrective route, независимый аудит и точный human gate
678
+ замены Plan. Повреждённая история и неподходящий drift не дают этого режима.
679
+
672
680
  # 15. P04-A structural replacement boundary
673
681
 
674
682
  Command shape `task replacement-materialize` retained только для compatibility diagnostics. Любая попытка
@@ -767,7 +775,7 @@ dirty update.
767
775
  observed-route matrix/compact-status/reviewer-runtime tests, legacy compatibility regressions,
768
776
  `npm run test:signal-t10-check-support-e2e`, `npm run test:signal-remediation-e2e`,
769
777
  `npm run pack:check`, `npm run smoke:downstream`, `npm run plugin:check`, official plugin/skill validators,
770
- `npm run docs:pdf:check` и `npm run release:check` с exact `v2.0.0-beta.13.1` tag binding и append-only
778
+ `npm run docs:pdf:check` и `npm run release:check` с exact `v2.0.0-beta.13.11` tag binding и append-only
771
779
  real-agent lifecycle log. Candidate проверяется из clean source checkout; missing built module не должен
772
780
  превращаться в stack trace, а обязан быть детерминированно собран или диагностирован release gate.
773
781
 
@@ -0,0 +1,15 @@
1
+ # Updating while a strict Step review is pending
2
+
3
+ This narrow bridge supports source `codex-workflow-v2@2.0.0-beta.13.1` and the exact executing target package. It preserves the original completion commit, pending review chain, Plan and Knowledge authorization. It does not mark a review passed or bypass the following Knowledge refresh.
4
+
5
+ Use only a verified, exact target package runner with capability `pending-strict-review-dependency-bridge-v1`. The source preflight checks its package/build manifest and runtime file hashes. Never use a mutable version range or a global runner. The target runner exception before installation permits only the read-only source preflight below. Use the installed source runner for an explicitly returned stale lease repair.
6
+
7
+ 1. Run the external target runner: `update pending-review-source-preflight --repo <repo> --id <Task> --json`. Save the complete JSON response outside the repository. If `staleLeaseRepair` names exactly this Task, use the **installed source** `locks repair --id <Task>` and rerun source preflight. The lock manager rechecks expiry; a live or unrelated lease is not repairable through this bridge. Do not transport until the fresh result has `eligible=true` and no blockers.
8
+ 2. Retain the exact source receipt. Create one dependency transport commit on its `baseBranch` at `baseHead`, using a separate temporary worktree. Create one on `taskBranch` at `completionCommit`. Each commit must have one parent, change exactly `package.json` and `package-lock.json`, and change only the exact Workflow dependency entries from source to target. Preserve all product-owned manifest/lock fields independently on each branch. Do not merge, amend, reset, rebase, copy the base manifest over Task changes, or transport product work.
9
+ 3. Install the exact target package in the Task repository. Use its repository-local runner for all remaining commands. Run `status`, then `next`; it must advertise `update pending-review-dependency-recover`. Run `update pending-review-dependency-preflight --id <Task> --file <source-receipt.json>`. Require `eligible=true` and no blockers.
10
+ 4. Run `update pending-review-dependency-recover --id <Task> --expected-revision <source-task-revision> --file <source-receipt.json> --actor <coordinator> --reason <substantive-reason>`. Both plain preflight results and CLI `{ok:true,value:...}` receipts are accepted. The receipt is not authority: recovery reconstructs every source binding from canonical Task, artifacts, strict-review sidecars and Git parent commits. It checks clean checkout, all target version surfaces, exact base transport, and absence of any writer lease or pending transaction/Core operation again.
11
+ 5. Recovery atomically registers the Task dependency commit in existing dependency provenance and writes the hash-chained `pending-review-updates.jsonl` sidecar. Task schema 2 is unchanged. It increments the Task revision but preserves the original pending event, product completion SHA and Step evidence. Repeating recovery is rejected rather than creating duplicate authority.
12
+ 6. Run `status`, then `next`. Recover the exact advertised C1 writer credential if necessary. Generate a fresh `task step-review-packet`; use an independent external sealed reviewer and record the unchanged result with `task step-review-record`. The packet binds the original product commit and includes revalidated transport evidence; its repository seal binds the current dependency HEAD. Any later HEAD, base, Plan, evidence, packet, or seal change fails closed. Local nested review retains its original HEAD guard.
13
+ 7. Follow fresh `status` and `next` after review. Under the original eligible Milestone Autonomy Grant, execute the advertised `task context-refresh` for predeclared supporting-source additions and dependency manifest drift. Then continue to the next normal Step or final Task boundary. Do not substitute standalone approval or manually edit state.
14
+
15
+ A failed preflight is a stop for this bridge. Repair only a specifically documented obstruction, then rerun the read-only assessment; never edit the receipt to hide a blocker. A pending or corrupt transaction must be recovered through its ordinary exact route before retrying.
package/docs/release.md CHANGED
@@ -1,9 +1,280 @@
1
1
  # Release Policy
2
2
 
3
+ ## beta.13.11: preserve production edges through corrective Plan admission
4
+
5
+ The closed public corrective Plan schema now admits the existing optional
6
+ `productionEdges` and `requiresProductionEdges` fields. A valid production Plan
7
+ previously passed domain validation but failed public preparation as an unknown
8
+ property. The fix retains the closed edge structure, domain checks, immutable
9
+ candidate binding, and separate human confirmation. It does not widen Task scope
10
+ or authorize execution.
11
+
12
+ Release evidence must include public prepare/confirm/execute with nonempty
13
+ production edges, exact persisted-field preservation, invalid/unknown-field
14
+ rejection, and rejection of candidate changes after preparation. Schema parity
15
+ coverage must catch future additions to the canonical Plan input contract.
16
+
17
+
3
18
  The npm package is `codex-workflow-v2` with public visibility. Consumers must pin
4
19
  an exact version. Stable compatibility covers the latest minor release of the current
5
20
  major only; older minors are unsupported unless a release note explicitly says otherwise.
6
21
 
22
+ ## beta.13.10: planning-only context refresh
23
+
24
+ A dependency update can stale Knowledge while a started Task retains a failed Step
25
+ and a stop-escalate Plan Risk Audit. Navigation and execution now share the verified
26
+ planning-recovery predicate. Safe content-only refresh returns `authority: planning-only`,
27
+ rebinds Knowledge, preserves the stopped audit and completed evidence, and leaves the
28
+ Task awaiting execution authorization. It never authorizes the stopped Plan.
29
+ The ordinary corrective decision, original Worker recovery, independent replacement
30
+ audit and exact human corrective-replan gate remain required.
31
+
32
+ The regression follows actual dependency transport and provenance recovery through
33
+ Core-generated navigation and the refresh executor to the corrective human gate.
34
+ Tampered history, stale revision, missing grant and write failure are rejected without
35
+ partial Task/Knowledge/Plan/audit updates. Unsupported stopped Tasks are not offered
36
+ an executable context refresh.
37
+
38
+ ## Prospective disposable-fixture bootstrap
39
+
40
+ For candidates after beta.13.9, release tests may initialize a disposable synthetic
41
+ fixture without requesting a live user's Knowledge approval for each candidate.
42
+ This does not change the completed beta.13.9 gate or reinterpret its evidence.
43
+ Production projects, including Signal, retain their existing human/delegation gates.
44
+
45
+ Run the repository-only `scripts/bootstrap-disposable-release-fixture.mjs` with
46
+ `--candidate <absolute tarball> --sha256 <exact SHA256> --version <exact version>`.
47
+ Use `--preflight` first. The tool accepts no repository, state-root or template
48
+ override: it creates fresh owned temporary roots, installs the verified candidate
49
+ with lifecycle scripts disabled, and initializes a fixed fixture with an immutable README and a mutable smoke.txt marker. It uses
50
+ the installed candidate's Core and explicit isolated state, following the existing
51
+ test-helper bootstrap pattern. No production credentials or grants are imported.
52
+ The same synthetic owner initializes a 24-hour fixture-project grant only for
53
+ `agent:disposable-release-worker`, limited to Task execution authorization and final
54
+ acceptance. Its confirmation is simulated and labelled accordingly. It grants no
55
+ Knowledge refresh, scope expansion or production access. Expiry requires a new
56
+ disposable run, not silent renewal. The fixed scenario must not modify Knowledge.
57
+
58
+ The receipt explicitly labels Knowledge consent as **simulated**. Core's stored
59
+ `authorizationMode: human` is test setup here, not evidence of an actual human
60
+ approval. Neither that state nor its receipt may be imported into a production
61
+ project or presented as production authorization. Candidate, template, repository
62
+ and state identities must accompany every downstream evidence record.
63
+
64
+ Synthetic lifecycle tests prove contract behavior, including approval rejection
65
+ and credential recovery. They do not prove the actual App writer/reviewer boundary.
66
+ The separate actual App gate remains required on the exact candidate: a live Worker
67
+ changes the fixed smoke.txt line `Release smoke: pending.` to `Release smoke: complete.`,
68
+ runs its declared check, and a separate App reviewer consumes a bound external-sealed
69
+ Step or Task packet, as advertised by Core. The minimum App smoke ends after the Worker records that review through
70
+ fresh `next` and obtains successful `status` then `next`; no additional human terminal
71
+ acceptance is imposed by this smoke. No new fixture product feature is required per release.
72
+ The App report must disclose the synthetic bootstrap and claim only the App behavior
73
+ actually observed; it must not claim real user consent. Prior failed attempts,
74
+ exact-candidate binding and the ordinary transcript validator remain mandatory.
75
+ This is a test evidence policy, not a runtime approval bypass or an expanded grant.
76
+
77
+ ## beta.13.9: failed-Step planning recovery after Knowledge rebind
78
+
79
+ A started Task can retain completed Steps and a failed guarded Step while a Knowledge
80
+ rebind supersedes its execution authorization. A truthful blocking Plan Risk Audit must
81
+ not require a false approval to reach corrective planning. This recovery uses the current
82
+ blocking audit as planning evidence and proves its unchanged safety baseline through
83
+ hash-checked Knowledge-only Plan history and the historical superseded authorization.
84
+ It never treats either record as current execution authority.
85
+
86
+ Fresh navigation can then advertise the existing independent corrective-decision route.
87
+ The ordinary corrective yield, independent replacement validation and risk audit, exact
88
+ human corrective-replan confirmation, and fresh execution authorization remain mandatory.
89
+ An ordinary `plan-set` cannot bypass that chain. `continue-fix` is not a valid decision
90
+ for this stopped planning posture; ordinary execution repair retains its existing choices.
91
+ The additive upstream-remediation route remains limited to genuinely unstarted Tasks.
92
+
93
+ Release evidence must exercise the complete callable recovery chain, including original
94
+ Worker credential replacement and yield, repeated Knowledge rebind, unchanged completed
95
+ Step and failed review evidence, and rejection of damaged Plan/audit/authorization history.
96
+
97
+ The exact beta.13.9 runner retains the consumed-carryover compatibility profile from
98
+ beta.13.6 with beta.13.9 as its pinned target. The source, ownership, lease, candidate
99
+ Plan, provenance and transaction checks are unchanged. Historical beta.13.7 and
100
+ beta.13.8 transcripts remain bound to their original targets.
101
+
102
+ ## beta.13.8: explain changes and continue active Milestones
103
+
104
+ Full autonomy can be issued during an active Milestone using an exact new human-confirmed
105
+ contract. Interrupted event-first issuance remains recoverable after expiry or revision change:
106
+ a fresh confirmation may supersede an inert missing grant, preserving its event and creating a
107
+ new grant identity. Known unpublished grant directories carry no authority; malformed state and
108
+ unknown incomplete delegations still fail closed.
109
+
110
+ The read-only `change explain` command separates execution context, external approval, semantic
111
+ scope, bounded check-support amendment, Plan correction, membership and context refresh. It
112
+ preserves the current Core route, including credential prerequisites and effective Step scope.
113
+ Its proposal hash is diagnostic evidence, not permission to apply a patch.
114
+
115
+ Chat dispatch records the observed child checkout and offers an advisory context check before
116
+ writes. Existing Workers are preserved; a parent repository path does not authorize writing
117
+ outside the actual child checkout. Model and reasoning selection remain task-specific.
118
+
119
+ The exact beta.13.8 runner retains the tested beta.13.6 consumed-carryover source
120
+ recovery profile with beta.13.8 as its pinned target. It does not admit a beta.13.7
121
+ source or a running Step; historical beta.13.7 transcript evidence remains separately
122
+ valid for its original target.
123
+
124
+ All ordinary release gates below apply to the exact versioned candidate. Historical failed
125
+ real-agent runs remain failed evidence; prior one-time release exceptions are not reused.
126
+ Signal deployment additionally requires a fresh safe update boundary, exact installed provenance
127
+ and verified continuation by the original Worker. This release does not waive external approval
128
+ or claim to prevent every future product failure.
129
+
130
+ ## Active Milestone autonomy contract issuance
131
+
132
+ The candidate extends full human-confirmed autonomy to an already active Milestone.
133
+ Release evidence must cover both initial active issuance and replacement after revocation
134
+ or expiry, without resetting Task state, changing membership/semantic scope, or replacing
135
+ an existing Worker. A generic delegation is neither upgraded nor revoked implicitly.
136
+
137
+ The MAC includes the previous contract/grant snapshot so a revoked confirmation cannot
138
+ restore authority. Exact successful and interrupted-write retries must preserve identity;
139
+ legacy event-first records retain their bounded pre-execution recovery. Shared Milestone
140
+ exclusion protects issuance, revocation and scope/status transitions.
141
+
142
+ Acceptance must continue through same-Worker execution and guarded atomic context refresh
143
+ using the new full contract, with the old grant rejected without Task/Knowledge mutations.
144
+ Include read-only preparation, stale bindings, valid-contract replacement refusal, malformed
145
+ actors/expiry, unavailable Knowledge and disallowed Milestone states. Optional Task-first
146
+ navigation must not replace the current execution/recovery action. Run the full test suite,
147
+ release checks, downstream package smoke and plugin validation on the final candidate.
148
+
149
+ ## beta.13.7 candidate: retire completed carryover authority
150
+
151
+ After a recovered Step passed review, its recorded dirty-work permission still
152
+ overrode the next Step's route. A later repeated mechanical failure therefore
153
+ returned `doctor` instead of ordinary Plan replacement. The completed record is
154
+ now retained as history and consumed only after its completion evidence, exact
155
+ PRA, required strict review and Git history are verified. Active or damaged
156
+ bindings continue to fail closed. A corrective claim must belong to the same
157
+ Worker who performed the terminal corrective yield.
158
+
159
+ The exact published beta.13.7 read-only compatibility preflight can guide a
160
+ stranded beta.13.6 source through its existing Plan replacement and original-Worker
161
+ handoff commands before transport. It does not mutate state, authorize execution,
162
+ or waive approval gates. Task and base transport must preserve all product bytes
163
+ and change only the exact Workflow dependency. See the packaged gateway skill for
164
+ the stage-specific bindings and mandatory source status/next readbacks.
165
+
166
+ Release evidence must include the published beta.13.6 runtime reproducing the
167
+ later-Step blocker, source Plan/PRA/authorization/handoff recovery, dependency
168
+ transport, target provenance/context refresh, same-Worker execution and strict
169
+ review. A route that reaches only `plan-set` is not sufficient. Prior one-time
170
+ release-gate exceptions do not authorize this candidate.
171
+
172
+ The trusted lifecycle harness must record each compatibility invocation and its
173
+ terminal observation. For source `task plan-set`, record `inputBinding` computed
174
+ from the actual files passed to that command: `candidatePlanHash` is the rendered
175
+ Plan hash, and `candidateInputHash`/`riskAuditInputHash` are SHA-256 of recursively
176
+ key-sorted canonical JSON inputs. Do not copy these values from an approval receipt
177
+ without checking the executed inputs. The validator checks this binding, the resulting
178
+ Plan hash, original-Worker ownership, ordered source status/next checkpoints, live-lease
179
+ waiting, exact stale repair, and a fresh preflight before transport.
180
+
181
+ ## beta.13.6 candidate: preserve work across root-cause replan
182
+
183
+ A repeated mechanical failure can legitimately yield the same Task to a replacement
184
+ Plan while preserving uncommitted implementation. beta.13.5 authorizes that Plan but
185
+ then rejects its planned Step because the checkout is dirty. Reaching planning or
186
+ reauthorization therefore does not prove recovery.
187
+
188
+ Acceptance for this candidate must exercise the complete repeated mechanical failure,
189
+ automatic C1 yield, semantic replacement Plan, independent PRA, authorization, and
190
+ same-Worker execution sequence with the original dirty bytes. The carryover assessment
191
+ must bind the source remediation cycle, verified historical and current Plans, current
192
+ PRA and authorization, completed evidence, HEAD, file set and content hash. Every carried
193
+ path must already belong to the replacement Step and remain outside forbidden scope;
194
+ carryover never expands scope or forgives unrelated work.
195
+
196
+ Navigation and execution must use the same assessment. Changed bytes, paths, HEAD,
197
+ Plan artifacts, audit/authorization evidence or ambiguous source history must fail
198
+ closed before execution. Tests must continue beyond successful start through checks,
199
+ Core commit and strict review, and reject each material binding mismatch.
200
+
201
+ The stranded-source update must additionally prove a read-only compatibility preflight,
202
+ no writer lease or pending Core operation, exact coherent source/target versions,
203
+ dependency-only Task and Milestone-base commits, registration of the Task dependency
204
+ commit after verification of the base transport, and unchanged product bytes. It must preserve the original Task and Worker and must not
205
+ rely on manual product commits, stash/reset, installed-code edits or state-file edits.
206
+
207
+ All ordinary release gates below apply. The user's one-time beta.13.5 CI-based release
208
+ exception is consumed and is not evidence or an exception for this candidate.
209
+
210
+ ## beta.13.5 preventive Plan correction before execution
211
+
212
+ A newly discovered implementation Plan defect can require changing unfinished scope
213
+ before its next Step runs. The preventive route withdraws the current execution
214
+ authorization under an independent blocking Plan Risk Audit, then requires a corrected
215
+ Plan, fresh independent audit and ordinary execution authorization. It must preserve
216
+ the same Task, completed Step definitions and evidence, requirements, acceptance,
217
+ review history and grants. It must not manufacture a failed run to unlock planning.
218
+
219
+ Initial eligibility is deliberately limited to a coherent, clean, idle `ready` Task
220
+ with no C1 ownership or writer lease. Stale bindings, existing ownership, incomplete
221
+ review, unexpected Git history and damaged state must fail closed. Regression gates
222
+ must prove authority withdrawal and actual same-Task continuation, plus rejection of
223
+ attempts to change the objective, discard completed evidence or weaken guarded scope.
224
+
225
+ Replacement Plan publication commits Task state, the current and immutable Plan artifacts,
226
+ and its independent audit atomically. Pending correction blocks C1 handoff and dependency
227
+ transport until the corrected Plan can be authorized. Proof bindings retain each Step,
228
+ failure mode and evidence association; revised proof prose requires an independent audit
229
+ with an explicit rationale. Core does not determine whether natural-language proof claims
230
+ are semantically stronger.
231
+
232
+ External sealed-review CLI help specifies the complete envelope, including its nested
233
+ review. Lifecycle validation admits one bounded expired-credential recovery between a
234
+ review-input syntax refusal and retry, with unchanged sealed evidence and fresh sequential
235
+ status/next bindings; unrelated or unbound mutations remain invalid.
236
+
237
+ ## beta.13.4 candidate: continuation after accepted corrective Plan
238
+
239
+ This correction is included in beta.13.5; beta.13.4 was not published separately.
240
+
241
+ The beta.13.3 first-conflict recovery stopped too early: after a replacement Plan
242
+ was accepted and authorized, navigation still applied the old Plan's conflict to
243
+ the now-planned Step. Release acceptance for this correction must exercise the
244
+ complete same-Task sequence through fresh Plan Risk Audit, execution authorization,
245
+ the existing Worker claim, actual Step execution, and another failed review.
246
+ Reaching `task plan-set` alone is not sufficient evidence.
247
+
248
+ An accepted semantic replacement must be distinguished from a Knowledge-only
249
+ rebind using verified Plan artifacts and audit/review bindings. Historical failures
250
+ and their global ordinals remain append-only. A missing or damaged artifact must
251
+ not silently acknowledge a conflict, and a context refresh must not reopen execution.
252
+
253
+ ## beta.13.3 explicit Plan conflict recovery
254
+
255
+ A first independently recorded reviewer `route=replan` with a validated Plan conflict
256
+ blocks current execution immediately and exposes corrective replan. Historical
257
+ rolling-cause classification remains unchanged; valid older histories are not
258
+ reclassified as corrupt. Ordinary new fix findings still continue in the same Task.
259
+ The failure transaction yields C1 and releases the exact writer lease. An older
260
+ failed Task with a retained C1 claim follows credential recovery and
261
+ `task corrective-yield` before planning; it cannot run or change its Plan while
262
+ the claim remains. Recovery binds the validated remediation event and preserves
263
+ the Task, review evidence, and existing worker identity.
264
+ The release also includes durable App dispatch and explicit role/phase model selection;
265
+ see the packaged `references/chat-dispatch.md`.
266
+
267
+ ## beta.13.2 review recovery gate
268
+
269
+ The patch preserves protocol 2 and canonical entity schema 2. In addition to the
270
+ ordinary release gates, `release:check` executes the large-diff, pending-review
271
+ update, supporting-source refresh and Task guard regressions. Acceptance requires
272
+ complete external-sealed Step and Task packets above 2 MiB, explicit bounded
273
+ failure above the Git output limit, exact credential recovery before Knowledge
274
+ refresh, and a Signal-shaped delegated update followed by actual review,
275
+ context refresh and the next ordinary Step. A source preflight alone is not
276
+ recovery completion. See `beta13.2-signal-review-recovery.md`.
277
+
7
278
  ## Release gate
8
279
 
9
280
  Before tagging a release:
@@ -52,8 +323,8 @@ surface and fails unless all of these release contracts remain present:
52
323
  adds C1 yield before root-cause replan; the Signal-shaped E2E continues through recovery, the next
53
324
  ordinary Step, Task completion, and next-Task dispatch;
54
325
  - five distinct or unclassified review findings continue in the same Task without a numeric cap,
55
- while root-cause replan requires either a repeated normalized mechanical failure or the same
56
- stable external reviewer `causeId` with `planConflict=true`;
326
+ while repeated normalized mechanical failures still require root-cause replan; a current
327
+ explicit external reviewer Plan conflict requires replan immediately, without a synthetic retry;
57
328
  - a transitive same-component check owner may refine the same Task only under the unchanged semantic
58
329
  boundary; for a multi-Step `runtime-composition` consumer the independent PRA classification,
59
330
  not a planner opt-in, requires an edge from a transitive owner to an exact executable consumer
@@ -636,8 +636,16 @@ title в registry readback и применяйте только возвращё
636
636
  быть уникален и содержать exact `#NNN`, membership ordinal и ID. Input должен состоять из
637
637
  TaskContextPacket; допустима только добавленная Codex App служебная `codex_delegation`-обёртка с
638
638
  `source_thread_id`, но не parent turns или transcript. Если title отсутствует или нормализован
639
- неверно, переименуйте и перепроверьте. Ошибка `create_thread` допускает один
640
- последовательный retry после проверки списка, но не разрешает fallback на `fork_thread`.
639
+ неверно, переименуйте и перепроверьте. Pending `clientThreadId`, тайм-аут или отсутствие в
640
+ `list_threads` не доказывают, что создание не состоялось, и не разрешают повторный `create_thread`.
641
+ До первого вызова сохраните `dispatch-begin`; после него используйте `dispatch-result/status`,
642
+ поиск коррелированного сеанса и `dispatch-observe` с фактическим `read_thread`. На одну
643
+ резервацию выдаётся только одно разрешение создания. Не обходите его новой резервацией или fork.
644
+ Полный контракт восстановления, сохранения supervisor/cursor и явного выбора `model`/`thinking`
645
+ по роли, фазе и сложности находится в
646
+ `plugins/codex-workflow-gateway/references/chat-dispatch.md`. Выбор модели требует соответствующего
647
+ поручения пользователя и актуального списка поддерживаемых пар на целевом host; нельзя молча
648
+ наследовать дорогую конфигурацию координатора или снижать уровень независимого аудита.
641
649
  Создавайте или переиспользуйте Task-чат непосредственно перед dispatch этой Task, а не как пустой
642
650
  placeholder для всего membership; `T<NN>` берите только из утверждённого membership order.
643
651
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.13.1",
3
+ "version": "2.0.0-beta.13.11",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -68,6 +68,7 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/node": "24.10.1",
71
+ "codex-workflow-source-beta136": "npm:codex-workflow-v2@2.0.0-beta.13.6",
71
72
  "typescript": "5.9.3"
72
73
  },
73
74
  "license": "MIT"