codex-workflow-v2 2.0.0-beta.12.8 → 2.0.0-beta.13

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 (124) hide show
  1. package/README.md +60 -16
  2. package/dist/reviewer-runtime-build.json +1092 -0
  3. package/dist/src/alpha6/check-support-anchor.d.ts +24 -0
  4. package/dist/src/alpha6/check-support-anchor.js +102 -0
  5. package/dist/src/alpha6/check-support-anchor.js.map +1 -0
  6. package/dist/src/alpha6/component-owner.d.ts +28 -0
  7. package/dist/src/alpha6/component-owner.js +95 -0
  8. package/dist/src/alpha6/component-owner.js.map +1 -0
  9. package/dist/src/alpha6/downstream-proof.js +4 -2
  10. package/dist/src/alpha6/downstream-proof.js.map +1 -1
  11. package/dist/src/alpha6/mechanical-feasibility.js +42 -12
  12. package/dist/src/alpha6/mechanical-feasibility.js.map +1 -1
  13. package/dist/src/alpha6/milestone.d.ts +6 -2
  14. package/dist/src/alpha6/milestone.js +164 -10
  15. package/dist/src/alpha6/milestone.js.map +1 -1
  16. package/dist/src/alpha6/npm-check-contract.d.ts +11 -0
  17. package/dist/src/alpha6/npm-check-contract.js +36 -0
  18. package/dist/src/alpha6/npm-check-contract.js.map +1 -0
  19. package/dist/src/alpha6/plan-integrity.js +157 -27
  20. package/dist/src/alpha6/plan-integrity.js.map +1 -1
  21. package/dist/src/alpha6/plan-risk.js +3 -1
  22. package/dist/src/alpha6/plan-risk.js.map +1 -1
  23. package/dist/src/alpha6/remediation-cause.d.ts +13 -0
  24. package/dist/src/alpha6/remediation-cause.js +77 -0
  25. package/dist/src/alpha6/remediation-cause.js.map +1 -0
  26. package/dist/src/alpha6/remediation.d.ts +15 -4
  27. package/dist/src/alpha6/remediation.js +430 -67
  28. package/dist/src/alpha6/remediation.js.map +1 -1
  29. package/dist/src/alpha6/review.d.ts +6 -0
  30. package/dist/src/alpha6/review.js +46 -4
  31. package/dist/src/alpha6/review.js.map +1 -1
  32. package/dist/src/artifacts.js +6 -0
  33. package/dist/src/artifacts.js.map +1 -1
  34. package/dist/src/cli-actions.d.ts +25 -0
  35. package/dist/src/cli-actions.js +109 -0
  36. package/dist/src/cli-actions.js.map +1 -0
  37. package/dist/src/cli.js +244 -253
  38. package/dist/src/cli.js.map +1 -1
  39. package/dist/src/contracts.d.ts +202 -5
  40. package/dist/src/credential-transport.d.ts +38 -0
  41. package/dist/src/credential-transport.js +156 -0
  42. package/dist/src/credential-transport.js.map +1 -0
  43. package/dist/src/dependency-provenance.d.ts +23 -2
  44. package/dist/src/dependency-provenance.js +239 -36
  45. package/dist/src/dependency-provenance.js.map +1 -1
  46. package/dist/src/domain/completed-step-carryover.d.ts +13 -0
  47. package/dist/src/domain/completed-step-carryover.js +71 -0
  48. package/dist/src/domain/completed-step-carryover.js.map +1 -0
  49. package/dist/src/domain/validation.d.ts +9 -1
  50. package/dist/src/domain/validation.js +86 -0
  51. package/dist/src/domain/validation.js.map +1 -1
  52. package/dist/src/gateway-handshake.d.ts +11 -0
  53. package/dist/src/gateway-handshake.js +92 -0
  54. package/dist/src/gateway-handshake.js.map +1 -0
  55. package/dist/src/git.js +1 -0
  56. package/dist/src/git.js.map +1 -1
  57. package/dist/src/historical-step-provenance.d.ts +20 -0
  58. package/dist/src/historical-step-provenance.js +111 -0
  59. package/dist/src/historical-step-provenance.js.map +1 -0
  60. package/dist/src/index.d.ts +2 -0
  61. package/dist/src/index.js +2 -0
  62. package/dist/src/index.js.map +1 -1
  63. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +5 -0
  64. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +9 -0
  65. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -1
  66. package/dist/src/lifecycle/corrective-replan.js +1 -1
  67. package/dist/src/lifecycle/corrective-replan.js.map +1 -1
  68. package/dist/src/lifecycle/semantic-registry.js +1 -1
  69. package/dist/src/observation.js +1 -2
  70. package/dist/src/observation.js.map +1 -1
  71. package/dist/src/observed-routes.d.ts +114 -0
  72. package/dist/src/observed-routes.js +545 -0
  73. package/dist/src/observed-routes.js.map +1 -0
  74. package/dist/src/operational-contract.d.ts +26 -0
  75. package/dist/src/operational-contract.js +94 -0
  76. package/dist/src/operational-contract.js.map +1 -0
  77. package/dist/src/reviewer.d.ts +218 -8
  78. package/dist/src/reviewer.js +927 -25
  79. package/dist/src/reviewer.js.map +1 -1
  80. package/dist/src/state/corrective-replan-executor.js +23 -15
  81. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  82. package/dist/src/state/corrective-replan-public.js +35 -10
  83. package/dist/src/state/corrective-replan-public.js.map +1 -1
  84. package/dist/src/state/corrective-replan-transaction.js +12 -4
  85. package/dist/src/state/corrective-replan-transaction.js.map +1 -1
  86. package/dist/src/state/corrective-yield-transaction.js +11 -2
  87. package/dist/src/state/corrective-yield-transaction.js.map +1 -1
  88. package/dist/src/state/lock.d.ts +1 -0
  89. package/dist/src/state/lock.js +24 -0
  90. package/dist/src/state/lock.js.map +1 -1
  91. package/dist/src/version.d.ts +1 -1
  92. package/dist/src/version.js +1 -1
  93. package/dist/src/version.js.map +1 -1
  94. package/dist/src/workflow.d.ts +70 -4
  95. package/dist/src/workflow.js +1888 -152
  96. package/dist/src/workflow.js.map +1 -1
  97. package/docs/autonomy-guardrails.md +41 -14
  98. package/docs/delegated-approval.md +6 -1
  99. package/docs/development-flow.md +42 -12
  100. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  101. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  102. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  103. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +191 -22
  104. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +163 -45
  105. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +346 -52
  106. package/docs/problem-briefs/01-pre-implementation-integrity.md +11 -7
  107. package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +13 -6
  108. package/docs/problem-briefs/README.md +11 -11
  109. package/docs/release.md +89 -9
  110. package/docs/updating-existing-project.md +235 -0
  111. package/docs/validation-report.md +156 -98
  112. package/package.json +12 -3
  113. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
  114. package/plugins/codex-workflow-gateway/references/protocol.md +9 -0
  115. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +67 -1
  116. package/schemas/authorization-event.schema.json +10 -3
  117. package/schemas/corrective-decision-event.schema.json +164 -9
  118. package/schemas/corrective-replan-credentials.private.schema.json +4 -2
  119. package/schemas/milestone-scope-change-event.schema.json +25 -1
  120. package/schemas/remediation-event.schema.json +17 -1
  121. package/schemas/review-result.schema.json +1 -0
  122. package/schemas/step-review-event.schema.json +15 -0
  123. package/schemas/task.schema.json +104 -1
  124. package/schemas/transition-definition.schema.json +8 -0
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  brief_id: WF2-P04
3
3
  problem: "Milestone Task execution is not guarded by explicit canonical dependencies"
