codex-workflow-v2 2.0.0-beta.12.9 → 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 (116) hide show
  1. package/README.md +58 -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.js +34 -4
  30. package/dist/src/alpha6/review.js.map +1 -1
  31. package/dist/src/artifacts.js +6 -0
  32. package/dist/src/artifacts.js.map +1 -1
  33. package/dist/src/cli-actions.d.ts +25 -0
  34. package/dist/src/cli-actions.js +109 -0
  35. package/dist/src/cli-actions.js.map +1 -0
  36. package/dist/src/cli.js +216 -258
  37. package/dist/src/cli.js.map +1 -1
  38. package/dist/src/contracts.d.ts +166 -5
  39. package/dist/src/credential-transport.d.ts +38 -0
  40. package/dist/src/credential-transport.js +156 -0
  41. package/dist/src/credential-transport.js.map +1 -0
  42. package/dist/src/dependency-provenance.d.ts +23 -2
  43. package/dist/src/dependency-provenance.js +221 -34
  44. package/dist/src/dependency-provenance.js.map +1 -1
  45. package/dist/src/domain/completed-step-carryover.d.ts +13 -0
  46. package/dist/src/domain/completed-step-carryover.js +71 -0
  47. package/dist/src/domain/completed-step-carryover.js.map +1 -0
  48. package/dist/src/domain/validation.d.ts +9 -1
  49. package/dist/src/domain/validation.js +86 -0
  50. package/dist/src/domain/validation.js.map +1 -1
  51. package/dist/src/gateway-handshake.d.ts +11 -0
  52. package/dist/src/gateway-handshake.js +92 -0
  53. package/dist/src/gateway-handshake.js.map +1 -0
  54. package/dist/src/index.d.ts +2 -0
  55. package/dist/src/index.js +2 -0
  56. package/dist/src/index.js.map +1 -1
  57. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +5 -0
  58. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +9 -0
  59. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -1
  60. package/dist/src/lifecycle/corrective-replan.js +1 -1
  61. package/dist/src/lifecycle/corrective-replan.js.map +1 -1
  62. package/dist/src/lifecycle/semantic-registry.js +1 -1
  63. package/dist/src/observation.js +1 -2
  64. package/dist/src/observation.js.map +1 -1
  65. package/dist/src/observed-routes.d.ts +114 -0
  66. package/dist/src/observed-routes.js +545 -0
  67. package/dist/src/observed-routes.js.map +1 -0
  68. package/dist/src/operational-contract.d.ts +26 -0
  69. package/dist/src/operational-contract.js +94 -0
  70. package/dist/src/operational-contract.js.map +1 -0
  71. package/dist/src/reviewer.d.ts +218 -8
  72. package/dist/src/reviewer.js +927 -25
  73. package/dist/src/reviewer.js.map +1 -1
  74. package/dist/src/state/corrective-replan-executor.js +18 -15
  75. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  76. package/dist/src/state/corrective-replan-public.js +35 -10
  77. package/dist/src/state/corrective-replan-public.js.map +1 -1
  78. package/dist/src/state/corrective-replan-transaction.js +12 -4
  79. package/dist/src/state/corrective-replan-transaction.js.map +1 -1
  80. package/dist/src/state/corrective-yield-transaction.js +11 -2
  81. package/dist/src/state/corrective-yield-transaction.js.map +1 -1
  82. package/dist/src/state/lock.d.ts +1 -0
  83. package/dist/src/state/lock.js +24 -0
  84. package/dist/src/state/lock.js.map +1 -1
  85. package/dist/src/version.d.ts +1 -1
  86. package/dist/src/version.js +1 -1
  87. package/dist/src/version.js.map +1 -1
  88. package/dist/src/workflow.d.ts +65 -4
  89. package/dist/src/workflow.js +1704 -155
  90. package/dist/src/workflow.js.map +1 -1
  91. package/docs/autonomy-guardrails.md +41 -14
  92. package/docs/delegated-approval.md +6 -1
  93. package/docs/development-flow.md +42 -12
  94. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  95. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  96. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  97. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +181 -22
  98. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +148 -26
  99. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +326 -52
  100. package/docs/problem-briefs/01-pre-implementation-integrity.md +11 -7
  101. package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +13 -6
  102. package/docs/problem-briefs/README.md +11 -11
  103. package/docs/release.md +83 -9
  104. package/docs/updating-existing-project.md +205 -0
  105. package/docs/validation-report.md +156 -99
  106. package/package.json +12 -3
  107. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +42 -1
  108. package/schemas/authorization-event.schema.json +10 -3
  109. package/schemas/corrective-decision-event.schema.json +164 -9
  110. package/schemas/corrective-replan-credentials.private.schema.json +4 -2
  111. package/schemas/milestone-scope-change-event.schema.json +25 -1
  112. package/schemas/remediation-event.schema.json +17 -1
  113. package/schemas/review-result.schema.json +1 -0
  114. package/schemas/step-review-event.schema.json +15 -0
  115. package/schemas/task.schema.json +61 -1
  116. package/schemas/transition-definition.schema.json +8 -0
@@ -1,104 +1,161 @@
1
- # V2 beta.12.9 Validation Report
1
+ # V2 beta.13 Validation Report
2
2
 
3
- Release candidate `2.0.0-beta.12.9` was validated on 2026-08-30 (Europe/Moscow) with
3
+ Release candidate `2.0.0-beta.13` was validated during 2026-09-02--03 (Europe/Moscow) with
4
4
  Node.js 24.17.0.
