codex-workflow-v2 2.0.0-beta.12.3 → 2.0.0-beta.12.5

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 (34) hide show
  1. package/README.md +18 -4
  2. package/dist/src/alpha6/downstream-proof.d.ts +29 -0
  3. package/dist/src/alpha6/downstream-proof.js +249 -0
  4. package/dist/src/alpha6/downstream-proof.js.map +1 -0
  5. package/dist/src/alpha7/corrective-recovery.js +37 -15
  6. package/dist/src/alpha7/corrective-recovery.js.map +1 -1
  7. package/dist/src/cli.js +10 -0
  8. package/dist/src/cli.js.map +1 -1
  9. package/dist/src/contracts.d.ts +19 -0
  10. package/dist/src/git.js +1 -0
  11. package/dist/src/git.js.map +1 -1
  12. package/dist/src/version.d.ts +1 -1
  13. package/dist/src/version.js +1 -1
  14. package/dist/src/workflow.d.ts +5 -0
  15. package/dist/src/workflow.js +152 -3
  16. package/dist/src/workflow.js.map +1 -1
  17. package/docs/autonomy-guardrails.md +25 -1
  18. package/docs/decisions.md +6 -0
  19. package/docs/development-flow.md +12 -0
  20. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  21. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  22. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  23. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +26 -7
  24. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +24 -8
  25. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +35 -11
  26. package/docs/release.md +9 -1
  27. package/docs/updating-existing-project.md +6 -1
  28. package/docs/validation-report.md +84 -80
  29. package/package.json +1 -1
  30. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
  31. package/plugins/codex-workflow-gateway/references/protocol.md +20 -1
  32. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +30 -1
  33. package/schemas/downstream-proof-invalidation-event.schema.json +70 -0
  34. package/schemas/task.schema.json +5 -0
@@ -1,97 +1,101 @@
1
- # V2 beta.12.3 Validation Report
1
+ # V2 beta.12.5 Validation Report
2
2
 