4
- status: approved
4
+ status: implemented
5
5
  owner: null
6
6
  created_at: 2026-08-23
7
7
  approved_at: 2026-08-24
8
- implemented_at: null
9
- revision: 5
8
+ implemented_at: 2026-08-24
9
+ revision: 6
10
10
  ---
11
11
 
12
12
  # Brief — P04-A Task Dependency Integrity
@@ -15,7 +15,7 @@ revision: 5
15
15
 
16
16
  The normal Task dependency gap is **confirmed**.
17
17
 
18
- Current Milestone membership represents:
18
+ At the confirmed pre-P04-A baseline, Milestone membership represented:
19
19
 
20
20
  ```text
21
21
  taskId
@@ -27,11 +27,11 @@ It has no canonical Task dependency edges. `startTask` checks that the Milestone
27
27
  Task membership is required, but it does not check predecessor completion. Consequently, user or
28
28
  Coordinator intent such as “Required Tasks execute sequentially” is not enforced by Core.
29
29
 
30
- Current beta replacement already atomically updates Discovery, old Task, one replacement Task,
30
+ The pre-P04-A beta replacement already atomically updated Discovery, old Task, one replacement Task,
31
31
  Milestone plan/state, Knowledge Map when eligible, and writer-lock state. It is a 1→1 operation and
32
32
  does not preserve completed Steps or rewire downstream Tasks.
33
33
 
34
- This brief implements **P04-A only**:
34
+ The released implementation covers **P04-A only**:
35
35
 
36
36
  ```text
37
37
  canonical Task dependencies
@@ -44,6 +44,9 @@ It does not implement structural replacement. Until separate replacement authori
44
44
  current 1→1 route always fails closed; even an empty historical edge set cannot authorize the new
45
45
  Task boundary or topology.
46
46
 
47
+ P04-A was released in exact `v2.0.0-beta.11` at commit `44e6734` and retained through the beta.12
48
+ line. P04-B/P05 remains deferred and is not made implemented by this status change.
49
+
47
50
  Old active-M3 recovery, historical replacement IDs, and old T07/T08/T09/T10 topology are excluded
48
51
  from mandatory materialization evidence. The implementation is validated from a clean pre-Milestone
49
52
  repository and fresh Discovery.
@@ -564,3 +567,7 @@ P04-A may move from `approved` to `implemented` only when:
564
567
  - 2026-08-24 — The exact final combined P04-A/P01-A suite passed 319/319. The packaged handshake now
565
568
  advertises dependency DAG, atomic initial Plan, and structural-replacement-disabled capabilities
566
569
  instead of the unavailable legacy replacement capability. Status remains `approved`.
570
+ - 2026-08-24 — Revision 6 records implementation acceptance. The combined P04-A/P01-A candidate
571
+ shipped as exact `v2.0.0-beta.11` at commit `44e6734` after the declared focused, transaction,
572
+ replay, and full-suite gates passed, and was retained in the beta.12 line. Status moved from
573
+ `approved` to `implemented`. P04-B/P05 structural replacement remains deferred.
@@ -24,10 +24,10 @@ A regression or disproven assumption should not silently move a brief backward.
24
24
 
25
25
  | # | Problem | File | Status |
26
26
  |---|---|---|---|
27
- | 01 | Механически невыполнимый Task Plan может получить execution authorization | `01-pre-implementation-integrity.md` | approved |
27
+ | 01 | Механически невыполнимый Task Plan может получить execution authorization | `01-pre-implementation-integrity.md` | implemented |
28
28
  | 02 | STEP не является полезным инкрементом | `02-minimal-step-integrity.md` | hypothesis |