5
5
 
6
6
  ## Automated release evidence
7
7
 
8
- - `npm ci` completed from the exact lockfile with 0 reported vulnerabilities.
9
- - `npm run validate` passed typecheck and `343/343` sequential tests with no failures, skips,
10
- cancellations, or todos in 1,894,344.070542 ms.
11
- - The focused Signal-shaped E2E proves both recovery entry points. It preserves the active dirty
12
- worktree and HEAD, registers the exact historical Step commit, reaches fresh
13
- `task step-complete`, completes that Step with a new Core-owned commit, and validates the resulting
14
- Task history.
15
- - Negative cases reject pending or damaged strict review, absent final acceptance, multiple or wrong
16
- commits, unrelated dirty paths, changed dirty content, active/stale leases, transactions, version
17
- divergence, and a dependency candidate wider than package/lock.
18
- - Corrective-replan executor tests prove that future replacement Plans retain evidence commits of
19
- omitted completed Steps in `invalidatedStepCommits`.
20
- - `npm run pack:check` built the exact beta.12.9 package with 278 files, 1.0 MB packed and 4.1 MB
21
- unpacked. The initial sandboxed invocation could not write the user npm cache (`EPERM`); the exact
22
- authorized retry passed.
23
- - `npm run smoke:downstream` packed and installed the tarball in a disposable consumer project and
24
- returned `ok=true`. The sandboxed attempt could not resolve the npm registry (`ENOTFOUND`); the
25
- exact network-authorized retry passed.
26
- - `npm run plugin:check` passed for bundled gateway
27
- `0.1.0+codex.20260830183000`.
28
- - `npm run docs:pdf:check` reported an empty stale set and exact beta.12.9 package binding.
29
- - `RELEASE_TAG=v2.0.0-beta.12.9 npm run release:check`, JSON parsing and `git diff --check` passed.
30
-
31
- ## Root cause corrected by beta.12.9
32
-
33
- The corrective-replan paths replaced `task.steps` but did not preserve evidence commits belonging to
34
- completed Steps omitted from the new Plan. Git correctly retained those commits, while Task history
35
- authority no longer named them. A later `task step-complete` therefore rejected a legitimate,
36
- previously reviewed and accepted commit as unregistered history.
37
-
38
- Increasing implementation or review attempts cannot correct this condition. The historical Step had
39
- already passed strict review and final acceptance; the defect was loss of provenance during Plan
40
- replacement.
41
-
42
- ## Implemented lifecycle contract
43
-
44
- - Both legacy `setTaskPlan` and journaled corrective-replan execution now retain omitted completed
45
- Step evidence commits in `invalidatedStepCommits`.
46
- - `task historical-step-provenance-preflight/recover` repairs an already-installed beta.12.9 state
47
- only when Core proves exactly one omitted commit, one active Step, confined dirty paths, a complete
48
- hash-valid passed strict Step Review chain, verified reviewer isolation, and matching prior
49
- hash-bound final acceptance.
50
- - `update historical-step-dependency-preflight/recover` handles installation itself when the exact
51
- beta.12.9 dependency-only commit is the unregistered HEAD. It binds `HEAD^`, dependency `HEAD`, all
52
- version surfaces, active Plan/Step, historical SHA, dirty paths/content hash, and the absence of
53
- leases or pending operations.
54
- - The update transition records the dependency commit and retained historical commit in one Task
55
- revision. Neither recovery rewrites Git, changes product bytes, adopts the old completed Step into
56
- the current Plan, or weakens ordinary strict review.
57
- - Fresh `next` advertises these routes before ordinary dependency recovery and returns to the normal
58
- credential/`task step-complete` flow after successful registration.
59
- - The public handshake exposes `historical-step-provenance-recovery-v1`.
60
-
61
- ## Exact Signal diagnosis evidence
62
-
63
- At release-candidate validation time the Signal project
64
- `/Users/home-pc/htdocs/projects/signal_v4` was on exact beta.12.8 with Task
65
- `TASK-01M0WXJAD4GZGVNRJ284ND95C6` at revision 136 and status `in_progress`. Current Plan hash was
66
- `1ba67296f352cb67fa4d46c3ec9cd2ee2f50059903a5fffc7b0b2198f6dbae4e`; HEAD was
67
- `272d6258e4ce169aa9f5cf2b5a4de29970d82eb7`.
68
-
69
- The active Step `STEP-004-DIRECT-LOGIN-PRIVILEGE-DENIAL` had exactly five dirty files, all inside its
70
- `allowedWrites`. Historical commit `f7ba8533314ee27f176968a6314bf3df40285ef2` had a passed strict
71
- Step Review and prior final acceptance, but was absent from current Step evidence and retained
72
- history authority. No active/stale lease, pending/corrupt transaction, or Core operation remained.
73
- Milestone progress was `2/8` merged Tasks and T04 remained blocked by T03.
74
-
75
- The recurring Signal audit automation that had created an unrelated dirty journal was paused, and
76
- its latest journal was archived outside the checkout with matching SHA-256. The release process did
77
- not rewrite Signal history or mutate its five product files. Live package transport and recovery are
78
- separate post-publication actions and must follow the exact advertised beta.12.9 route.
79
-
80
- ## PDF release documentation evidence
81
-
82
- - All three tracked Russian PDFs were regenerated from the beta.12.9 Markdown sources.
83
- - Architecture is 8 pages, the delegated chat-only guide is 9 pages, and the technical reference is
84
- 12 pages. All pages were rendered to PNG contact sheets; changed recovery/update pages were also
85
- inspected at full page resolution.
86
- - Titles, version headers, Cyrillic text, tables, command names, margins, page footers and section
87
- transitions have no visible clipping, overlap, unreadable content, or orphaned tail page.
88
-
89
- ## Existing boundaries and non-claims
90
-
91
- - Recovery is intentionally unavailable for arbitrary or multiple commits, pending/failed review,
92
- missing final acceptance, post-assessment drift, unrelated dirty paths, or active ownership.
93
- - Protocol version remains 2 and state schema remains 2; the optional audit fields are backward
94
- compatible and no semantic migration is introduced.
95
- - Structural replacement remains disabled. beta.12.9 does not implement P04-B, topology rewiring,
96
- completed-Step adoption, or a wider delegation surface.
97
- - No Git commit, tag, remote push, npm publication, Signal dependency transport, or Signal Task
98
- completion is claimed by this pre-publication validation report.
99
-
100
- Confidence is high for the package implementation, prevention path, bounded legacy recovery,
101
- dependency-install compatibility, negative evidence gates, complete Step continuation, tarball,
102
- downstream installation, plugin and documentation. Live Signal confidence remains conditional on
103
- publishing beta.12.9, transporting only package/lock commits to its active base and Task branch, and
104
- following fresh project-local `status -> next` without manual history or state edits.
8
+ - A clean `npm ci` completed from the exact lockfile. A network-enabled `npm audit --json` reported
9
+ zero vulnerabilities at every severity across all eight installed dependencies.
10
+ - `npm run validate` passed typecheck and `408/408` sequential tests with no failures, skips,
11
+ cancellations or todos in 2,761,796.900458 ms.
12
+ - `npm run test:signal-t10-check-support-e2e` passed `8/8` after the final clean install in
13
+ 203,155.332125 ms. It covers an impossible selector-less check, machine-derived support scope,
14
+ Knowledge rebind, historical evidence reuse and exact compatibility from both beta.12.11 and
15
+ beta.12.15 into beta.13.
16
+ - `npm run test:signal-remediation-e2e` passed `2/2` in 9,220.225709 ms. The audited remediation
17
+ adds the required upstream Task and resumes the original Task through a later Step without
18
+ auto-approving unrelated Knowledge drift.
19
+ - `npm run test:signal-t03-replan-e2e` passed `1/1` in 45,253.2055 ms. The Signal-shaped flow
20
+ recovers an accidental rebind, replans and completes the consolidated guarded Step.
21
+ - `npm run test:signal-t04-recovery` passed `11/11` in 22,021.439625 ms. It preserves only exact
22
+ reviewed Step provenance and rejects pending, corrupt, unrelated or stale recovery evidence.
23
+ - `npm run pack:check` produced the exact `2.0.0-beta.13` tarball with 309 files, package size
24
+ 1.2 MB and unpacked size 4.8 MB. It includes the shared gateway-handshake module and the
25
+ hash-verifiable reviewer runtime build manifest.
26
+ - `npm run smoke:downstream` packed the release, installed it into an empty project and returned
27
+ `ok=true`. The first sandboxed attempt could not resolve the npm registry; the identical
28
+ network-enabled invocation passed.
29
+ - `npm run plugin:check`, `npm run docs:pdf:check`, `npm run typecheck` and `git diff --check` all
30
+ passed. The PDF checker reported no stale generated document. `npm run release:check` passed
31
+ `103/103` tests in 300,945.515375 ms and returned the exact package/version assertion.
32
+
33
+ ## Release-candidate regressions found and closed
34
+
35
+ The first complete candidate run reported `352/380` passing tests. A common precedence defect was
36
+ found: explicit beta.13 unclassified reviewer findings (`causeBindings: []`) had been confused with
37
+ legacy events where `causeBindings` is absent. The corrected contract keeps the former on the same
38
+ Task, sends only a repeated authoritative cause to root-cause replan, and preserves an explicit
39
+ current corrective decision over ordinary rolling continuation. Read-only remediation observation
40
+ no longer requires a live bearer, while execution still requires exact actor and credential
41
+ authority.
42
+
43
+ The second complete run reported `375/380`. These five failures exposed three release-boundary
44
+ defects that focused tests run before the version bump had missed:
45
+
46
+ - Step comparison still admitted runtime-only fields into Plan semantics and could demote an
47
+ unchanged completed Step to `planned` during replan;
48
+ - a synthetic pre-beta.13 remediation event retained the new `causeBindings` field and therefore
49
+ no longer represented legacy data;
50
+ - the dependency compatibility preflight parsed only `beta.12.<patch>` runners, so the actual
51
+ beta.13 release candidate could not consume the supported beta.12.11+ recovery surface.
52
+
53
+ Production Plan comparison now canonicalizes only executable Step fields in both ordinary and
54
+ journaled replan paths. Legacy recovery remains limited to events where `causeBindings` is absent.
55
+ Compatibility compares the beta train and patch and still requires an exact beta.12 source at or
56
+ after beta.12.11, a newer runner, matching declared/locked/installed/base versions and every existing
57
+ dirty, lease and evidence guard. Repeated focused and parallel regressions passed before the final
58
+ candidate expansion.
59
+
60
+ A later complete run of the expanded candidate reported `387/396`. It exposed four distinct issues
61
+ rather than one product defect:
62
+
63
+ - an autonomous-retry fixture was incorrectly labelled `runtime-composition` and therefore invoked
64
+ the new structural production-edge gate;
65
+ - legacy stop-override fixtures accidentally retained native beta.13 cause bindings;
66
+ - assertions still expected direct submit/merge after credential release and retained a completed
67
+ dependent Step after its predecessor was invalidated;
68
+ - external sealed-review preflight spawned the full CLI graph with 15-second and 60-second deadlines;
69
+ under scheduler pressure a valid exact repository-local runtime could exhaust both deadlines and
70
+ produce a false infrastructure blocker.
71
+
72
+ The first three were corrected only at their stale fixtures/expectations; production authority was
73
+ not weakened. The reviewer defect was fixed structurally: CLI and preflight now share one pure
74
+ gateway descriptor, and preflight synchronously loads the exact installed gateway, reviewer and
75
+ workflow graph through Node after manifest/hash verification. It does not spawn a schedulable child,
76
+ cache trust, install or build dependencies. Missing transitive dependencies, byte drift, unsafe paths,
77
+ symlinks and contract mismatch remain fail-closed. Five concurrent preflights under eight CPU burners
78
+ passed, and the exact five-file regression that had failed passed `88/88`. The final complete run then
79
+ passed `399/399`.
80
+
81
+ An independent agnostic release audit then reproduced one additional production defect in a long-lived
82
+ process: after one successful preflight, Node's warm module cache could hide a subsequently deleted
83
+ transitive dependency and still allow a sealed packet. The fix does not clear or reinterpret the module
84
+ cache. Instead, every preflight now resolves the actual recursive dependency graph from each parent
85
+ package using nested-first Node lookup and re-hashes exact package manifests plus every attested
86
+ `.js`, `.cjs`, `.mjs`, `.json` and `.node` runtime file before any cached module can be trusted. Missing,
87
+ tampered, conflicting, path-escaped or symlink-redirected state fails before load and before packet
88
+ issuance. Exact Ajv runtime transitives are direct pins so the built attestation and npm layout are
89
+ deterministic. Same-process ready-delete-fail-restore-ready, warm tamper, nested version conflict and
90
+ stale nearer-copy regressions expanded the complete suite.
91
+
92
+ A real native reviewer preflight then exposed an API-level Structured Output incompatibility: every
93
+ declared object property must also be present in `required`. The reviewer schema now makes nullable
94
+ optional semantics explicit, while the semantic parser still rejects absent or contradictory
95
+ cause/plan-conflict evidence. The complete suite consequently reached `408/408`, and the expanded
96
+ release check reached `103/103`.
97
+
98
+ The same real-agent exercise corrected the release proof boundary without weakening Core. A nested
99
+ `codex exec` reviewer is not treated as independent production evidence: the Coordinator stops at a
100
+ read-only sealed packet, a distinct Codex App task performs each Step/Task review, and an external
101
+ conductor binds the four-field review object to the packet hash, repository seal and actual reviewer
102
+ task ID before the original persistent Coordinator resumes. The disposable release grant is limited
103
+ to `task.execution_authorize` and `task.final_accept`; both authorizations, credential recovery and
104
+ merge therefore use one delegate actor without an intermediate Human approval. A diagnostic harness
105
+ attempt is never resumed or promoted after a failed binding.
106
+
107
+ The first fully merged delegated fixture also found a fail-closed validator inventory gap:
108
+ `discovery show` was logged as a mutation, so a harmless read between CLI help and fresh `next` was
109
+ rejected as `HELP_REQUIRES_FRESH_NEXT`. The packaged transcript validator now classifies this command
110
+ as a read-only observation and carries a regression for help -> read-only observation -> next ->
111
+ mutation. This changes release-evidence interpretation only; it grants no lifecycle authority.
112
+
113
+ ## Implemented beta.13 contract
114
+
115
+ - Failed Step checks and failed strict Step reviews enter an atomic continuation pause: evidence,
116
+ Task state and writer/C1 release either commit together or recover through the transaction journal.
117
+ - Distinct normalized causes continue in the same Task without a numeric retry ceiling. A repeated
118
+ authoritative cause after a claimed fix requires root-cause replan; volatile output cannot create
119
+ a new cause identity.
120
+ - Corrective replan preserves an unchanged completed Step and its reviewed commit only when every
121
+ dependency is also retained with the exact executable definition. A changed or omitted Step and
122
+ its transitive completed descendants are invalidated rather than silently adopted; independent
123
+ unchanged branches remain retained.
124
+ - For multi-Step runtime composition, structural production edges are independently triggered by
125
+ the PRA classification rather than a planner-owned flag, and checked for a transitive owner,
126
+ consumer and exact executable consumer check. Simple one-Step runtime is exempt. This is bounded
127
+ structural authority, not a claim of full product-semantic correctness.
128
+ - Writer credentials are stored in private local references and are never serialized as raw bearer
129
+ material in public CLI output, status, diagnostics or reviewer packets.
130
+ - Compact status, reviewer runtime preflight, explicit review mode, App-owned operational preflight
131
+ and the observed Signal route matrix are packaged capabilities. Its class-level claim covers all
132
+ 13 route classes observed in Signal with one exact production transition or terminal observation
133
+ per class. Action-level metadata remains explicit about witnessed, unwitnessed and unsupported
134
+ actions; unknown or malformed advertised actions fail closed.
135
+ - Reviewer runtime preflight requires exact declared, locked and installed package versions, a
136
+ hash-verified build manifest, byte equality for the running/installed CLI, gateway, reviewer and
137
+ workflow entrypoints, and a disk-fresh recursive dependency attestation on every call. It loads the
138
+ exact installed runtime graph in-process only after that attestation and issues no sealed review
139
+ packet when any readiness or contract check fails.
140
+
141
+ ## Boundaries and non-claims
142
+
143
+ - beta.13 does not introduce generic shadow-history import, completed-Step adoption from an
144
+ unrelated Task, or unchecked Workflow-state reconstruction.
145
+ - P02 Step-validity authority, P03 generic context reuse and P04-B structural Task replacement remain
146
+ outside this release unless an exact implemented capability says otherwise.
147
+ - App-owned effects such as chat creation, consent UI and polling remain outside Core. Core exposes
148
+ diagnostic preflights but does not claim those effects occurred.
149
+ - The package tests prove the supported compatibility and lifecycle contracts. They do not prove a
150
+ future Milestone's product requirements or replace independent product review.
151
+ - The required real-agent transcript is external release evidence bound to the final tarball and source
152
+ commit. This tracked report does not claim that gate before its append-only log, actual-agent
153
+ cross-check, product test, clean Git boundary and credential-residue checks have all passed.
154
+ - This report does not claim commit/tag/push, npm publication, installation into Signal or Milestone
155
+ 4 readiness until those operations receive exact readback.
156
+
157
+ Confidence is high for package behavior and the stated compatibility boundary: the final `408/408`
158
+ run, `103/103` release check, four Signal-shaped E2E suites, package/downstream smoke, CPU-saturation,
159
+ warm-cache and fail-closed negative cases agree. Live Signal readiness remains conditional on
160
+ publication, exact repository-local installation, safe
161
+ closure of the frozen Milestone 3 authority and a fresh read-only `status`/`next` observation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.12.9",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,10 @@
33
33
  "roles",
