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

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 (35) hide show
  1. package/README.md +21 -3
  2. package/dist/src/alpha6/downstream-proof.d.ts +35 -1
  3. package/dist/src/alpha6/downstream-proof.js +310 -2
  4. package/dist/src/alpha6/downstream-proof.js.map +1 -1
  5. package/dist/src/alpha6/plan-risk.js +2 -2
  6. package/dist/src/alpha6/plan-risk.js.map +1 -1
  7. package/dist/src/cli.js +38 -3
  8. package/dist/src/cli.js.map +1 -1
  9. package/dist/src/contracts.d.ts +30 -1
  10. package/dist/src/dependency-provenance.d.ts +2 -2
  11. package/dist/src/dependency-provenance.js +26 -13
  12. package/dist/src/dependency-provenance.js.map +1 -1
  13. package/dist/src/version.d.ts +1 -1
  14. package/dist/src/version.js +1 -1
  15. package/dist/src/workflow.d.ts +9 -2
  16. package/dist/src/workflow.js +380 -33
  17. package/dist/src/workflow.js.map +1 -1
  18. package/docs/autonomy-guardrails.md +7 -0
  19. package/docs/development-flow.md +9 -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 +25 -5
  24. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +22 -7
  25. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +33 -25
  26. package/docs/release.md +9 -1
  27. package/docs/updating-existing-project.md +24 -0
  28. package/docs/validation-report.md +88 -96
  29. package/package.json +2 -1
  30. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
  31. package/plugins/codex-workflow-gateway/references/protocol.md +6 -0
  32. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +25 -0
  33. package/schemas/downstream-proof-invalidation-event.schema.json +1 -0
  34. package/schemas/downstream-proof-replan-recovery-event.schema.json +61 -0
  35. package/schemas/task.schema.json +34 -0
@@ -1,111 +1,103 @@
1
- # V2 beta.12.6 Validation Report
1
+ # V2 beta.12.8 Validation Report
2
2
 
3
- Release candidate `2.0.0-beta.12.6` was validated on 2026-08-29 (Europe/Moscow) with
3
+ Release candidate `2.0.0-beta.12.8` 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
- - The first full `npm run validate` passed typecheck and `335/335` sequential tests with no
9
- failures, skips, cancellations, or todos in 1,461,147.464875 ms.
10
- - `npm ci` then completed from the lockfile with 0 reported vulnerabilities. The clean-install
11
- `npm run validate` independently passed the same `335/335` tests with no failures, skips,
12
- cancellations, or todos in 1,461,906.892 ms.
13
- - The exact Signal T04/downstream recovery gate passed `8/8`. The targeted dependency-provenance,
14
- downstream-proof, CLI-help, and lifecycle-model suite passed `23/23`.
15
- - The positive beta.12.6 fixture proves the complete compatibility sequence: exact active-base and
16
- Task dependency commits, history validation at `HEAD^`, candidate validation at `HEAD`, dirty
17
- content binding, dependency registration, fresh navigation to `task downstream-proof-recover`,
18
- unchanged product bytes, and valid recorded Task history. Negative cases cover unrelated dirty
19
- files, unregistered history, and an active writer lease. Existing Signal T04 tests remain intact.
20
- - `npm run pack:check` built the exact beta.12.6 package: 274 files, 1.0 MB packed and 4.0 MB
21
- unpacked. The first attempt could not write the user npm cache (`EPERM`); the exact retry used an
22
- isolated temporary cache and passed without changing global cache ownership.
8
+ - `npm ci` completed from the exact lockfile with 0 reported vulnerabilities.
9
+ - `npm run validate` passed typecheck and `339/339` sequential tests with no failures, skips,
10
+ cancellations, or todos in 1,700,172.265375 ms.
11
+ - The focused claimed-Task E2E passed independently. It covers sealed passed final review,
12
+ machine-readable `task result-set` writer-token navigation, rejection of a forged token without
13
+ Task/lease mutation, successful Result publication, lease-free `awaiting_final_acceptance`, Human
14
+ acceptance, fresh credential replacement, merge, and terminal lease release.
15
+ - CLI help regression proves that `task result-set` requires `--writer-token` and exposes optional
16
+ `--actor` for the exact C1 claimant.
17
+ - The full suite retained the Signal-shaped downstream replan E2E, Signal T04 retained-review
18
+ recovery, dependency provenance, Plan-integrity recovery, corrective replan, lock hostility,
19
+ transaction crash/recovery, Milestone dependency, strict-review, and credential-confinement gates.
20
+ - `npm run pack:check` built the exact beta.12.8 package with 275 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
23
  - `npm run smoke:downstream` packed and installed the tarball in a disposable consumer project and