29
29
  | 03 | Разный контекст агентов и слишком позднее обнаружение проблем | `03-minimal-agent-context-integrity.md` | hypothesis |
30
- | 04 | Milestone Task execution не защищён явными зависимостями | `04-task-dependency-and-structural-replacement-integrity.md` | approved |
30
+ | 04 | Milestone Task execution не защищён явными зависимостями | `04-task-dependency-and-structural-replacement-integrity.md` | implemented |
31
31
  | 05 | TBD | — | — |
32
32
  | 06 | TBD | — | — |
33
33
  | 07 | TBD | — | — |
@@ -85,21 +85,21 @@ This is an implementation-order recommendation, not a status change or approval
85
85
 
86
86
  | Brief | Decision | Reason and gate |
87
87
  |---|---|---|
88
- | P04-A | **GO to review/merge candidate green** | Revision 5 passed its 306/306 checkpoint and the final combined P04-A/P01-A 319/319 suite on `codex/p04-task-dependencies`. Keep status `approved` until the candidate is merged/installed and accepted. |
89
- | P01-A | **GO to review/merge candidate green** | Revision 5 implements the approved bounded evaluator after P04-A; typecheck, plugin/schema/release validation, 13 focused tests, beta.11 compatibility, and the final combined 319/319 suite pass. Keep status `approved` until merge/install and acceptance. P01-B remains deferred. |
88
+ | P04-A | **DONEimplemented** | Revision 5 passed its 306/306 checkpoint and the final combined P04-A/P01-A 319/319 suite, shipped in exact `v2.0.0-beta.11` at `44e6734`, and remained part of the beta.12 line. The implementation acceptance gate is closed. P04-B remains deferred. |
89
+ | P01-A | **DONEimplemented** | Revision 5 passed typecheck, plugin/schema/release validation, 13 focused tests, beta.11 compatibility, and the final combined 319/319 suite; it shipped with P04-A in exact `v2.0.0-beta.11` at `44e6734` and remained part of the beta.12 line. P01-B remains deferred. |
90
90
  | P02 | **NO-GO** | Do not implement until its output-to-evidence mapping and semantic-authority proposal pass the fresh/historical replay gate. The brief defines the required contract and current-state routing, but the causal Step hypothesis is still only partially confirmed. |
91
91
  | P03 | **NO-GO** | Required category-B evidence is absent. Reconsider only after P04-A and the relevant P01 authority exist and a fresh role-separated replay isolates a real context omission. |
92
92
  | P05 / P04-B | **NO-GO / not materialized** | Structural replacement, topology evolution, residual-scope redistribution, and completed-work adoption require a separate brief. P04-A blocks replacement rather than guessing these semantics. |
93
93
 
94
- Recommended implementation sequence:
94
+ Remaining evidence-gated sequence:
95
95
 
96
96
  ```text
97
- P04-A -> P01-A -> validate P02 hypothesis -> validate P03 hypothesis
98
- +-> separately materialize P05/P04-B when replacement is required
97
+ implemented P04-A -> implemented P01-A -> validate P02 hypothesis -> validate P03 hypothesis
98
+ +-> separately materialize P05/P04-B when replacement is required
99
99
  ```
100
100
 
101
- The four-brief set is therefore not one implementation-ready batch. Only the first two bounded
102
- phases have a recommended implementation route; P02 and P03 remain evidence-gated hypotheses.
101
+ The four-brief set is therefore not one implementation-ready batch. The first two bounded phases
102
+ are implemented; P02 and P03 remain evidence-gated hypotheses, and P04-B/P05 remains unmaterialized.
103
103
 
104
104
  ## Current validation boundary
105
105
 
@@ -112,8 +112,8 @@ evidence, not approval evidence for all four briefs:
112
112
  project-memory human gate stopped the isolated lifecycle;
113
113
  - it does not exercise structural replacement;
114
114
  - the source Signal repository was not modified;
115
- - P01-A and P04-A are `approved` combined-branch candidates; P02 and P03 remain `hypothesis`.
116
- Candidate code and focused tests do not by themselves satisfy the merge/install implementation gate.
115
+ - P01-A and P04-A are implemented and released from the combined candidate in `v2.0.0-beta.11`,
116
+ then retained through the beta.12 line; P02 and P03 remain `hypothesis`.
117
117
 
118
118
  Historical active-Milestone state and old M3 Task identifiers are not mandatory inputs to fresh
119
119
  materialization validation. Brief-specific replay requirements must use fresh authority unless a
package/docs/release.md CHANGED
@@ -10,15 +10,23 @@ Before tagging a release:
10
10
 
11
11
  1. `npm ci`
12
12
  2. `npm run validate`
13
- 3. `npm run pack:check`
14
- 4. `npm run smoke:downstream`
15
- 5. `npm run plugin:check`
16
- 6. `npm run docs:pdf:check`
17
- 7. `npm run release:check`
18
- 8. validate `plugins/codex-workflow-gateway` with the Codex plugin validator
19
- 9. validate the append-only real-agent log with
13
+ 3. `npm run test:signal-t10-check-support-e2e`
14
+ 4. `npm run test:signal-remediation-e2e`
15
+ 5. `npm run pack:check`
16
+ 6. `npm run smoke:downstream`
17
+ 7. `npm run plugin:check`
18
+ 8. `npm run docs:pdf:check`
19
+ 9. `npm run release:check`
20
+ 10. validate `plugins/codex-workflow-gateway` with the Codex plugin validator
21
+ 11. validate the append-only real-agent log with
20
22
  `node scripts/validate-lifecycle-transcript.mjs --file <lifecycle-log.jsonl>`