34
34
  "references",
35
35
  "plugins",
36
- "docs",
36
+ "docs/*.md",
37
+ "docs/lifecycle",
38
+ "docs/pdf",
39
+ "docs/problem-briefs",
37
40
  "scripts/generate-pdf-docs.py",
38
41
  "scripts/run-pdf-docs.mjs",
39
42
  "README.md"
@@ -45,6 +48,8 @@
45
48
  "test": "node scripts/with-validation-lock.mjs test",
46
49
  "test:signal-t04-recovery": "node scripts/with-validation-lock.mjs test-signal-t04",
47
50
  "test:signal-t03-replan-e2e": "node scripts/with-validation-lock.mjs test-signal-t03-replan",
51
+ "test:signal-remediation-e2e": "node scripts/with-validation-lock.mjs test-signal-remediation-topology",
52
+ "test:signal-t10-check-support-e2e": "node scripts/with-validation-lock.mjs test-signal-t10-check-support",
48
53
  "validate": "npm run typecheck && npm test",
49
54
  "pack:check": "npm run build && npm pack --dry-run",
50
55
  "smoke:downstream": "npm run build && node scripts/downstream-smoke.mjs",
@@ -55,7 +60,11 @@
55
60
  "publish:release": "node scripts/publish.mjs"
56
61
  },