3
- Release candidate `2.0.0-beta.12.3` was validated on 2026-08-28 (Europe/Moscow) with
3
+ Release candidate `2.0.0-beta.12.5` was validated on 2026-08-29 (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 committed lockfile with 0 reported vulnerabilities.
9
- - The final `npm run validate` passed typecheck and `326/326` sequential tests with no failures,
10
- skips, cancellations, or todos in 1,360,950.996834 ms.
11
- - The suite includes the new beta.12.3 two-update stop-override replay, the beta.12.2 direct-rebind
12
- replay, unchanged-Plan stop override, five-cycle continuable remediation, generic stale-decision
13
- recovery, credential safety, dependency provenance, Signal T04, P01-A, P04-A, transaction,
14
- observer-purity, and transition-model regressions.
15
- - `npm run pack:check` produced `codex-workflow-v2-2.0.0-beta.12.3.tgz` with 270 files,
16
- package size 976.2 kB, unpacked size 3.9 MB, and SHA-1
17
- `ceb2ef4c7b076b9ae01a09127d05b867d101bfb1`. The sandboxed npm-cache attempt failed with
18
- `EPERM`; the authorized retry using the same source passed.
19
- - `npm run smoke:downstream` packed and installed the beta.12.3 tarball in an empty temporary
20
- project and passed the packaged handshake. The sandboxed attempt could not resolve the npm
21
- registry for AJV; the authorized network retry using the same source passed.
22
- - `npm run plugin:check`, the official Codex plugin validator, the gateway skill validator,
23
- `npm run docs:pdf:check`, exact `RELEASE_TAG=v2.0.0-beta.12.3 npm run release:check`, and
24
- `git diff --check` passed. The bundled gateway cachebuster is
25
- `0.1.0+codex.20260827231109`.
8
+ - The pre-install `npm run validate` passed typecheck and `332/332` sequential tests with no
9
+ failures, skips, cancellations, or todos in 1,313,147.293583 ms.
10
+ - `npm ci` then completed from the lockfile with 0 reported vulnerabilities. The clean-install
11
+ `npm run validate` independently passed the same `332/332` tests in 1,312,649.239333 ms.
12
+ - A final credential-recovery review then added one mapping and one regression test for an eligible
13
+ claimed C1 recovery whose writer lease is absent. Post-change typecheck and the focused
14
+ downstream-proof, CLI-help, and lifecycle-model suite passed `15/15`; the final full
15
+ `npm run validate` passed `333/333` tests with no failures, skips, cancellations, or todos in
16
+ 1,321,160.33825 ms.
17
+ - The suite covers the beta.12.5 downstream-proof recovery, exact lifecycle inventory, C1 yield,
18
+ one-writer concurrency, transaction crash boundaries, tampered sidecars, unrelated dirty files,
19
+ ordinary active-Step completion, existing Signal T04 recovery, dependency DAG, observer purity,
20
+ credential secrecy, corrective replay, and Milestone validation/acceptance.
21
+ - `npm run pack:check` built the exact beta.12.5 package: 274 files, 995.1 kB packed and 3.9 MB
22
+ unpacked. The first sandboxed attempt could not write the user npm cache (`EPERM`); the exact
23
+ authorized retry passed and included the new runtime module and public schema.
24
+ - `npm run smoke:downstream` packed and installed the tarball in a disposable consumer project and
25
+ returned `ok=true`. The sandboxed attempt could not resolve the npm registry (`ENOTFOUND`); the
26
+ exact network-authorized retry passed.
27
+ - `npm run plugin:check`, `npm run docs:pdf:check`, exact
28
+ `RELEASE_TAG=v2.0.0-beta.12.5 npm run release:check`, and `git diff --check` passed. The bundled
29
+ gateway cachebuster remains `0.1.0+codex.20260828064343`.
26
30
 
27
- ## beta.12.3 chained compatibility transition
31
+ ## Root cause and bounded correction
28
32
 
29
- - beta.12.2 handled one direct Knowledge-only Plan rebind after an already applied beta.11
30
- attempt-four stop override. It did not handle the second normal update/context-refresh cycle
31
- created while installing beta.12.2 into Signal. That limitation caused the next blocker.
32
- - Core now accepts an arbitrary contiguous append-only chain from the override-bound Plan to the
33
- current Plan only when every adjacent Plan differs solely by Knowledge Map binding and every
34
- adjacent Plan Risk Audit is an exact mechanical rebound. Rebind endpoints, delegated authority,
35
- active grants, and event chronology must align at every hop.
36
- - Git HEAD may advance across that chain only through registered dependency-provenance recovery
37
- records. Every intervening commit must be a single-parent commit in the exact ancestor chain,
38
- must be listed in Workflow system commits, must have exactly one matching Task recovery record,
39
- and may change only `package.json` and `package-lock.json` for `codex-workflow-v2`.
40
- - Fresh `next` returns `task run` with validated stop-override context-rebind evidence only after
41
- all of those checks pass. A lost writer credential still routes through the existing exact
42
- claimant `task writer-credential-replace` recovery. The fourth and later attempts remain
43
- corrective and use the normal strict-review cycle.
44
- - The route is append-only: it rewrites no stop, override, Plan, audit, authorization, dependency,
45
- or recovery evidence. Semantic Plan drift, missing or forked history, product-file changes,
46
- mismatched recovery metadata, stale delegation, malformed chronology, or sidecar corruption
47
- fails closed and routes to diagnostics.
33
+ - A downstream executable proof can demonstrate that a completed predecessor Step must change.
34
+ The existing navigation still advertised `task step-complete`, but that command correctly
35
+ rejected predecessor-owned dirty files. Repeating the command or increasing remediation attempts
36
+ could not solve the authority contradiction: predecessor completion evidence remained canonical
37
+ while the proof required changing its output.
38
+ - beta.12.5 adds `task downstream-proof-recover`. It is advertised only when every dirty file
39
+ outside the active Step belongs to a completed transitive predecessor, Task branch/Plan/history
40
+ bindings are exact, the active Step has no completion evidence, and the Task uses a local
41
+ workspace. Unrelated files, damaged history, a branch mismatch, a malformed audit journal, or an
42
+ unregistered commit fail closed to `doctor`.
43
+ - One crash-recoverable project transaction preserves worktree bytes and HEAD, append-only records
44
+ `downstream-proof-invalidations.jsonl`, moves invalidated product commits to historical
45
+ `invalidatedStepCommits`, clears stale Step/review/execution authority, yields claimed C1, removes
46
+ the writer lease, and returns the same Task to ordinary `task plan-set`.
47
+ - No completed-Step adoption or synthetic replacement Task is performed. The replacement Plan must
48
+ re-cover the unfinished proof and invalidated predecessor work, then pass normal audit,
49
+ authorization, execution, and review again.
48
50
 
49
- ## Exact Signal compatibility proof
51
+ ## Exact Signal read-only proof
50
52
 
51
- - A read-only invocation of the final built beta.12.3 validator inspected the current Workflow
52
- state for Signal Task `TASK-01M0WXJAD4GZGVNRJ284ND95C6`, failed Step
53
- `STEP-001-PROCESSING-MIGRATIONS`, and repository
54
- `/Users/home-pc/htdocs/projects/signal_v4`.
55
- - The validator accepted Task revision 21, the applied stop override
56
- `SOO-01M127VPRC5M5F3E3K7PS4MFJY`, three Knowledge rebinds in total, the two rebinds after the
57
- stop boundary, and two registered dependency-provenance recovery records. The current Plan hash
58
- was `8ab0b643cbdcb045776ede231262fdaf8bd0968c2c5fe8967142bfcb8171ae79` and the stable semantic
59
- Plan hash was `b99a34ec86ad6340c1abd1b5e78e10c7996aa774ef58eeb9dacbcea72fd2698f`.
60
- - This proves that the exact state which beta.12.2 rejected is accepted by beta.12.3 without
61
- changing Signal. It does not prove future product implementation or review success.
53
+ - The final built beta.12.5 classifier inspected Signal repository
54
+ `/Users/home-pc/htdocs/projects/signal_v4`, project
55
+ `b06d0f18f790f4521a23c770`, and Task
56
+ `TASK-01M0WXJAD4GZGVNRJ284ND95C6` without mutating repository or Workflow state.
57
+ - Persisted Task revision is 103 on branch
58
+ `codex/task-01m0wxjad4-processing-persistence-schema`; active Step is
59
+ `STEP-002-REAL-POSTGRES-PROOF`. HEAD is
60
+ `88f8bf70d1591852ad90c976625430d4f20585ac`.
61
+ - The classifier observed six dirty files. Five are outside the active Step and are owned by the
62
+ completed transitive predecessor `STEP-001-PROCESSING-MIGRATIONS`; the sixth,
63
+ `tools/postgres/run-processing-integration.ts`, belongs to the active proof Step. The predecessor
64
+ evidence commit equals the preserved HEAD.
65
+ - The result was `applicable=true`, `eligible=true`, with no blockers. This proves that the exact
66
+ current Signal boundary has a bounded beta.12.5 transition. It does not prove that the replacement
67
+ Plan, product checks, strict review, or the remainder of Milestone 3 will pass.
62
68
 
63
- ## Packaged and transcript evidence
69
+ ## Sandbox-boundary prevention
64
70
 
65
- - Downstream smoke validated exact package resolution and the packaged beta.12.3 handshake in a
66
- clean disposable installation.
67
- - A temporary trusted-harness transcript recorded the final built `gateway handshake` invocation
68
- and its successful beta.12.3 result. `node scripts/validate-lifecycle-transcript.mjs` accepted
69
- both post-provenance events. The log SHA-256 is
70
- `7d65fd9fc6301205094284c1fd4236665dff1876d11e01bbc63e35e3a4e3c34b`; the temporary log remains
71
- outside the repository.
71
+ - The bundled gateway now classifies Docker socket/CLI `EPERM`, `operation not permitted`, and
72
+ `permission denied` from a sandbox as an execution-boundary failure, not evidence that the daemon,
73
+ image, or product infrastructure is broken.
74
+ - It permits one exact escalated read-only probe or Plan check without consuming a remediation or
75
+ infrastructure retry. Docker Desktop restart, daemon mutation, or image substitution still
76
+ requires separate authority and an actual escalated daemon failure.
77
+ - Plugin validation pins this guidance. The release gates exercised analogous npm cache/network
78
+ sandbox boundaries, but no live Docker daemon failure was synthesized; Docker runtime behavior is
79
+ therefore documentation/gateway-contract evidence, not an end-to-end Docker test claim.
72
80
 
73
- The transcript proves release-time invocation/result discipline for the final CLI. It does not
74
- claim a product Milestone replay or lifecycle mutation. Compatibility is covered by the exact
75
- Signal read-only proof and deterministic integration tests above.
81
+ ## beta.12.5 PDF release documentation evidence
76
82
 
77
- ## beta.12.3 PDF release documentation evidence
78
-
79
- - Three tracked Russian PDFs were deterministically regenerated from reviewable Markdown sources
80
- under `docs/pdf/sources`; `npm run docs:pdf:check` reported an empty stale set.
81
- - All 25 final pages were rendered and visually inspected: architecture is 7 pages, the delegated
82
- chat-only guide is 8 pages, and the technical reference is 10 pages. No blank, clipped,
83
- overlapping, or orphaned final page was found.
84
- - Visible titles, headers, package commands, and release gates identify beta.12.3. The documents
85
- distinguish a direct rebind from the new chained compatibility route and state its fail-closed
86
- dependency-provenance boundary.
83
+ - Three tracked Russian PDFs were regenerated from Markdown sources; `npm run docs:pdf:check`
84
+ reported an empty stale set.
85
+ - All 27 pages were rendered and visually inspected: architecture is 7 pages, the delegated
86
+ chat-only guide is 9 pages, and the technical reference is 11 pages. The changed recovery,
87
+ Docker-boundary, command-surface, and release pages have no visible clipping, overlap, or
88
+ unreadable content.
89
+ - Visible titles, headers, commands, capabilities, and release gates identify beta.12.5.
87
90
 
88
91
  ## Existing boundaries and non-claims
89
92
 
90
- - The generic stale `continue-fix` recovery predicate is unchanged. The compatibility route does
91
- not relax semantic stop reversal or authorize arbitrary Git history.
92
- - Structural replacement remains intentionally disabled. beta.12.3 does not implement P04-B,
93
+ - Structural replacement remains intentionally disabled. beta.12.5 does not implement P04-B,
93
94
  topology rewiring, completed-Step adoption, or a wider delegation surface.
94
- - Validation performed no Signal mutation, npm publication, Git tag, remote push, or local plugin
95
- reinstall. Tagging and push are separate release actions after these gates.
96
- - A consumer must install the published exact beta.12.3 package, update/reinstall the bundled
97
- gateway, and use fresh project-local `handshake -> doctor -> status -> next` navigation.
95
+ - Recovery requires exact one-writer/C1 authority and a fresh `next`; it does not authorize manual
96
+ state edits, arbitrary Git history, unrelated dirty files, or automatic approval.
97
+ - Validation performed no Signal mutation, npm publication, Git commit, tag, remote push, or local
98
+ plugin reinstall. Those remain separate release actions.
99
+ - A consumer must install the published exact beta.12.5 package, reinstall the bundled gateway, and
100
+ follow fresh project-local `handshake -> doctor -> status -> next` navigation before invoking the
101
+ advertised recovery.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.12.3",
3
+ "version": "2.0.0-beta.12.5",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-gateway",
3
- "version": "0.1.0+codex.20260827231109",
3
+ "version": "0.1.0+codex.20260828064343",
4
4
  "description": "Thin personal Codex gateway for exact project-local Codex Workflow V2 packages and codebase-memory-mcp.",
5
5
  "author": {
6
6
  "name": "Codex Workflow Maintainers"
@@ -1,6 +1,6 @@
1
1
  # Gateway Protocol V2
2
2
 
3
- ## beta.12.3 compatibility transitions and continuable remediation
3
+ ## beta.12.5 compatibility transitions and continuable remediation
4
4
 
5
5
  - When fresh `next` advertises `task plan-integrity-recover`, consume its exact Task revision,
6
6
  Step, actor, and writer-token contract. This route is valid only for the Core-derived
@@ -8,6 +8,13 @@
8
8
  It records a replan posture without changing Plan or product files; corrective yield and the
9
9
  existing state-bound corrective-replan Human gate remain mandatory.
10
10
 
11
+ - When fresh `next` advertises `task downstream-proof-recover`, Core has proved that every dirty
12
+ file outside the active Step belongs to a completed transitive predecessor and that recorded Git
13
+ history is intact. Invoke the exact lease-bound transition once. It preserves product files and
14
+ HEAD, invalidates stale predecessor completion authority with an append-only event, yields C1,
15
+ and routes the same Task to ordinary `task plan-set`. The replacement Plan, risk audit, and
16
+ execution authorization are fresh authority; no Task or Milestone recreation is involved.
17
+
11
18
  - `update dependency-provenance-preflight --id <TASK-ID>` is read-only. The matching
12
19
  `update dependency-provenance-recover --id <TASK-ID> --expected-revision <N> --actor <ACTOR>
13
20
  --reason <TEXT>` is valid only when preflight and fresh `next` both advertise it. Historical
@@ -27,6 +34,9 @@
27
34
  intervening commit is an exact registered dependency-provenance recovery changing only
28
35
  `package.json` and `package-lock.json`. If C1 remains claimed but the lease was lost at the Human
29
36
  boundary, use only the simultaneously advertised `task writer-credential-replace` action.
37
+ A provenance recovery recorded after the final context-refresh audit may explain exactly one
38
+ additional Task revision only when it belongs to that verified Git chain. Any unexplained
39
+ revision remains a `doctor` boundary.
30
40
  - `milestone progress --id <MS-ID>` is a read-only projection and the sole source for Coordinator
31
41
  progress tables. It preserves cancelled/replacement Tasks as distinct membership rows.
32
42
  - `scripts/chat-registry.mjs` atomically allocates project-monotonic `#NNN`, builds all six title
@@ -66,6 +76,7 @@ Current capability set:
66
76
  - `legacy-stop-escalate-override-v1`
67
77
  - `stop-override-context-rebind-v1`
68
78
  - `stop-override-context-rebind-chain-v1`
79
+ - `stop-override-post-audit-dependency-revision-v1`
69
80
  - `retained-reviewed-history-recovery-v1`
70
81
  - `milestone-progress-projection-v1`
71
82
  - `strict-reviewer-v1`
@@ -96,6 +107,7 @@ Current capability set:
96
107
  - `remediation-mode-recovery-v1`
97
108
  - `plan-proof-obligations-v1`
98
109
  - `bounded-plan-integrity-recovery-v1`
110
+ - `downstream-proof-predecessor-recovery-v1`
99
111
  - `corrective-yield-journal-v1`
100
112
  - `corrective-replan-journal-v1`
101
113
  - `corrective-replan-human-gate-v1`
@@ -171,6 +183,13 @@ actor through `--actor`; reviewer identity remains internal to the route.
171
183
  An unrecorded commit is Git history drift. Stop instead of adding another commit or editing
172
184
  workflow state manually; recovery remains coordinator-controlled.
173
185
 
186
+ If a Docker proof fails with `EPERM`, `operation not permitted`, or `permission denied` at the
187
+ Docker socket/CLI boundary, classify it as sandbox access, not daemon failure. Re-run the exact
188
+ read-only health probe or Plan command once with sandbox escalation; do not charge an infrastructure
189
+ retry. Restarting Docker Desktop or pulling another image is forbidden on this evidence alone. A
190
+ Docker infrastructure failure exists only when an escalated call reaches Docker and independently
191
+ proves the daemon unavailable.
192
+
174
193
  ## Plan Risk Audit and remediation breaker
175
194
 
176
195
  Before `task authorize`, every new alpha.7 Task requires:
@@ -67,6 +67,20 @@ active writer token when the C1 contract requires it. The recovery records only
67
67
  `task run` merely to manufacture the second failure, and never invoke this recovery for a generic
68
68
  test failure, a writable manifest, or unconfined changes.
69
69
 
70
+ When fresh `next` advertises `task downstream-proof-recover`, the active proof Step has produced
71
+ uncommitted files inside its own `allowedWrites` and has also exposed required changes owned by one
72
+ or more completed transitive predecessor Steps. Do not invoke `task step-complete`: its scope is
73
+ known to be stale. Use only the exact returned Task revision, claimant/lease actor, writer-token
74
+ contract, and a substantive reason. The atomic recovery preserves the worktree and HEAD, moves the
75
+ predecessor completion commits into historical `invalidatedStepCommits`, clears only the invalidated
76
+ completion evidence, blocks the active proof Step, supersedes execution authorization, appends
77
+ `downstream-proof-invalidations.jsonl`, releases C1/lease authority, and returns the same Task to
78
+ ordinary `task plan-set`. Build the replacement Plan from the full unfinished remainder, attach a
79
+ fresh Plan Risk Audit, then obtain fresh execution authorization. Never use this route for an
80
+ unrelated dirty file, a non-predecessor file, unregistered Git history, strict-review evidence, or
81
+ without explicit fresh `next` eligibility. Do not reset, stash, commit, or recreate the Task or
82
+ Milestone around this transition.
83
+
70
84
  If any step fails, report the concrete diagnostic. Do not load workflow
71
85
  semantics from this skill.
72
86
 
@@ -109,7 +123,7 @@ command shape or consuming a replacement Discovery. Never rebind, refresh, repla
109
123
  resume, cancel, or manually replace the historical Task. Continue only after a later P04-B/P05
110
124
  package explicitly advertises a topology-preserving replacement capability.
111
125
 
112
- When beta.12.3 `next` advertises `task stop-override-prepare`, the route is limited to the exact
126
+ When beta.12.5 `next` advertises `task stop-override-prepare`, the route is limited to the exact
113
127
  beta.11 attempt-four policy stop: two ordinary failures, one corrective failure, a matching
114
128
  attempt-3 `continue-fix`, and a matching attempt-4 `stop-escalate` under the unchanged Plan. Invoke
115
129
  prepare with the exact Task/Step/revision, explicit human actor, and user-supplied reason. It is
@@ -130,6 +144,10 @@ commit as registered dependency-only provenance. If C1 remains claimed but the l
130
144
  the Human boundary, first use the simultaneously advertised `task writer-credential-replace`
131
145
  action for the exact claimant. A doctor route, semantic Plan drift, an unregistered or non-dependency
132
146
  commit, missing delegated authority, a broken chain, or damaged chronology is a hard stop.
147
+ When advertised navigation records dependency provenance after the final context-refresh audit,
148
+ Core may account for exactly one Task revision per ordered verified recovery. Never infer this
149
+ compatibility from revision arithmetic alone: continue only when fresh `next` returns the validated
150
+ `task run` route. An unrelated extra revision remains a hard stop.
133
151
 
134
152
  When `next` returns `milestone initial-assembly`, execution is unavailable. Follow only the
135
153
  advertised `linked-task-assembly.commands` (`discovery start` and `discovery materialize`) until all
@@ -151,6 +169,17 @@ For `task start`, the policy applies only when choosing `--workspace-owner local
151
169
  `task step-complete`, `task merge`, and `task sync-base`, the advertised transition itself
152
170
  writes Git metadata.
153
171
 
172
+ Treat Docker access diagnostics before classifying an infrastructure failure. `EPERM`,
173
+ `operation not permitted`, or `permission denied` while opening the Docker socket or invoking the
174
+ Docker CLI from a sandbox means the proof is unavailable at the current execution boundary; it is
175
+ not evidence that the daemon or image is broken. Re-run the exact read-only health probe or exact
176
+ Plan check once with the required sandbox escalation. This escalation rerun does not consume a
177
+ Workflow remediation attempt or a local infrastructure retry. Only an escalated probe that reaches
178
+ Docker and reports an unavailable daemon may be classified as a Docker infrastructure failure.
179
+ Never start, stop, or restart Docker Desktop, pull a substitute image, or mutate Docker state merely
180
+ because the sandboxed call returned a permission error; those actions require their own explicit
181
+ authorization and evidence.
182
+
154
183
  When `next` includes `writerTokenContract`, treat it as an exact first-call precondition. Retain
155
184
  the active writer lease from the first-field `writerLeaseReceipt` returned by `task run` and pass it using the advertised `option` for that
156
185
  transition. The token is sensitive: never print, summarize, persist, or substitute a redacted
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://codex-workflow.local/schemas/downstream-proof-invalidation-event.schema.json",
4
+ "title": "Codex Workflow V2 Downstream Proof Invalidation Event",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "eventId",
9
+ "taskId",
10
+ "previousTaskRevision",
11
+ "resultTaskRevision",
12
+ "planHash",
13
+ "activeStepId",
14
+ "invalidatedSteps",
15
+ "dirtyFiles",
16
+ "preservedHeadCommit",
17
+ "actor",
18
+ "reason",
19
+ "packageVersion",
20
+ "previousEventHash",
21
+ "recordedAt",
22
+ "eventHash"
23
+ ],
24
+ "properties": {
25
+ "eventId": { "type": "string", "pattern": "^DPI-[0-9A-HJKMNP-TV-Z]{26}$" },
26
+ "taskId": { "$ref": "#/$defs/taskId" },
27
+ "previousTaskRevision": { "type": "integer", "minimum": 1 },
28
+ "resultTaskRevision": { "type": "integer", "minimum": 2 },
29
+ "planHash": { "$ref": "#/$defs/hash64" },
30
+ "activeStepId": { "$ref": "#/$defs/stepId" },
31
+ "invalidatedSteps": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["stepId", "evidenceCommit", "triggerFiles"],
38
+ "properties": {
39
+ "stepId": { "$ref": "#/$defs/stepId" },
40
+ "evidenceCommit": { "$ref": "#/$defs/gitHash" },
41
+ "triggerFiles": {
42
+ "type": "array",
43
+ "uniqueItems": true,
44
+ "items": { "type": "string", "minLength": 1 }
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "dirtyFiles": {
50
+ "type": "array",
51
+ "minItems": 1,
52
+ "uniqueItems": true,
53
+ "items": { "type": "string", "minLength": 1 }
54
+ },
55
+ "preservedHeadCommit": { "$ref": "#/$defs/gitHash" },
56
+ "actor": { "type": "string", "minLength": 1 },
57
+ "reason": { "type": "string", "minLength": 1 },
58
+ "packageVersion": { "type": "string", "minLength": 1 },
59
+ "previousEventHash": { "$ref": "#/$defs/nullableHash64" },
60
+ "recordedAt": { "type": "string", "format": "date-time" },
61
+ "eventHash": { "$ref": "#/$defs/hash64" }
62
+ },
63
+ "$defs": {
64
+ "taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
65
+ "stepId": { "type": "string", "pattern": "^STEP-[0-9]{3}(?:-[A-Z0-9-]+)?$" },
66
+ "gitHash": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
67
+ "hash64": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
68
+ "nullableHash64": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
69
+ }
70
+ }
@@ -55,6 +55,11 @@
55
55
  },
56
56
  "replacementForTaskId": { "type": ["string", "null"], "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
57
57
  "replacedByTaskId": { "type": ["string", "null"], "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
58
+ "invalidatedStepCommits": {
59
+ "type": "array",
60
+ "uniqueItems": true,
61
+ "items": { "type": "string", "pattern": "^[a-f0-9]{40}$" }
62
+ },
58
63
  "dependencyProvenanceRecoveries": {
59
64
  "type": "array",
60
65
  "items": {