21
23
 
24
+ The beta.13 real-agent gate follows the same Codex App boundary as production: the Task agent keeps
25
+ its live writer authority while a separate App reviewer consumes an external-sealed packet, then the
26
+ Task agent records the result. A nested native `codex exec` launched from inside another Codex agent
27
+ is not accepted as release evidence. Packet generation is a logged read-only observation; recording
28
+ the sealed result remains an exact `next`-authorized mutation followed by `status` and `next`.
29
+
22
30
  The downstream smoke packs the actual tarball, installs it into an empty temporary project,
23
31
  runs the packaged CLI handshake, and proves installation created none of `.codex`, `.tasks`,
24
32
  `.increments`, or `.memory-bank` in that project.
@@ -27,7 +35,55 @@ The PDF check deterministically regenerates all three Russian documents from
27
35
  `docs/pdf/sources`, binds the visible package version to the root manifest, and fails when any
28
36
  tracked PDF is stale. Source and binary PDFs are one release unit.
29
37
 
30
- For beta.12.8, the release gate also relies on `npm run release:check` to fail if:
38
+ For beta.13, `npm run release:check` builds the exact current source before inspecting the packaged
39
+ surface and fails unless all of these release contracts remain present:
40
+
41
+ - the handshake advertises `cause-bound-rolling-refinement-v1`,
42
+ `failed-step-continuation-transaction-v1`, `host-safe-credential-reference-v1`,
43
+ `structural-production-edge-contract-v1`, `observed-route-matrix-v2`, `compact-status-v1`,
44
+ `reviewer-runtime-preflight-v1`, `explicit-review-mode-v1`, and
45
+ `app-owned-operational-preflight-v1`;
46
+ - claim/writer credentials are transported only by project/entity/action/actor-bound local
47
+ references backed by mode-`0600` storage, legacy secret-bearing arguments fail closed, and secret
48
+ material is absent from argv, output, errors, tool/session/transcript fixtures, and evidence;
49
+ - a failed check commits failure evidence, exact dirty-byte binding, Task continuation state, and
50
+ lease release through the `failed-step-continuation` transaction; a failed strict review similarly
51
+ binds remediation, Task pause and exact lease release, and a repeated authoritative reviewer cause
52
+ adds C1 yield before root-cause replan; the Signal-shaped E2E continues through recovery, the next
53
+ ordinary Step, Task completion, and next-Task dispatch;
54
+ - 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`;
57
+ - a transitive same-component check owner may refine the same Task only under the unchanged semantic
58
+ boundary; for a multi-Step `runtime-composition` consumer the independent PRA classification,
59
+ not a planner opt-in, requires an edge from a transitive owner to an exact executable consumer
60
+ check. A simple one-Step runtime is exempt; neither assertion claims semantic product truth or
61
+ P02/P01-B authority;
62
+ - the machine-readable route matrix gives every one of the 13 Signal-observed route classes a
63
+ unique priority and one exact production transition witness or real terminal observation. The
64
+ `signal-observed-route-class-witnesses` boundary does not claim every action is exercised:
65
+ action-level metadata remains `executable-witnessed`, `unwitnessed`, or `unsupported`, and unknown
66
+ actions fail closed;
67
+ - default `status` is a bounded route-exact projection and full historical state requires explicit
68
+ `status --full`;
69
+ - reviewer runtime preflight is read-only for the sealed checkout and requires exact declared,
70
+ locked and repository-local installed Workflow versions plus a hash-verified runtime build manifest;
71
+ on every call it re-resolves the exact recursive runtime dependency graph from each actual parent
72
+ package (nested before hoisted) and re-hashes package manifests and executable runtime files, so a
73
+ warm Node module cache cannot hide a removed, changed, conflicting or symlink-redirected dependency;
74
+ the exact installed gateway, reviewer, and workflow modules are loaded synchronously through the
75
+ current Node runtime and must report exact package/protocol/schema versions; this avoids a child-process
76
+ scheduler deadline without caching a trust decision, and every load or contract failure still fails closed;
77
+ the native reviewer output schema is accepted by API strict Structured Outputs: every object property
78
+ is required, optional finding values use explicit nullability, and malformed semantic combinations fail closed;
79
+ a missing install, missing/stale build or failed handshake returns `prepared=false` with an
80
+ actionable blocker; every sealed review packet binds `ordinary` or `security` mode, and ordinary
81
+ review cannot imply a security scan;
82
+ - package-owned operational preflights report worktree observation, watchdog, consent, and
83
+ coordinator-replacement facts without claiming Codex App scheduling, chat mutation, consent, or
84
+ atomic App effects.
85
+
86
+ For beta.12.19, the release gate also relies on `npm run release:check` to fail if:
31
87
 
32
88
  - canonical entity schema 2 shapes drift;
33
89
  - protocol 2 is not the active public contract, or intact protocol-1 adoption evidence stops being readable through the bounded compatibility window;
@@ -48,10 +104,28 @@ For beta.12.8, the release gate also relies on `npm run release:check` to fail i
48
104
  revision-26 fixture, or pending/corrupt-review rejection regressions are absent.
49
105
  - dependency recovery again requires Task-local manifest/lock fields to equal the Milestone base,
50
106
  or a candidate commit can alter any non-Workflow dependency payload.
107
+ - corrective replan drops completed Step evidence from accepted Task history, or an already-stranded
108
+ Task can register arbitrary/unreviewed history instead of one exact passed and previously accepted
109
+ Step commit.
110
+ - beta.12.9 cannot install through an exact dependency-only base/Task transport while preserving the
111
+ active Step worktree, or that compatibility route fails to bind the dependency HEAD, historical
112
+ commit, current Plan/Step, dirty paths/content hash, and absence of leases/transactions.
51
113
  - the read-only Milestone progress projection, replacement regression, project-monotonic chat
52
114
  registry, title fallback/readback, or long-Cyrillic multi-attempt E2E evidence is absent.
53
- - bounded first-failure Plan-integrity recovery, exact failed-remediation/manifest/worktree
115
+ - bounded first- or repeated-failure Plan-integrity recovery, selector-required npm-check
116
+ feasibility, exact failed-remediation/manifest/worktree
54
117
  bindings, or the no-synthetic-second-failure regression is absent.
118
+ - Plan-integrity update preflight again hard-codes one historical source release instead of deriving
119
+ a coherent exact beta.12 source from declared/locked/installed/current/base surfaces, or it accepts
120
+ a source before beta.12.11, a source not older than the runner, or any divergent version surface.
121
+ - a direct migration check can import an external checksum/catalog authority without the producing
122
+ Step owning it; or in-flight recovery can widen beyond the exact imported support path, bypass
123
+ `forbiddenScope`, change the Plan hash, skip checks/Core commit/review disclosure, or require a
124
+ Human approval for the machine-proved scope-only correction.
125
+ - historical check-support evidence is reinterpreted against a later Plan instead of the Plan hash
126
+ recorded by the event; or a post-rebind update is accepted without one planned Step explicitly
127
+ owning every previously derived support path in both `allowedWrites` and `expectedOutputs`, exact
128
+ dirty-byte continuity, coherent versions, and an otherwise idle recovery boundary.
55
129
  - downstream proof cannot invalidate only completed transitive-predecessor authority while
56
130
  preserving worktree/HEAD, yielding C1, and returning the same Task to fresh planning; or unrelated
57
131
  dirty files and damaged invalidation evidence do not fail closed.
@@ -72,6 +146,12 @@ For beta.12.8, the release gate also relies on `npm run release:check` to fail i
72
146
  feasibility capability is absent from the packaged handshake.
73
147
  - continuable guarded remediation or evidence-bound `fix`/`replan` review routing is absent, or a
74
148
  third/later failed review is again converted into an attempt-count stop.
149
+ - audited remediation can change Milestone outcome/success signal/acceptance/checks, omit or add
150
+ arbitrary predecessor authority, reuse one blocking audit, run with dirty/owned state, or stop
151
+ before the new Task merges and the original Task completes a subsequent Step.
152
+ - `corrective-derived` Task authorization/final acceptance can exist without the current exact
153
+ Milestone execution authorization and audited-remediation event, or final Milestone acceptance is
154
+ derived automatically.
75
155
  - the append-only, Human-confirmed beta.11 attempt-four stop override, its exact three-event/
76
156
  continue/stop binding, split rejection, stale-confirmation rejection, or tamper detection is
77
157
  absent from the package.
@@ -22,6 +22,211 @@ state schema. Совпадение `stateSchemaVersion` до и после об
22
22
  нужна. Для alpha.6 при `stateSchemaVersion: 2` применяется не migration, а sidecar-only
23
23
  adoption posture.
24
24
 
25
+ ### beta.13: coherent continuation and host-safe credentials
26
+
27
+ `2.0.0-beta.13` сохраняет `protocolVersion: 2` и `stateSchemaVersion: 2`; отдельная state migration
28
+ для перехода с beta.12.19 не нужна. Обновление выполняется только на безопасной границе обычного
29
+ `update preflight`: нет running Step, active/stale writer lease, незавершённой transaction/Core
30
+ operation и неучтённых dirty product bytes. Если хотя бы одно условие не выполнено, сначала
31
+ завершите advertised recovery текущей repository-local версией; установка beta.13 сама по себе не
32
+ является recovery-route и не разрешает переносить или редактировать внешний state.
33
+
34
+ Точный путь обновления:
35
+
36
+ 1. Старой repository-local версией зафиксируйте `handshake`, `status`, `next` и read-only
37
+ `update preflight`; продолжайте только при `safe=true`.
38
+ 2. Установите exact `codex-workflow-v2@2.0.0-beta.13` без диапазона и измените только
39
+ `package.json` и lock-файл.
40
+ 3. Новой repository-local версией подтвердите совпадение declared, locked и installed
41
+ `2.0.0-beta.13`, прежний `projectId`, protocol/schema `2/2`, затем выполните `handshake`,
42
+ `doctor`, компактный `status` и `next`.
43
+ 4. Обновите персональный `codex-workflow-gateway` только штатным installer из установленного
44
+ exact пакета и продолжайте работу в новом чате, который загрузит новую skill-инструкцию.
45
+ 5. Если dependency commit сделал Knowledge Map stale, используйте только свежий advertised
46
+ reconcile/rebind route. Не объявляйте обновление пакета доказательством продуктового изменения.
47
+
48
+ После beta.13 credential contract меняется на host-safe references. Claim и writer transitions
49
+ принимают `--claim-credential-ref` или `--writer-credential-ref`; секретное значение нельзя
50
+ передавать в argv, prompt, transcript, stdout/stderr или JSON evidence. Ссылка указывает на локальную
51
+ project/entity/action/actor-bound запись с режимом `0600`; one-time claim reference потребляется
52
+ после успешного перехода. Старые secret-bearing CLI options fail closed. Если `next` требует свежую
53
+ credential после failed Step, lease expiry или claim recovery, следуйте сначала рекламируемому
54
+ credential replacement route и используйте только возвращённую reference, не старый secret/token.
55
+
56
+ Failed Step beta.13 больше не должен требовать ручного сохранения worktree или глобального lock
57
+ repair: Core одной `failed-step-continuation` transaction связывает failure evidence и точный hash
58
+ dirty bytes, переводит Task в продолжимое состояние и освобождает lease. Fresh `status -> next`
59
+ затем определяет ordinary same-Task fix либо root-cause replan. Количество review/fix циклов не
60
+ ограничено числом: replan обязателен только при повторе механически нормализованной причины либо
61
+ того же stable external reviewer `causeId` с `planConflict=true`; новая или неклассифицированная
62
+ находка остаётся same-Task fix.
63
+
64
+ Failed strict review также освобождает exact proven lease в одной transaction с remediation и Task
65
+ pause. При повторной authoritative reviewer cause эта transaction одновременно завершает C1 claim,
66
+ поэтому fresh `next` может рекламировать root-cause `task plan-set` без Human gate и без живой
67
+ write-authority. Прерванная граница после уже записанных review sidecars повторно завершается без
68
+ duplicate remediation.
69
+
70
+ Для новых Plans beta.13 дополнительно проверяет transitive component owner. Для multi-Step Task
71
+ независимая PRA-классификация consumer как `runtime-composition` требует явный structural production
72
+ edge: transitive owner Step, consumer Step и named check, который реально выполняет consumer. Planner
73
+ не может отключить эту проверку, пропустив flag или edge; простой one-Step runtime остаётся вне неё.
74
+ Это проверка структурной полноты, а не доказательство продуктовой
75
+ семантики и не реализация P02/P01-B. Generic shadow-history import, P04-B structural replacement и
76
+ completed-Step adoption остаются неподдержанными.
77
+
78
+ Операционные read-only контракты beta.13:
79
+
80
+ - `status` по умолчанию возвращает bounded compact projection; полная история доступна только через
81
+ явный `status --full`;
82
+ - sealed review packet проходит reviewer runtime preflight без изменения checkout: declared, locked и
83
+ repository-local installed Workflow versions совпадают, а runtime build manifest и каждый его JS hash
84
+ проверены; каждый вызов заново разрешает recursive runtime dependencies от их фактического parent package
85
+ (nested раньше hoisted) и сверяет package manifest и исполняемые файлы по хешам, поэтому warm module cache
86
+ не скрывает удалённую, изменённую, конфликтующую или symlink-перенаправленную зависимость;
87
+ текущий Node синхронно загружает exact installed gateway/reviewer/workflow graph и подтверждает
88
+ package/protocol/schema без child-process scheduler deadline и без кэширования trust decision;
89
+ missing install, missing/stale build либо failed module handshake дают
90
+ `prepared=false`, и packet не считается готовым; packet всегда несёт `--review-mode ordinary` или
91
+ `--review-mode security`; ordinary review не должен неявно запускать security scan;
92
+ - observed-route matrix v2 покрывает 13 route classes, фактически наблюдавшихся в Signal: для каждого
93
+ класса есть один exact production-transition witness либо real terminal observation. Это не значит,
94
+ что проверена каждая action: metadata отдельно помечает `executable-witnessed`, `unwitnessed` и
95
+ `unsupported`, а coverage boundary равна `signal-observed-route-class-witnesses`;
96
+ - chat replacement, consent inheritance, polling и scheduling остаются эффектами Codex App;
97
+ package сообщает только preflight/diagnostics и не утверждает, что выполнил эти действия.
98
+
99
+ ### beta.12.19: hash-bound check-support dirty carryover at Task run
100
+
101
+ beta.12.18 could validate and transport a historical check-support recovery through a new Plan, but
102
+ the final execution boundary still applied the ordinary clean-checkout rule. Consequently fresh
103
+ `next` advertised `task run` after dependency registration, Knowledge rebind, Risk Audit and
104
+ authorization, while the same `task run` rejected the preserved product bytes.
105
+
106
+ beta.12.19 gives navigation and execution one shared fail-closed assessment. Carryover is valid only
107
+ when the latest registered Plan-integrity dependency record binds the current history boundary, the
108
+ current Plan is that record's Plan or its exact Knowledge-rebind descendant, the planned Step owns
109
+ every dirty path, every derived support path is explicit in both `allowedWrites` and
110
+ `expectedOutputs`, and the full dirty file list and content hash still match the validated historical
111
+ decision. `next` then reports `planIntegrityDirtyCarryover.state=validated`; `task run` may adopt
112
+ exactly those bytes. Any mismatch changes `next` to `doctor` and leaves execution blocked.
113
+
114
+ An in-flight beta.12.18 Task already in the authorized dirty-carryover posture may use external exact
115
+ beta.12.19 `update plan-integrity-update-preflight`. It returns
116
+ `compatibilityMode=post-rebind-dirty-carryover` only when the existing registration and all ordinary
117
+ version, Git, lease, transaction and Core-operation guards pass. Continue only through the reported
118
+ dependency-only transport and fresh repository-local routes. No Human approval is introduced for
119
+ this exact machine-proved continuation; checks, Core commit and external sealed review remain
120
+ mandatory.
121
+
122
+ ### beta.12.18: historical check-support scope adoption after Knowledge rebind
123
+
124
+ beta.12.18 closes a bounded post-rebind deadlock. A Task may already contain a valid beta.12.16
125
+ `continue-fix` decision that derived one exact check-support path, then refresh Knowledge and adopt
126
+ that path explicitly in a new Plan. The historical event must still be validated against its own
127
+ Plan hash; comparing it with the new Plan incorrectly reports `STATE_CORRUPT` precisely because the
128
+ new Plan now owns the path.
129
+
130
+ An external exact beta.12.18 runner recognizes only this exact shape: the Task awaits execution
131
+ authorization, no Step is running, one historical check-support decision binds the unchanged dirty
132
+ worktree, and one planned Step directly lists every derived support path in both `allowedWrites` and
133
+ `expectedOutputs`. Read-only `update plan-integrity-update-preflight` reports
134
+ `compatibilityMode=post-rebind-scope-adoption` only when all ordinary version, lease, transaction,
135
+ Core-operation, Git-head and dirty-byte guards also pass.
136
+
137
+ After `eligible=true`, use the same dependency-only base/Task transport described below. Fresh
138
+ repository-local Core registers it only through advertised
139
+ `update plan-integrity-dependency-recover`; Knowledge rebind and Risk Audit then follow fresh
140
+ `status -> next`. The adopted support path comes from the current Plan, not from implicit reuse of
141
+ the historical event. No Human approval is required for this exact machine-proved recovery. Any
142
+ additional path, dirty-byte drift, missing explicit Plan ownership, multiple matching events, active
143
+ lease or incoherent version surface remains blocked.
144
+
145
+ ### beta.12.17: coherent beta.12 Plan-integrity update transport
146
+
147
+ `update plan-integrity-update-preflight` больше не связывает совместимый transport с одним
148
+ историческим source release. Внешний exact beta.12.17 runner выводит source version из declared
149
+ dependency и требует, чтобы locked, installed, current Task branch и active Milestone base
150
+ совпадали с ним. Source должен быть exact `2.0.0-beta.12.N`, где `N >= 11` и `N` меньше patch
151
+ ordinal текущего runner. Расхождение хотя бы одной поверхности блокирует transport.
152
+
153
+ Остальные границы не изменены: ровно одна eligible Plan-integrity conflict, coherent observation,
154
+ нет lease/transaction/Core operation, а dirty set полностью совпадает с уже доказанным failed Step
155
+ scope. После `eligible=true` один dependency-only commit обновляет только `package.json` и
156
+ `package-lock.json` на Milestone base и в Task history; fresh repository-local package затем
157
+ регистрирует commit через advertised `update plan-integrity-dependency-recover`. Product bytes,
158
+ Plan hash и remediation evidence не переписываются. Этот контракт разрешает текущий `.15 -> .17`
159
+ transport и не требует нового literal для следующего совместимого beta.12 patch.
160
+
161
+ ### beta.12.16: direct migration check-support authority
162
+
163
+ Новый mechanical analyzer до execution authorization проверяет root `npm run` migration checks,
164
+ repository-local `node`/`tsx` runner и его direct static relative imports. Если Step создаёт новую
165
+ SQL migration, а импортированный TypeScript/JavaScript support-модуль закрепляет approved SHA-256,
166
+ manifest или expected catalog той же migration family, этот support path должен входить в
167
+ `allowedWrites` той же Step. Иначе Plan возвращается к `task plan-set` до запуска Worker.
168
+
169
+ Для уже выполняемой Task с первым `checks-failed` fresh beta.12.16 `next` может рекламировать
170
+ `task plan-integrity-recover` с reason `CHECK_SUPPORT_ANCHOR_OUTSIDE_ALLOWED_WRITES` и
171
+ `boundedEffect=record-machine-derived-check-support-scope`. Выполните только этот route под текущим
172
+ C1 actor/writer credential, затем снова прочитайте `next` и вызовите `task run`. Worker envelope
173
+ должен добавить ровно `evidence.scopeExtensions`; Plan hash и существующие product bytes остаются
174
+ неизменными. Core повторяет все checks, сам создаёт commit и включает derived scope в sealed review
175
+ packet. Human corrective-replan для этого точного scope-only случая не требуется. Если route не
176
+ рекламируется, есть indirect/dynamic import, лишний dirty path, forbiddenScope intersection или нет
177
+ SHA/catalog anchors — не расширяйте scope вручную.
178
+
179
+ ### beta.12.12: неисполняемая Step check и сохранение текущей реализации
180
+
181
+ Новые Plans больше не могут получить execution authorization, если root npm script запускает
182
+ repository-local `affected` validator, сам validator явно требует `--base`, `--head` или `--files`,
183
+ а Step check не передаёт ни одного selector. Исправьте check в Plan, например
184
+ `npm run validate:affected -- --files=<allowedWrites>`; Worker и remediation attempt до этого не
185
+ запускаются.
186
+
187
+ Для Task, уже застрявшей на beta.12.11 после одного или нескольких одинаковых `checks-failed`,
188
+ используется только bounded bridge. Внешний exact beta.12.12 runner выполняет read-only
189
+ `update plan-integrity-update-preflight`; продолжение допустимо лишь при `eligible=true`, отсутствии
190
+ lease/transaction и точном dirty set внутри failed Step `allowedWrites`. Затем один dependency-only
191
+ commit (`package.json` и `package-lock.json`) должен оказаться и на Milestone base, и в Task history
192
+ без изменения product bytes. Fresh repository-local `next` рекламирует
193
+ `update plan-integrity-dependency-recover`; этот переход регистрирует dependency commit и, если
194
+ Knowledge drift вызван только Workflow pin в `package.json`, атомарно выполняет corrective-derived
195
+ Knowledge refresh без Human approval.
196
+
197
+ После регистрации Core связывает всю append-only цепочку failed attempts, текущий Plan, HEAD,
198
+ manifest, validator и SHA-256 dirty worktree. `task plan-integrity-recover` записывает один
199
+ `replan-required` decision для следующего ordinal. Затем следуйте fresh
200
+ `task corrective-yield -> task corrective-replan-*`; replacement Plan обязан сохранить Step и dirty
201
+ allowlist, но заменить check на исполняемую selector-bearing команду. Не коммитьте product files,
202
+ не редактируйте state и не повторяйте старую неисполняемую проверку.
203
+
204
+ ### beta.12.11: audited remediation и dependency-only Knowledge refresh
205
+
206
+ После безопасного обновления существующий active Milestone может продолжить работу без пересоздания,
207
+ если current `next` показывает pre-execution `stop-escalate` и объект `auditedRemediation`. Это не
208
+ update compatibility bridge и не разрешение вручную менять state. Сначала выполните обычный
209
+ `update preflight`; установите exact beta.12.11 только при `safe=true`, clean checkout, отсутствии
210
+ running Step и leases, затем снова выполните repository-local handshake, `status` и `next`.
211
+
212
+ Далее следуйте только свежему route: remediation Discovery -> ready ->
213
+ `milestone remediation-materialize`. Передайте exact Milestone/Task revisions и JSON с Discovery,
214
+ title и `predecessorTaskIds`, которые полностью совпадают с
215
+ `next.auditedRemediation.requiredPredecessorTaskIds`. Переход не принимает confirmation code,
216
+ actor, grant или новый Milestone Plan. После atomic materialization новый required Task должен стать
217
+ repository priority и пройти обычную реализацию/review/merge. Его Task approval transitions используют
218
+ только exact `correctiveDerivedApproval.actor` из fresh `next`. После merge исходная Task обязана
219
+ вернуться к `task plan-set`, fresh Risk Audit и следующему Step. Если fresh `next` не рекламирует этот
220
+ контракт, не вызывайте команды напрямую и не редактируйте Milestone state.
221
+
222
+ Если exact dependency-only update сделал approved Knowledge Map stale только по `package.json`,
223
+ `auditedRemediation.dependencyKnowledgeRefresh` должен подтвердить clean checkout, aligned
224
+ declared/locked/installed/HEAD/base versions и полную Git-цепочку commits, меняющих только Workflow pin
225
+ в `package.json`/lock. Такой content refresh не требует Human approval: он применяется в той же Project
226
+ transaction, что и `milestone remediation-materialize`, с `corrective-derived` evidence. Любой другой
227
+ Knowledge diff (включая README, документацию, classification, gap или conflict) не допускается в этот
228
+ маршрут и остаётся в обычном reconcile/approval flow.
229
+
25
230
  ### Исключение для lifecycle-дедлока alpha.6
26
231
 
27
232
  Обычный `update preflight` намеренно блокирует обновление при `in_progress` Step. Если alpha.6
@@ -59,6 +264,36 @@ candidate: его HEAD обязан менять ровно `package.json` и `p
59
264
  dependency; любое другое поле, добавленное тем же candidate commit, неизвестный commit, stale base,