57
62
  "dependencies": {
58
- "ajv": "8.20.0"
63
+ "ajv": "8.20.0",
64
+ "fast-deep-equal": "3.1.3",
65
+ "fast-uri": "3.1.7",
66
+ "json-schema-traverse": "1.0.0",
67
+ "require-from-string": "2.0.2"
59
68
  },
60
69
  "devDependencies": {
61
70
  "@types/node": "24.10.1",
@@ -132,6 +132,46 @@ into Plan `acceptance` as exact array members; semantic prose may be added but c
132
132
  IDs. Bind the Plan to the returned `briefHash` and active `knowledgeMap` revision/hash. Stop if the
133
133
  contract is absent or conflicts with the current Task/Knowledge state.
134
134
 
135
+ When fresh repository `next` reports `planRiskAuditDecision.state=recorded-blocking`, decision
136
+ `stop-escalate`, and an `auditedRemediation` object, do not retry authorization and do not invent a
137
+ free-form Milestone scope change. Follow only the advertised route:
138
+
139
+ 1. If action is `discovery start`, create one Discovery for the exact missing upstream capability
140
+ proved by the audit. Preserve the current Milestone outcome, success signal, acceptance, checks,
141
+ and original Task scope. Resolve factual unknowns from repository evidence; a genuine unresolved
142
+ product decision remains a semantic blocker.
143
+ 2. If action is `discovery update`, complete that same remediation Discovery until it is
144
+ `ready_to_materialize`; do not reuse an unrelated Discovery.
145
+ 3. If action is `milestone remediation-materialize`, use its exact Milestone/Task revisions and
146
+ audit binding. The JSON input contains only `discoveryId`, `expectedDiscoveryRevision`, `title`,
147
+ and `predecessorTaskIds`; the predecessor list must exactly equal
148
+ `auditedRemediation.requiredPredecessorTaskIds`. No actor, confirmation code, delegation grant,
149
+ replacement Milestone Plan, or human approval is accepted.
150
+ 4. Run sequential `status` then repository `next`. Core must prioritize the new remediation Task.
151
+ Plan, audit, hand off, implement, review, accept, and merge it normally. At Task execution
152
+ authorization and final acceptance, use the exact `correctiveDerivedApproval.actor` returned by
153
+ fresh `next`; `humanApprovalRequired` must be false. Do not pass a delegation grant.
154
+ 5. After the remediation Task is `merged`, fresh `next` must return the original blocked Task to
155
+ `task plan-set` with `auditedRemediation.state=merged-replan-required`. Replace its rejected Plan,
156
+ record a fresh Risk Audit, use the same current derived approval only when advertised, and
157
+ continue through at least the next ordinary Step boundary.
158
+
159
+ An exact package update may make the approved Knowledge Map stale while this route is active. Continue
160
+ without a Human approval only when fresh `next` includes
161
+ `auditedRemediation.dependencyKnowledgeRefresh.eligible=true`. Core must prove that `package.json` is
162
+ the sole changed Knowledge source, every version surface equals the repository-local runtime, and every
163
+ Git commit that changed the approved manifest content altered only the exact Workflow dependency in
164
+ `package.json`/`package-lock.json`. Do not run standalone reconcile first. The refresh is committed
165
+ atomically by `milestone remediation-materialize` with corrective-derived evidence. Any other Knowledge
166
+ path, classification, gap, conflict, dirty checkout, unaligned version or wider commit returns to the
167
+ ordinary explicit Knowledge flow.
168
+
169
+ This is an idempotent, additive topology transition bound to one exact Plan Risk Audit. Dirty Git,
170
+ any lease/transaction/Core operation, a started blocked Task, stale Task/Milestone/audit bindings,
171
+ non-merged or non-exact predecessors, duplicate use of the audit, or any changed Milestone semantic
172
+ field is a hard stop. Generic `stop-escalate` shapes without `auditedRemediation` remain terminal
173
+ user attention. Final Milestone acceptance remains an ordinary human/delegated gate.
174
+
135
175
  When `next` returns top-level `action: task context-refresh`, use only that atomic action for
136
176
  the returned Task/map revisions, actor, and grant. Do not run standalone `project-memory reconcile`
137
177
  first: Core rejects it because it would create a human-approval gap and strand the Task. A
@@ -505,7 +545,8 @@ Plan audit based only on count. Follow fresh `next`: ordinary findings default t
505
545
  `route=replan` is valid only with the exact Plan clause, obstruction, and minimal Plan change
506
546
  retained by Core. A remediation Plan may change implementation Steps but must preserve the Task
507
547
  objective, requirements, and acceptance. Explicit split or stop decisions still stop ordinary
508
- continuation.
548
+ continuation; only an exact Core-advertised audited-remediation route may turn a pre-execution
549
+ `stop-escalate` into additive upstream work.
509
550
 
510
551
  When `next.strictStepReview.recommendedMode` is `external-sealed`, do not launch the nested local
511
552
  reviewer from inside a Codex App sandbox. Run the advertised read-only `task step-review-packet`,
@@ -19,7 +19,7 @@
19
19
  "evidenceHash": { "$ref": "#/$defs/nullableHash" },
20
20
  "headCommit": { "$ref": "#/$defs/nullableHash" },
21
21
  "reason": { "type": "string" },
22
- "authorizationMode": { "enum": ["human", "delegated"] },
22
+ "authorizationMode": { "enum": ["human", "delegated", "corrective-derived"] },
23
23
  "delegation": { "$ref": "#/$defs/delegation" },
24
24
  "mechanicalFeasibility": { "$ref": "#/$defs/mechanicalFeasibility" }
25
25
  },