24
24
  returned `ok=true`. The sandboxed attempt could not resolve the npm registry (`ENOTFOUND`); the
25
25
  exact network-authorized retry passed.
26
- - `npm run plugin:check`, `npm run docs:pdf:check`, and exact
27
- `RELEASE_TAG=v2.0.0-beta.12.6 npm run release:check` passed. The plugin gate caught one missing
28
- `HEAD^` boundary in the human-facing gateway instructions; that boundary was added and the gate
29
- then passed. The bundled gateway cachebuster is `0.1.0+codex.20260829120000`.
30
-
31
- ## Root cause corrected by beta.12.6
32
-
33
- - beta.12.5 correctly classified the current Signal downstream-proof conflict as recoverable, but
34
- that did not make the release installable. Signal still runs beta.12.4, whose ordinary update
35
- preflight rejects the running Step and dirty product work. Installing beta.12.5 would also advance
36
- dependency manifests/HEAD before that new runtime could register the commit. The advertised
37
- beta.12.5 recovery was therefore unreachable from the actual starting version.
38
- - This is an update authority deadlock, not a need for more review attempts: the old runtime cannot
39
- authorize the dirty update, while the new runtime cannot be reached without an exact update.
40
- - beta.12.6 adds one bounded bridge rather than general dirty-update permission. The active
41
- Milestone base and Task branch must each receive a separate dependency-only commit changing
42
- exactly `package.json` and `package-lock.json`. A fresh beta.12.6 runtime then advertises
43
- `update downstream-proof-dependency-recover` only for the active downstream-proof shape.
44
- - Preflight verifies recorded Task history at `HEAD^`, the exact candidate at `HEAD`, aligned
45
- runtime/declared/locked/installed/current-branch/base versions, one active Step, completed
46
- transitive-predecessor ownership, branch and Plan bindings, no lease, no pending/corrupt
47
- transaction or Core operation, and every dirty path plus SHA-256 content.
48
- - Recovery registers only the dependency candidate in `systemCommits` and records the bound proof
49
- in `dependencyProvenanceRecoveries.activeDownstreamProof`. It does not edit, stash, reset, commit,
50
- or discard product work and does not change Step state. Fresh `next` then prioritizes
51
- `task downstream-proof-recover` over manifest-induced Knowledge refresh.
52
- - The ordinary downstream recovery remains responsible for invalidating stale predecessor
53
- completion authority and returning the same Task to a new Plan, Risk Audit, authorization,
54
- execution, and strict-review cycle. beta.12.6 does not bypass that lifecycle.
55
-
56
- ## Exact Signal read-only evidence
57
-
58
- - The Signal repository `/Users/home-pc/htdocs/projects/signal_v4` was re-observed read-only after
59
- implementation. It remains on branch
60
- `codex/task-01m0wxjad4-processing-persistence-schema` at
61
- `88f8bf70d1591852ad90c976625430d4f20585ac`.
62
- - Its dirty set remains exactly six paths: five modified processing-migration files and one
63
- untracked `tools/postgres/run-processing-integration.ts`. No Signal repository or Workflow state
64
- was mutated during beta.12.6 implementation.
65
- - Prior read-only state inspection identified Task
66
- `TASK-01M0WXJAD4GZGVNRJ284ND95C6`, revision 103, active Step
67
- `STEP-002-REAL-POSTGRES-PROOF`, five files owned by completed transitive predecessor
68
- `STEP-001-PROCESSING-MIGRATIONS`, and one file owned by the active proof Step. The predecessor
69
- evidence commit equals the preserved HEAD.
70
- - The installed beta.12.4 ordinary update preflight returned `safe=false` for the running Step and
71
- dirty checkout. The external beta.12.5 classifier returned `applicable=true`, `eligible=true`, and
72
- no recovery blockers, proving that the product boundary itself is supported but not that the old
73
- update path can reach it.
74
- - The beta.12.6 regression fixture mirrors all six Signal paths and the same predecessor/active-Step
75
- ownership split. It proves the new update bridge and subsequent downstream recovery route under
76
- controlled Git/state mutations.
77
- - This is strong structural and synthetic evidence, not a claim that the published package has
78
- already updated live Signal. The final operational proof still requires the released exact
79
- package, two exact dependency-only transport commits, the advertised preflight/recover, and a
80
- fresh Signal `status -> next` readback.
26
+ - `npm run plugin:check` passed for bundled gateway
27
+ `0.1.0+codex.20260829181421`. The plugin-creator manifest validator and skill quick validator also
28
+ passed using the system Python runtime that provides PyYAML.
29
+ - `npm run docs:pdf:check` reported an empty stale set and exact beta.12.8 package binding.
30
+ - `RELEASE_TAG=v2.0.0-beta.12.8 npm run release:check` and `git diff --check` passed.
31
+
32
+ ## Root cause corrected by beta.12.8
33
+
34
+ `WorkflowService.setTaskResult` previously moved a reviewed Task from `validating` to
35
+ `awaiting_final_acceptance` without accepting the active writer credential and without releasing
36
+ the Task writer lease. Human final acceptance is intentionally unbounded, so an otherwise successful
37
+ Task could wait until the lease expired. Repository-level `next` then truthfully returned
38
+ `repair-required / STALE_WRITER_LEASE` instead of `task accept`.
39
+
40
+ Increasing review or implementation attempts cannot correct this condition. The implementation and
41
+ review had already passed; the defect was ownership lifetime crossing a Human pause.
42
+
43
+ ## Implemented lifecycle contract
44
+
45
+ - `task result-set` now requires the active `--writer-token`; claimed C1 Tasks also pass the exact
46
+ claimant through `--actor`.
47
+ - Core verifies the current revision, passed/fresh review, live writer credential, and C1 mutation
48
+ authority before staging Result.
49
+ - Core releases the exact presented lease before committing the transition to
50
+ `awaiting_final_acceptance`. Human wait time therefore cannot create a new stale lease.
51
+ - Fresh `next` advertises the writer-token contract and bounded credential recovery for
52
+ `task result-set` when needed.
53
+ - `task accept` remains a credential-free Human/delegated approval transition. After acceptance,
54
+ fresh `next` advertises `task writer-credential-replace`; this acquires a new lease for local merge
55
+ or external merge confirmation. The pre-gate token is not reusable.
56
+ - The public handshake exposes `task-human-gate-lease-release-v1`.
57
+
58
+ ## Exact Signal diagnosis evidence
59
+
60
+ At diagnosis time the Signal project `/Users/home-pc/htdocs/projects/signal_v4` was on exact
61
+ beta.12.7 with Task `TASK-01M0WXJAD4GZGVNRJ284ND95C6` at revision 126 and
62
+ `awaiting_final_acceptance`. The Task checkout was clean at
63
+ `f7ba8533314ee27f176968a6314bf3df40285ef2`; Final Task Review was `passed` with no findings.
64
+ The Result hash was `89bbbaaef5d2b454ed7ed0e3d9f57484d36c9d86d596e009a32613701003496e`
65
+ and Evidence hash was `85f3cb5c16e039ebf40971f88a4388fe1812ef37be8d6b195451aa6a73640c54`.
66
+ Repository-level `next` returned only `locks repair` for the expired lease owned by the Task worker.
67
+
68
+ The release process did not mutate Signal state or product files. The legacy lease must first be
69
+ removed through that exact advertised repair route with revision, HEAD, review, Result, and Evidence
70
+ readback. The agent must stop before `task accept`. Only after the repository is lease-free and
71
+ `update preflight` is safe should Signal install beta.12.8 and continue through fresh navigation.
81
72
 