60
265
  dirty checkout, lease или transaction по-прежнему блокируют recovery.
61
266
 
267
+ ### Исключение beta.12.9 для Step commit, потерянного corrective Plan
268
+
269
+ Если активный corrective Step сохраняет допустимый dirty worktree, а `task step-complete` обнаруживает
270
+ ровно один старый product commit, beta.12.9 не требует переписывать Git. Пакет поддерживает два
271
+ строго ограниченных входа в один и тот же recovery:
272
+
273
+ - если beta.12.9 уже зарегистрирована, свежий `next` рекламирует
274
+ `task historical-step-provenance-recover`;
275
+ - если для установки beta.12.9 на Milestone base и Task branch уже созданы ровно dependency-only
276
+ commits, свежий `next` рекламирует `update historical-step-dependency-recover`. Этот переход
277
+ атомарно регистрирует новый dependency HEAD и сохраняет authority старого Step commit.
278
+
279
+ В обоих случаях Core сам доказывает для старого SHA полную hash-valid strict Step Review цепочку с
280
+ решением `passed`, verified reviewer isolation и совпадающий прежний `final_acceptance`. Update-route
281
+ дополнительно требует exact target version на declared/locked/installed/current-branch/base surfaces,
282
+ dependency commit только из `package.json` и `package-lock.json`, а также неизменный hash активного
283
+ dirty worktree относительно read-only assessment.
284
+
285
+ Сначала выполните read-only `task historical-step-provenance-preflight --id <TASK-ID>`. Продолжайте
286
+ только при `eligible=true`, точных Task revision, Plan/Brief/HEAD и commit SHA, отсутствии leases,
287
+ transactions и Core operations, а также dirty paths строго внутри `allowedWrites` единственного
288
+ активного Step. Recover принимает exact SHA, actor и содержательную reason, добавляет SHA в
289
+ `invalidatedStepCommits` и записывает источник прежнего acceptance. Product bytes, HEAD и текущий
290
+ Plan не меняются; старый Step не возвращается в Plan. После recovery обязательны последовательные
291
+ `status` и `next`, затем обычный credential route и `task step-complete` текущего Step.
292
+
293
+ Несколько unknown commits, pending/failed review, несовпадающий Plan прежнего acceptance,
294
+ повреждённый sidecar, посторонний dirty path или lease являются hard stop. Запрещено заменять этот
295
+ переход rebase/reset/amend, ручным `systemCommits` или переносом старого Step в текущий Plan.
296
+
62
297
  ### Исключение beta.12.6 для активного downstream proof
63
298
 
64
299
  Обычный `update preflight` по-прежнему правильно запрещает обновление при running Step и dirty