@@ -30,6 +30,13 @@
30
30
  "required": ["authorizationMode"]
31
31
  },
32
32
  "then": { "required": ["delegation"] }
33
+ },
34
+ {
35
+ "if": {
36
+ "properties": { "authorizationMode": { "const": "corrective-derived" } },
37
+ "required": ["authorizationMode"]
38
+ },
39
+ "then": { "not": { "required": ["delegation"] } }
33
40
  }
34
41
  ],
35
42
  "$defs": {
@@ -91,7 +98,7 @@
91
98
  "required": ["analyzerId", "analyzerVersion"],
92
99
  "properties": {
93
100
  "analyzerId": {
94
- "enum": ["wf2.root-npm-script", "wf2.exact-output-path", "wf2.exact-predecessor-path"]
101
+ "enum": ["wf2.root-npm-script", "wf2.root-npm-script-arguments", "wf2.check-support-anchor", "wf2.exact-output-path", "wf2.exact-predecessor-path"]
95
102
  },
96
103
  "analyzerVersion": { "const": 1 }
97
104
  }
@@ -104,7 +111,7 @@
104
111
  ],
105
112
  "properties": {
106
113
  "analyzerId": {
107
- "enum": ["wf2.root-npm-script", "wf2.exact-output-path", "wf2.exact-predecessor-path"]
114
+ "enum": ["wf2.root-npm-script", "wf2.root-npm-script-arguments", "wf2.check-support-anchor", "wf2.exact-output-path", "wf2.exact-predecessor-path"]
108
115
  },
109
116
  "analyzerVersion": { "const": 1 },
110
117
  "result": { "enum": ["pass", "blocked", "unverified"] },
@@ -49,10 +49,30 @@
49
49
  "if": { "properties": { "triggeringAttemptCount": { "const": 2 } }, "required": ["triggeringAttemptCount"] },
50
50
  "then": {
51
51
  "required": ["recoveryBasis", "planIntegrityEvidence"],
52
- "properties": { "decision": { "const": "replan-required" } }
52
+ "properties": { "decision": { "enum": ["continue-fix", "replan-required"] } }
53
+ }
54
+ },
55
+ {
56
+ "if": { "required": ["recoveryBasis"] },
57
+ "then": {
58
+ "required": ["planIntegrityEvidence"]
59
+ },
60
+ "else": { "not": { "required": ["planIntegrityEvidence"] } }
61
+ },
62
+ {
63
+ "if": {
64
+ "properties": {
65
+ "planIntegrityEvidence": {
66
+ "properties": { "kind": { "enum": ["check-support-anchor-outside-allowed-writes", "failed-check-component-owner-outside-allowed-writes"] } },
67
+ "required": ["kind"]
68
+ }
69
+ },
70
+ "required": ["planIntegrityEvidence"]
53
71
  },
72
+ "then": { "properties": { "decision": { "const": "continue-fix" } } },
54
73
  "else": {
55
- "not": { "anyOf": [{ "required": ["recoveryBasis"] }, { "required": ["planIntegrityEvidence"] }] }
74
+ "if": { "required": ["recoveryBasis"] },
75
+ "then": { "properties": { "decision": { "const": "replan-required" } } }
56
76
  }
57
77
  },