82
73
  ## PDF release documentation evidence
83
74
 
84
- - Three tracked Russian PDFs were regenerated from Markdown sources; `npm run docs:pdf:check`
85
- reported an empty stale set.
86
- - All 27 pages were rendered and visually inspected: architecture is 7 pages (101,761 bytes), the
87
- delegated chat-only guide is 9 pages (107,066 bytes), and the technical reference is 11 pages
88
- (112,132 bytes).
89
- - Visual inspection found table headers rendered dark-on-dark. The shared generator now uses an
90
- explicit white bold header Paragraph style; all documents were regenerated and re-inspected.
91
- Titles, version headers, Cyrillic glyphs, tables, code blocks, recovery instructions, page edges,
92
- and footers have no visible clipping, overlap, or unreadable content.
75
+ - All three tracked Russian PDFs were regenerated from the beta.12.8 Markdown sources.
76
+ - Architecture is 8 pages, the delegated chat-only guide is 9 pages, and the technical reference is
77
+ 11 pages. Every page was rendered to PNG and visually inspected.
78
+ - Titles, version headers, Cyrillic text, tables, code blocks, Human-gate credential sequence,
79
+ release checklist, margins, and page footers have no visible clipping, overlap, orphaned tail page,
80
+ or unreadable content.
93
81
 