58
78
  {
@@ -74,13 +94,16 @@
74
94
  "items": { "type": "string", "minLength": 1 }
75
95
  },
76
96
  "planIntegrityEvidence": {
77
- "type": "object",
78
- "additionalProperties": false,
79
- "required": [
80
- "kind", "taskRevision", "remediationEventId", "remediationEventHash",
81
- "manifestPath", "manifestHash", "gitHead", "stepDefinitionHash",
82
- "missingScripts", "checkCommands", "changedFiles", "conflictHash"
83
- ],
97
+ "oneOf": [
98
+ { "$ref": "#/$defs/planIntegrityEvidenceV1" },
99
+ { "$ref": "#/$defs/planIntegrityEvidenceV2" },
100
+ { "$ref": "#/$defs/planIntegrityEvidenceV3" },
101
+ { "$ref": "#/$defs/planIntegrityEvidenceV4" }
102
+ ]
103
+ },
104
+ "planIntegrityEvidenceV1": {
105
+ "type": "object", "additionalProperties": false,
106
+ "required": ["kind", "taskRevision", "remediationEventId", "remediationEventHash", "manifestPath", "manifestHash", "gitHead", "stepDefinitionHash", "missingScripts", "checkCommands", "changedFiles", "conflictHash"],
84
107
  "properties": {
85
108
  "kind": { "const": "missing-npm-script-outside-allowed-writes" },
86
109
  "taskRevision": { "type": "integer", "minimum": 1 },
@@ -95,6 +118,138 @@
95
118
  "changedFiles": { "$ref": "#/$defs/stringList" },
96
119
  "conflictHash": { "$ref": "#/$defs/hash64" }
97
120
  }
121
+ },
122
+ "planIntegrityEvidenceV2": {
123
+ "type": "object", "additionalProperties": false,
124
+ "required": ["kind", "taskRevision", "remediationEvents", "manifestPath", "manifestHash", "gitHead", "stepDefinitionHash", "conflicts", "changedFiles", "conflictHash"],
125
+ "properties": {
126
+ "kind": { "const": "non-executable-npm-check-outside-allowed-writes" },
127
+ "taskRevision": { "type": "integer", "minimum": 1 },
128
+ "remediationEvents": {
129
+ "type": "array", "minItems": 1,
130
+ "items": {
131
+ "type": "object", "additionalProperties": false,
132
+ "required": ["eventId", "eventHash", "attemptOrdinal"],
133
+ "properties": {
134
+ "eventId": { "type": "string", "minLength": 1 },
135
+ "eventHash": { "$ref": "#/$defs/hash64" },
136
+ "attemptOrdinal": { "type": "integer", "minimum": 1 }
137
+ }
138
+ }
139
+ },
140
+ "manifestPath": { "const": "package.json" },
141
+ "manifestHash": { "$ref": "#/$defs/nullableHash64" },
142
+ "gitHead": { "$ref": "#/$defs/gitOid" },
143
+ "stepDefinitionHash": { "$ref": "#/$defs/hash64" },
144
+ "conflicts": {
145
+ "type": "array", "minItems": 1,
146
+ "items": {
147
+ "type": "object", "additionalProperties": false,
148
+ "required": ["reasonCode", "script", "command", "scriptCommand", "runnerPath", "runnerHash"],
149
+ "properties": {
150
+ "reasonCode": { "enum": ["MISSING_NPM_SCRIPT", "REQUIRED_SELECTOR_MISSING"] },
151
+ "script": { "type": "string", "minLength": 1 },
152
+ "command": { "type": "string", "minLength": 1 },
153
+ "scriptCommand": { "type": ["string", "null"] },
154
+ "runnerPath": { "type": ["string", "null"] },
155
+ "runnerHash": { "$ref": "#/$defs/nullableHash64" }
156
+ }
157
+ }
158
+ },
159
+ "changedFiles": { "$ref": "#/$defs/stringList" },
160
+ "conflictHash": { "$ref": "#/$defs/hash64" }
161
+ }
162
+ },
163
+ "planIntegrityEvidenceV3": {
164
+ "type": "object", "additionalProperties": false,
165
+ "required": ["kind", "taskRevision", "remediationEvents", "manifestPath", "manifestHash", "gitHead", "stepDefinitionHash", "conflicts", "scopeExtensions", "changedFiles", "conflictHash"],
166
+ "properties": {
167
+ "kind": { "const": "check-support-anchor-outside-allowed-writes" },
168
+ "taskRevision": { "type": "integer", "minimum": 1 },
169
+ "remediationEvents": {
170
+ "type": "array", "minItems": 1,
171
+ "items": {
172
+ "type": "object", "additionalProperties": false,
173
+ "required": ["eventId", "eventHash", "attemptOrdinal"],
174
+ "properties": {
175
+ "eventId": { "type": "string", "minLength": 1 },
176
+ "eventHash": { "$ref": "#/$defs/hash64" },
177
+ "attemptOrdinal": { "type": "integer", "minimum": 1 }
178
+ }
179
+ }
180
+ },
181
+ "manifestPath": { "const": "package.json" },
182
+ "manifestHash": { "$ref": "#/$defs/nullableHash64" },
183
+ "gitHead": { "$ref": "#/$defs/gitOid" },
184
+ "stepDefinitionHash": { "$ref": "#/$defs/hash64" },
185
+ "conflicts": {
186
+ "type": "array", "minItems": 1,
187
+ "items": {
188
+ "type": "object", "additionalProperties": false,
189
+ "required": ["reasonCode", "script", "command", "scriptCommand", "runnerPath", "runnerHash", "supportPath", "supportHash", "importSpecifier", "expectedOutputPaths", "anchoredMigrationNames"],
190
+ "properties": {
191
+ "reasonCode": { "const": "CHECK_SUPPORT_ANCHOR_OUTSIDE_ALLOWED_WRITES" },
192
+ "script": { "type": "string", "minLength": 1 },
193
+ "command": { "type": "string", "minLength": 1 },
194
+ "scriptCommand": { "type": "string", "minLength": 1 },
195
+ "runnerPath": { "type": "string", "minLength": 1 },
196
+ "runnerHash": { "$ref": "#/$defs/hash64" },
197
+ "supportPath": { "type": "string", "minLength": 1 },
198
+ "supportHash": { "$ref": "#/$defs/hash64" },
199
+ "importSpecifier": { "type": "string", "minLength": 1 },
200
+ "expectedOutputPaths": { "$ref": "#/$defs/stringList", "minItems": 1 },
201
+ "anchoredMigrationNames": { "$ref": "#/$defs/stringList", "minItems": 1 }
202
+ }
203
+ }
204
+ },
205
+ "scopeExtensions": { "$ref": "#/$defs/stringList", "minItems": 1 },
206
+ "changedFiles": { "$ref": "#/$defs/stringList" },
207
+ "conflictHash": { "$ref": "#/$defs/hash64" }
208
+ }
209
+ },
210
+ "planIntegrityEvidenceV4": {
211
+ "type": "object", "additionalProperties": false,
212
+ "required": ["kind", "taskRevision", "remediationEvents", "gitHead", "stepDefinitionHash", "semanticBoundaryHash", "failedCheckCauseFingerprint", "conflicts", "scopeExtensions", "changedFiles", "conflictHash"],
213
+ "properties": {
214
+ "kind": { "const": "failed-check-component-owner-outside-allowed-writes" },
215
+ "taskRevision": { "type": "integer", "minimum": 1 },
216
+ "remediationEvents": {
217
+ "type": "array", "minItems": 1,
218
+ "items": {
219
+ "type": "object", "additionalProperties": false,
220
+ "required": ["eventId", "eventHash", "attemptOrdinal"],
221
+ "properties": {
222
+ "eventId": { "type": "string", "minLength": 1 },
223
+ "eventHash": { "$ref": "#/$defs/hash64" },
224
+ "attemptOrdinal": { "type": "integer", "minimum": 1 }
225
+ }
226
+ }
227
+ },
228
+ "gitHead": { "$ref": "#/$defs/gitOid" },
229
+ "stepDefinitionHash": { "$ref": "#/$defs/hash64" },
230
+ "semanticBoundaryHash": { "$ref": "#/$defs/hash64" },
231
+ "failedCheckCauseFingerprint": { "$ref": "#/$defs/hash64" },
232
+ "conflicts": {
233
+ "type": "array", "minItems": 1,
234
+ "items": {
235
+ "type": "object", "additionalProperties": false,
236
+ "required": ["reasonCode", "command", "runnerPath", "ownerPath", "ownerHash", "importChain", "diagnosticPath", "componentRoot"],
237
+ "properties": {
238
+ "reasonCode": { "const": "FAILED_CHECK_COMPONENT_OWNER_OUTSIDE_ALLOWED_WRITES" },
239
+ "command": { "type": "string", "minLength": 1 },
240
+ "runnerPath": { "type": "string", "minLength": 1 },
241
+ "ownerPath": { "type": "string", "minLength": 1 },
242
+ "ownerHash": { "$ref": "#/$defs/hash64" },
243
+ "importChain": { "$ref": "#/$defs/stringList", "minItems": 2 },
244
+ "diagnosticPath": { "type": "string", "minLength": 1 },
245
+ "componentRoot": { "type": "string", "minLength": 1 }
246
+ }
247
+ }
248
+ },
249
+ "scopeExtensions": { "$ref": "#/$defs/stringList", "minItems": 1 },
250
+ "changedFiles": { "$ref": "#/$defs/stringList" },
251
+ "conflictHash": { "$ref": "#/$defs/hash64" }
252
+ }
98
253
  }
99
254
  }
100
255
  }