94
82
  ## Existing boundaries and non-claims
95
83
 
96
- - Structural replacement remains intentionally disabled. beta.12.6 does not implement P04-B,
84
+ - beta.12.8 prevents new `result-set` transitions from retaining a lease. It does not silently delete
85
+ a stale lease created by beta.12.7 or earlier; legacy state uses explicit `locks repair`.
86
+ - The patch does not auto-accept a Task, bypass final review, widen delegated approval, or turn an
87
+ expired bearer into authority.
88
+ - Protocol version remains 2 and state schema remains 2; no semantic state migration is introduced.
89
+ - Structural replacement remains intentionally disabled. beta.12.8 does not implement P04-B,
97
90
  topology rewiring, completed-Step adoption, or a wider delegation surface.
98
- - The compatibility bridge is limited to the proven active-downstream-proof shape. Unrelated dirty
99
- paths, non-predecessor ownership, unknown history, a wider dependency commit, stale base/version
100
- divergence, branch/Plan/Step mismatch, lease, transaction, or damaged sidecar fails closed.
101
- - Read-only preflight is an observation, not an authorization token. Recover recomputes the current
102
- binding. The stored hash proves which bytes the bridge preserved; subsequent downstream recovery
103
- revalidates paths, ownership, and history, while the replacement Plan and review cover current
104
- content.
105
- - Git transport commits remain agent-executed operations on exact advertised boundaries. The
106
- runtime does not create, amend, merge, reset, or push Git history.
107
- - Validation performed no Signal mutation, npm publication, Git commit, tag, remote push, or local
108
- plugin reinstall. Those are separate release/deployment actions.
109
- - Confidence is high for the implemented source and tested Signal-shaped transition. Confidence in
110
- the final live Signal update remains pending until the published package is installed and the
111
- project-local runtime returns the expected recovery sequence.
91
+ - No append-only real-agent lifecycle log was generated for this maintainer release turn because
92
+ the package Workflow did not orchestrate its own repository mutation. Transcript validator
93
+ semantics remain covered by the complete valid/invalid fixture suite; no synthetic log is
94
+ presented as real evidence.
95
+ - Validation performed no npm publication, Git commit, tag, remote push, Signal dependency update,
96
+ Signal Task acceptance, or local personal-plugin reinstall. Those are separate release/deployment
97
+ actions.
98
+
99
+ Confidence is high for the package implementation, negative credential behavior, complete claimed
100
+ Task continuation, tarball, downstream installation, plugin, and documentation. Confidence that the
101
+ live Signal Milestone will continue is conditional on completing the exact legacy stale-lease repair,
102
+ observing a safe update preflight, installing the published beta.12.8 package, and following fresh
103
+ project-local `status -> next` without skipping the Human gate.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.12.6",
3
+ "version": "2.0.0-beta.12.8",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,6 +44,7 @@
44
44
  "typecheck": "tsc -p tsconfig.json --noEmit",
45
45
  "test": "node scripts/with-validation-lock.mjs test",
46
46
  "test:signal-t04-recovery": "node scripts/with-validation-lock.mjs test-signal-t04",
47
+ "test:signal-t03-replan-e2e": "node scripts/with-validation-lock.mjs test-signal-t03-replan",
47
48
  "validate": "npm run typecheck && npm test",
48
49
  "pack:check": "npm run build && npm pack --dry-run",
49
50
  "smoke:downstream": "npm run build && node scripts/downstream-smoke.mjs",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-gateway",
3
- "version": "0.1.0+codex.20260829120000",
3
+ "version": "0.1.0+codex.20260829181421",
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"
@@ -300,6 +300,12 @@ working memory. In claimed C1 posture, fresh `next` exposes `writerTokenContract
300
300
  pass the receipt token through its declared `--writer-token` option on the first run call. The
301
301
  successful run returns the refreshed writer receipt for later lease-bound transitions.
302
302
 
303
+ `task result-set` is also lease-bound. It requires the active `--writer-token` and the exact C1
304
+ claimant in `--actor` when the Task is claimed. Success releases the lease before the Task enters
305
+ `awaiting_final_acceptance`; the token is no longer valid. The Human gate must therefore remain
306
+ lease-free for an arbitrary amount of time. After acceptance, obtain the new merge credential only
307
+ through the `writerCredentialRecovery` action advertised by fresh `next`.
308
+
303
309
  ## Milestone assembly, autonomy, and human gate
304
310
 
305
311
  During initial planning, materialize every linked Task and then call `milestone plan-set` once
@@ -166,6 +166,21 @@ recovery when required). Any unrelated dirty path, unknown history, wider candid
166
166
  base, version mismatch, lease, transaction, or different route is a hard stop and never authorizes
167
167
  manual external-state edits.
168
168
 
169
+ For the exact beta.12.6 post-recovery knowledge-rebind deadlock, an exact beta.12.7 external runner
170
+ may execute only the read-only `update downstream-proof-replan-update-preflight` before dependency
171
+ transport. Require `eligible=true`, source version beta.12.6 on declared/locked/installed/current/base
172
+ surfaces, the exact Task revision/HEAD/dirty hash, no current audit for the rebound Plan, and no lease,
173
+ transaction, or Core operation. Commit only `package.json` and `package-lock.json` on the active
174
+ Milestone base, then only the same dependency files on the Task branch without touching product
175
+ bytes. Install beta.12.7 and follow fresh `next` only through
176
+ `update downstream-proof-replan-dependency-recover`, then
177
+ `task downstream-proof-replan-recover`, and finally ordinary `task plan-set`. The recovery keeps the
178
+ same Task, history, Knowledge binding, invalidated predecessor evidence, and dirty worktree. After
179
+ the replacement Plan is audited and authorized, `task run` is valid only when fresh `next` reports
180
+ `downstreamProofCarryover.state=validated` for one Step owning the complete hash-bound dirty set.
181
+ Any wider dependency commit, dirty-byte change, current audit, extra Task revision, missing binding,
182
+ or alternate route is a hard stop.
183
+
169
184
  When `next` returns `milestone initial-assembly`, execution is unavailable. Follow only the
170
185
  advertised `linked-task-assembly.commands` (`discovery start` and `discovery materialize`) until all
171
186
  intended linked Tasks exist. The closing `milestone plan-set` option appears only after at least one
@@ -211,6 +226,16 @@ the fresh `next.writerTokenContract` requires it. Successful `task run` returns
211
226
  `writerLeaseReceipt`; retain it only until Core releases that lease.
212
227
  Never search later payload fields for either credential and never copy credentials into evidence.
213
228
 
229
+ When a passed final Task review routes to `task result-set`, pass the active writer credential and,
230
+ for claimed C1 posture, the exact claimant as `--actor`. A successful `result-set` consumes that
231
+ execution lease before entering `awaiting_final_acceptance`; never reuse the old token and never
232
+ leave or manufacture a lease while waiting for the Human decision. After `task accept`, follow fresh
233
+ `next`: local merge or external merge confirmation normally advertises
234
+ `task writer-credential-replace`, which acquires a new bounded lease for the exact recovery actor.
235
+ If a Task created under beta.12.7 or earlier is already at the Human gate with a stale lease, use
236
+ only the exact `locks repair` route returned by repository-level `next`, verify that Task revision,
237
+ review, Result/Evidence hashes, and HEAD did not change, and stop before acceptance.
238
+
214
239
  Command discovery with `codex-workflow <noun> [action] --help` is read-only. Use it only when the
215
240
  exact invocation syntax is not already available from `next` and this protocol. Consume declared
216
241
  `requiredOptions` and `optionalOptions`; when `exactOptionContractAvailable=false`, consult the
@@ -52,6 +52,7 @@
52
52
  "uniqueItems": true,
53
53
  "items": { "type": "string", "minLength": 1 }
54
54
  },
55
+ "dirtyWorktreeHash": { "$ref": "#/$defs/hash64" },
55
56
  "preservedHeadCommit": { "$ref": "#/$defs/gitHash" },
56
57
  "actor": { "type": "string", "minLength": 1 },
57
58
  "reason": { "type": "string", "minLength": 1 },
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://codex-workflow.local/schemas/downstream-proof-replan-recovery-event.schema.json",
4
+ "title": "Codex Workflow V2 Downstream Proof Replan Recovery Event",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "eventId",
9
+ "taskId",
10
+ "previousTaskRevision",
11
+ "resultTaskRevision",
12
+ "invalidationEventId",
13
+ "invalidationPlanHash",
14
+ "reboundPlanHash",
15
+ "knowledgeRebindRecordedAt",
16
+ "dirtyFiles",
17
+ "dirtyWorktreeHash",
18
+ "preservedHeadCommit",
19
+ "dependencyRecoveryCommit",
20
+ "actor",
21
+ "reason",
22
+ "packageVersion",
23
+ "previousEventHash",
24
+ "recordedAt",
25
+ "eventHash"
26
+ ],
27
+ "properties": {
28
+ "eventId": { "type": "string", "pattern": "^DPR-[0-9A-HJKMNP-TV-Z]{26}$" },
29
+ "taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
30
+ "previousTaskRevision": { "type": "integer", "minimum": 1 },
31
+ "resultTaskRevision": { "type": "integer", "minimum": 2 },
32
+ "invalidationEventId": { "type": "string", "pattern": "^DPI-[0-9A-HJKMNP-TV-Z]{26}$" },
33
+ "invalidationPlanHash": { "$ref": "#/$defs/hash64" },
34
+ "reboundPlanHash": { "$ref": "#/$defs/hash64" },
35
+ "knowledgeRebindRecordedAt": { "type": "string", "format": "date-time" },
36
+ "dirtyFiles": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "uniqueItems": true,
40
+ "items": { "type": "string", "minLength": 1 }
41
+ },
42
+ "dirtyWorktreeHash": { "$ref": "#/$defs/hash64" },
43
+ "preservedHeadCommit": { "$ref": "#/$defs/gitHash" },
44
+ "dependencyRecoveryCommit": {
45
+ "anyOf": [
46
+ { "$ref": "#/$defs/gitHash" },
47
+ { "type": "null" }
48
+ ]
49
+ },
50
+ "actor": { "type": "string", "minLength": 1 },
51
+ "reason": { "type": "string", "minLength": 1 },
52
+ "packageVersion": { "type": "string", "minLength": 1 },
53
+ "previousEventHash": { "anyOf": [{ "$ref": "#/$defs/hash64" }, { "type": "null" }] },
54
+ "recordedAt": { "type": "string", "format": "date-time" },
55
+ "eventHash": { "$ref": "#/$defs/hash64" }
56
+ },
57
+ "$defs": {
58
+ "gitHash": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
59
+ "hash64": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
60
+ }
61
+ }
@@ -100,6 +100,40 @@
100
100
  }
101
101
  },
102
102
  "additionalProperties": false
103
+ },
104
+ "downstreamProofReplan": {
105
+ "type": "object",
106
+ "required": [
107
+ "invalidationEventId",
108
+ "activeStepId",
109
+ "sourcePlanHash",
110
+ "reboundPlanHash",
111
+ "knowledgeRebindRecordedAt",
112
+ "dirtyFiles",
113
+ "dirtyWorktreeHash",
114
+ "invalidatedStepIds"
115
+ ],
116
+ "properties": {
117
+ "invalidationEventId": { "type": "string", "pattern": "^DPI-[0-9A-HJKMNP-TV-Z]{26}$" },
118
+ "activeStepId": { "type": "string", "pattern": "^STEP-[A-Z0-9][A-Z0-9-]{2,63}$" },
119
+ "sourcePlanHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
120
+ "reboundPlanHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
121
+ "knowledgeRebindRecordedAt": { "type": "string", "format": "date-time" },
122
+ "dirtyFiles": {
123
+ "type": "array",
124
+ "minItems": 1,
125
+ "uniqueItems": true,
126
+ "items": { "type": "string", "minLength": 1 }
127
+ },
128
+ "dirtyWorktreeHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
129
+ "invalidatedStepIds": {
130
+ "type": "array",
131
+ "minItems": 1,
132
+ "uniqueItems": true,
133
+ "items": { "type": "string", "pattern": "^STEP-[A-Z0-9][A-Z0-9-]{2,63}$" }
134
+ }
135
+ },
136
+ "additionalProperties": false
103
137
  }
104
138
  },
105
139
  "additionalProperties": false