codex-workflow-v2 2.0.0-beta.12.7 → 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.
@@ -1,10 +1,10 @@
1
1
  ---
2
- title: Codex Workflow V2: архитектура beta.12.7
2
+ title: Codex Workflow V2: архитектура beta.12.8
3
3
  subtitle: Источники истины, lifecycle, роли, delegation, зависимости Tasks и границы доверия
4
4
  part: Часть 1 из 3 | Архитектура
5
5
  document_version: 2.0
6
6
  date: 29 августа 2026
7
- subject: Архитектура и границы Codex Workflow V2 beta.12.7
7
+ subject: Архитектура и границы Codex Workflow V2 beta.12.8
8
8
  ---
9
9
 
10
10
  # 1. Назначение и граница системы
@@ -18,7 +18,7 @@ Codex Workflow V2 - локальный state machine поверх Codex App, Git
18
18
  Система рассчитана на одного пользователя и одну машину. Она не предоставляет distributed locking,
19
19
  криптографическую идентификацию actor string или безопасную синхронизацию state между компьютерами.
20
20
 
21
- ## 1.1. Что beta.12.7 гарантирует
21
+ ## 1.1. Что beta.12.8 гарантирует
22
22
 
23
23
  - exact project-local npm package и совместимый handshake до lifecycle действий;
24
24
  - Discovery до materialization Task или Milestone;
@@ -26,6 +26,8 @@ Codex Workflow V2 - локальный state machine поверх Codex App, Git
26
26
  - mechanical-feasibility проверку поддерживаемых форм Plan до новой Task authorization;
27
27
  - явный Milestone dependency DAG и один общий runnable predicate для routing, handoff, claim и start;
28
28
  - один C1 writer lease, секретные one-time credentials и Core-owned Step commits;
29
+ - lease-free Human final-acceptance gate: `task result-set` проверяет и освобождает active writer
30
+ lease, а после acceptance merge получает новый credential только через fresh recovery route;
29
31
  - external-sealed Step/Task review в отдельных Codex tasks;
30
32
  - state-bound human gates либо ранее выданные bounded delegation contracts;
31
33
  - journaled recovery для составных переходов и fail-closed поведение при drift/corruption.
@@ -34,7 +36,7 @@ Codex Workflow V2 - локальный state machine поверх Codex App, Git
34
36
  - bounded compatibility recovery, если beta.12.6 после этого recovery ошибочно rebind-нула отвергнутый
35
37
  Plan: exact dirty bytes сохраняются до нового consolidated Step, а Knowledge refresh не отменяет `plan-set`.
36
38
 
37
- ## 1.2. Что beta.12.7 не гарантирует
39
+ ## 1.2. Что beta.12.8 не гарантирует
38
40
 
39
41
  - правильность продуктовой идеи или автоматически выбранного provider Task;
40
42
  - semantic sufficiency Plan, если точные факты нельзя доказать поддерживаемым analyzer;
@@ -110,6 +112,11 @@ Discovery -> materialize -> Plan -> Plan Risk Audit
110
112
  -> final acceptance -> merge
111
113
  ```
112
114
 
115
+ `task result-set` является последним execution lease-bound переходом. Он требует рекламируемый
116
+ writer token, освобождает lease до `awaiting_final_acceptance` и тем самым допускает неограниченную
117
+ по времени Human pause без stale-lock блокировки repository. После acceptance прежний token не
118
+ переиспользуется: fresh `next` выдаёт bounded `task writer-credential-replace` для merge.
119
+
113
120
  Fresh Task authorization записывает versioned mechanical-feasibility evidence. Analyzer может
114
121
  выдать `blocked`, `pass` или `unverified`. `unverified` не означает semantic approval; он означает,
115
122
  что поддерживаемая точная грамматика не доказала противоречие.
@@ -285,7 +292,7 @@ Restart Docker Desktop требует отдельного разрешения
285
292
  # 10. Operational checklist
286
293
 
287
294
  - exact package version установлен, bundled gateway соответствует release и переустановлен;
288
- - handshake подтверждает protocol 2, state schema 2 и beta.12.7 capabilities;
295
+ - handshake подтверждает protocol 2, state schema 2 и beta.12.8 capabilities;
289
296
  - каждый mutation следует свежему `status -> next` и exact option contract;
290
297
  - Docker permission failure сначала классифицируется как sandbox boundary, а не как infra retry;
291
298
  - semantic unknowns и human gates не маскируются delegation;
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: Codex Workflow V2: delegated chat-only guide
3
- subtitle: Актуальный beta.12.7 путь от нового Discovery до принятого Milestone без ручного CLI
3
+ subtitle: Актуальный beta.12.8 путь от нового Discovery до принятого Milestone без ручного CLI
4
4
  part: Часть 2 из 3 | Практика
5
5
  document_version: 2.0
6
6
  date: 29 августа 2026
7
- subject: Практическое руководство по delegated Discovery и Milestone в Workflow V2 beta.12.7
7
+ subject: Практическое руководство по delegated Discovery и Milestone в Workflow V2 beta.12.8
8
8
  ---
9
9
 
10
- # 1. Рабочая модель beta.12.7
10
+ # 1. Рабочая модель beta.12.8
11
11
 
12
12
  Пользователь работает в одном Codex Project и формулирует продуктовый outcome. Coordinator выполняет
13
13
  CLI, создаёт отдельные Task/Reviewer chats и ведёт supervision loop. Workflow Core остаётся authority
@@ -40,7 +40,7 @@ Blocking unknown, scope change, grant issuance или unrecoverable integrity co
40
40
  # 2. Подготовка проекта перед новым Discovery
41
41
 
42
42
  1. Убедитесь, что checkout чистый и выбран правильный repository root.
43
- 2. Установите beta.12.7 как точную devDependency после публикации release.
43
+ 2. Установите beta.12.8 как точную devDependency после публикации release.
44
44
  3. Обновите и переустановите bundled `codex-workflow-gateway` этого release.
45
45
  4. Проверьте, что declared и installed package versions равны.
46
46
  5. Запустите новый Coordinator chat, не fork старого Milestone conversation.
@@ -56,7 +56,7 @@ AGENTS.md
56
56
  -> doctor только как дополнительная диагностика
57
57
  ```
58
58
 
59
- Handshake beta.12.7 должен сообщать `packageVersion=2.0.0-beta.12.7`, `protocolVersion=2`,
59
+ Handshake beta.12.8 должен сообщать `packageVersion=2.0.0-beta.12.8`, `protocolVersion=2`,
60
60
  `stateSchemaVersion=2`, dependency DAG, initial Plan transaction, mechanical feasibility,
61
61
  Milestone autonomy и structural replacement disabled capabilities.
62
62
 
@@ -116,7 +116,7 @@ delegate, scope, transitions и expiry. DGR передаётся только е
116
116
  ```text
117
117
  НОВЫЙ COORDINATOR CHAT
118
118
 
119
- Проведи новый Milestone через Codex Workflow V2 beta.12.7 в delegated режиме.
119
+ Проведи новый Milestone через Codex Workflow V2 beta.12.8 в delegated режиме.
120
120
  Repository: <ABSOLUTE-REPOSITORY-ROOT>.
121
121
  Milestone ID: AUTO.
122
122
  Delegate actor: agent:milestone-coordinator.
@@ -242,6 +242,10 @@ Credential и approval grant решают разные задачи.
242
242
  4. Claim проверяет dependency binding и возвращает `writerLeaseReceipt`.
243
243
  5. `task run` принимает active writer credential согласно `next.writerTokenContract` и обновляет lease.
244
244
  6. `task step-complete`, review record и другие guarded mutations используют только рекламируемый option.
245
+ 7. После passed final review `task result-set` использует active writer token и освобождает lease до
246
+ `awaiting_final_acceptance`; Human gate не должен удерживать credential.
247
+ 8. После acceptance старый token не используется: fresh `next` рекламирует
248
+ `task writer-credential-replace`, затем разрешает merge или merge confirmation.
245
249
 
246
250
  Нельзя искать token в later payload fields, писать его в prompt/report/evidence или заменять redacted
247
251
  fingerprint. Потеря token не разрешает новый handoff либо lease acquisition вне fresh recovery route.
@@ -363,7 +367,7 @@ Task/project DGR. `dependencyBinding` для standalone handoff равен null.
363
367
 
364
368
  # 14. Итоговый checklist пользователя
365
369
 
366
- - beta.12.7 exact package и новый bundled gateway установлены;
370
+ - beta.12.8 exact package и новый bundled gateway установлены;
367
371
  - новый Coordinator chat не является fork старого Milestone;
368
372
  - bootstrap DGR, если нужен, выдан отдельным exact human confirmation;
369
373
  - Discovery не materialized при blocking unknowns;
@@ -1,10 +1,10 @@
1
1
  ---
2
- title: Codex Workflow V2: технический справочник beta.12.7
2
+ title: Codex Workflow V2: технический справочник beta.12.8
3
3
  subtitle: Protocol 2, state schema 2, transactions, credentials, dependency authority, review и recovery
4
4
  part: Часть 3 из 3 | Technical reference
5
5
  document_version: 2.0
6
6
  date: 29 августа 2026
7
- subject: Технический контракт Codex Workflow V2 beta.12.7
7
+ subject: Технический контракт Codex Workflow V2 beta.12.8
8
8
  ---
9
9
 
10
10
  # 1. Runtime contract
@@ -13,9 +13,9 @@ Workflow V2 предоставляет локальные revisioned transitions
13
13
  и `value` либо структурированную ошибку с `code`, `message` и `details`. Chat, PDF и gateway не создают
14
14
  authority сами: mutating permission определяется runtime state и свежим `next`.
15
15
 
16
- | Параметр beta.12.7 | Значение |
16
+ | Параметр beta.12.8 | Значение |
17
17
  |---|---|
18
- | npm package | `codex-workflow-v2@2.0.0-beta.12.7` |
18
+ | npm package | `codex-workflow-v2@2.0.0-beta.12.8` |
19
19
  | protocolVersion | 2 |
20
20
  | stateSchemaVersion | 2 |
21
21
  | lifecycle epoch | 2 |
@@ -37,14 +37,14 @@ Gateway выполняет:
37
37
  5. вызов только package-local `dist/src/cli.js --repo <root>`;
38
38
  6. `gateway handshake` до lifecycle действий.
39
39
 
40
- Ключевые beta.12.7 capabilities:
40
+ Ключевые beta.12.8 capabilities:
41
41
 
42
42
  | Группа | Capabilities |
43
43
  |---|---|
44
44
  | Knowledge и graph | `project-memory-v1`, `graph-binding-v1`, `task-context-refresh-v1` |
45
45
  | Milestone | lifecycle, initial assembly navigation, autonomy, progress, dependency DAG, initial Plan transaction |
46
46
  | Task planning | Plan Risk Audit, proof obligations, mechanical feasibility |
47
- | C1 | handoff sidecar, handoff bundle, derived Worker actor, credential replacement |
47
+ | C1 | handoff sidecar/bundle, derived Worker actor, credential replacement, Human-gate lease release |
48
48
  | Reviews | strict reviewer, Step strict review, continuable remediation, evidence-bound fix/replan routing |
49
49
  | Recovery | Task-local dependency provenance, plan integrity, downstream-proof predecessor invalidation, remediation mode, legacy stop override, append-only stop-rebind chain, corrective yield/replan journals |
50
50
  | Replacement | `structural-task-replacement-disabled-v1` |
@@ -235,7 +235,8 @@ Claim сверяет stored binding с current Milestone authority до lock acq
235
235
  3. Exact target actor вызывает `task claim` с one-time token.
236
236
  4. Claim выдаёт first-field `writerLeaseReceipt`.
237
237
  5. `task run` принимает token по `next.writerTokenContract`, heartbeats lease и возвращает refreshed receipt.
238
- 6. Terminal handback/release уничтожает active bearer material.
238
+ 6. `task result-set` consumes active token и освобождает lease до Human final-acceptance gate.
239
+ 7. После acceptance `writer-credential-replace` создаёт merge lease; terminal transitions освобождают его.
239
240
 
240
241
  Credential нельзя логировать, сохранять в chat packet или включать в evidence. `handoff-show` возвращает
241
242
  только safe persisted binding. Recovery использует отдельные advertised replacement actions.
@@ -249,7 +250,7 @@ Credential нельзя логировать, сохранять в chat packet
249
250
  | Worker return | Изменения uncommitted и только в allowedWrites |
250
251
  | Step complete | History, scope, checks, review gate, exact writer token |
251
252
  | Commit | Один Core-owned commit с Task/Step metadata |
252
- | Submit | Clean tree, Steps completed/skipped, recorded commits and evidence |
253
+ | Submit/Result | Exact evidence/review; Result освобождает lease до Human gate |
253
254
  | Merge | Fresh review/acceptance, base conditions, accepted HEAD |
254
255
 
255
256
  Local start повторно сравнивает authorized base внутри Git branch creation, закрывая TOCTOU между
@@ -442,7 +443,7 @@ Docker socket/CLI `EPERM`, `operation not permitted` или `permission denied`
442
443
  После каждой successful mutation обязателен sequential `status`, затем fresh `next`. Failed status/next
443
444
  не разрешает direct mutation. Syntax help read-only и не заменяет navigation authority.
444
445
 
445
- # 18. Public command surface beta.12.7
446
+ # 18. Public command surface beta.12.8
446
447
 
447
448
  | Область | Actions |
448
449
  |---|---|
@@ -470,13 +471,7 @@ running Step и active/stale writer lease. Исключения — докуме
470
471
  active-downstream-proof bridge и beta.12.7 exact stranded-replan bridge; все они fail-closed и не дают
471
472
  общего разрешения dirty update.
472
473
 
473
- Перед beta.12.7 tag release repository выполняет:
474
-
475
- 1. `npm ci`;
476
- 2. `npm run validate`;
477
- 3. `npm run pack:check`;
478
- 4. `npm run smoke:downstream`;
479
- 5. `npm run plugin:check` и official plugin/skill validators;
480
- 6. `npm run docs:pdf:check`;
481
- 7. `npm run release:check` с exact release tag binding;
482
- 8. validation append-only real-agent lifecycle log.
474
+ Перед beta.12.8 tag обязательны `npm ci`, `npm run validate`, `npm run pack:check`,
475
+ `npm run smoke:downstream`, `npm run plugin:check`, official plugin/skill validators,
476
+ `npm run docs:pdf:check`, `npm run release:check` с exact tag binding и validation
477
+ append-only real-agent lifecycle log.
package/docs/release.md CHANGED
@@ -27,7 +27,7 @@ The PDF check deterministically regenerates all three Russian documents from
27
27
  `docs/pdf/sources`, binds the visible package version to the root manifest, and fails when any
28
28
  tracked PDF is stale. Source and binary PDFs are one release unit.
29
29
 
30
- For beta.12.7, the release gate also relies on `npm run release:check` to fail if:
30
+ For beta.12.8, the release gate also relies on `npm run release:check` to fail if:
31
31
 
32
32
  - canonical entity schema 2 shapes drift;
33
33
  - protocol 2 is not the active public contract, or intact protocol-1 adoption evidence stops being readable through the bounded compatibility window;
@@ -42,6 +42,8 @@ For beta.12.7, the release gate also relies on `npm run release:check` to fail i
42
42
  explicit recovery, or dual-readback capabilities are absent from the packaged surface.
43
43
  - scoped Task navigation, credential replacement recovery, or sealed external Task/Step review
44
44
  commands are absent from the packaged surface.
45
+ - `task result-set` can enter the unbounded Human final-acceptance gate without consuming a live
46
+ writer credential and releasing its lease, or claimed Task E2E cannot reacquire a fresh merge credential.
45
47
  - bounded dependency-provenance recovery, retained passed-review provenance, the exact Signal T04
46
48
  revision-26 fixture, or pending/corrupt-review rejection regressions are absent.
47
49
  - dependency recovery again requires Task-local manifest/lock fields to equal the Milestone base,
@@ -1,110 +1,103 @@
1
- # V2 beta.12.7 Validation Report
1
+ # V2 beta.12.8 Validation Report
2
2
 
3
- Release candidate `2.0.0-beta.12.7` 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
- - `npm ci` completed from the lockfile with 0 reported vulnerabilities.
9
- - The final post-fix `npm run validate` passed typecheck and `338/338` sequential tests with no
10
- failures, skips, cancellations, or todos in 1,641,977.92675 ms. The same suite also passed after
11
- the clean install (`338/338` in 1,661,195.192667 ms) and before it (`338/338` in
12
- 1,347,257.496667 ms).
13
- - `npm run test:signal-t03-replan-e2e` independently passed the full Signal-shaped compatibility
14
- scenario. The focused dependency-provenance, downstream-proof, and lifecycle-model suite passed
15
- `23/23`.
16
- - The Signal-shaped E2E starts with the exact six-path ownership split and the beta.12.6 accidental
17
- post-invalidation Knowledge rebind. It then proves: read-only source eligibility, two
18
- dependency-only transport commits, `HEAD^`/`HEAD` provenance validation, bounded dependency
19
- registration, atomic replan recovery, required Project Knowledge refresh, mandatory replacement
20
- `plan-set`, one-Step dirty carryover admission, hostile concurrency and rollback/restart checks,
21
- Core-owned Step commit, passed strict Step Review, and fresh navigation to `task submit`.
22
- - Negative regressions reject stale Plan rebind, unrelated dirty files, changed content hash,
23
- unknown history, a wider dependency candidate, current legacy-Plan audit/authorization, extra Task
24
- revisions, active lease, pending transaction, corrupted invalidation/recovery sidecars, and a
25
- replacement Plan that does not give one Step authority over the complete dirty set.
26
- - `npm run pack:check` built the exact beta.12.7 package: 275 files, 1.0 MB packed and 4.1 MB
27
- unpacked. The sandboxed attempt
28
- could not write the user npm cache (`EPERM`); the exact authorized retry passed.
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.
29
23
  - `npm run smoke:downstream` packed and installed the tarball in a disposable consumer project and
30
24
  returned `ok=true`. The sandboxed attempt could not resolve the npm registry (`ENOTFOUND`); the
31
25
  exact network-authorized retry passed.
32
- - `npm run plugin:check`, `npm run docs:pdf:check`, and exact
33
- `RELEASE_TAG=v2.0.0-beta.12.7 npm run release:check` passed after the final source changes. The
34
- bundled gateway cachebuster is `0.1.0+codex.20260829143747`.
35
-
36
- ## Root causes corrected by beta.12.7
37
-
38
- - beta.12.6 correctly invalidated the completed migration predecessor and required a replacement
39
- Plan. A later Project Knowledge approval nevertheless mechanically rebound the rejected two-Step
40
- Plan and returned the Task to `awaiting_execution_authorization`. The required `plan-set` boundary
41
- was therefore lost.
42
- - The stranded state could not be fixed by another review attempt: no Step was runnable and the
43
- current Plan was the artifact whose authority had already been rejected. The defect was routing
44
- and recovery authority, not insufficient implementation effort.
45
- - A one-transition repair was also insufficient. The full E2E exposed two additional dead ends:
46
- the exact dependency-only update makes Project Knowledge stale before repair, and the ordinary
47
- `task run` clean-checkout precondition rejected the deliberately preserved dirty bytes even after
48
- a correct replacement Plan.
49
- - beta.12.7 adds a closed compatibility sequence. The external source preflight recognizes only the
50
- exact beta.12.6 stranded shape. Dependency registration binds the update commit to the original
51
- invalidation, rebound Plan, preserved HEAD, dirty paths, and content hash. Replan recovery returns
52
- the same Task to `needs_fix` without requiring the now-stale live Knowledge Map to be active.
53
- - Project Knowledge can then be reconciled and approved, but refresh/rebind routing cannot replace
54
- the mandatory `task plan-set`. The old Plan receives no execution authority.
55
- - Dirty bytes are not adopted as completed evidence. After a fresh Plan Risk Audit and execution
56
- authorization, `task run` permits carryover only when one planned Step owns every bound path and
57
- current HEAD/path/content hashes exactly match the recovery event. All ordinary checks, Core Git
58
- ownership, and strict-review requirements remain in force.
59
-
60
- ## Exact Signal project evidence
61
-
62
- - The Signal repository `/Users/home-pc/htdocs/projects/signal_v4` was inspected and exercised on
63
- branch `codex/task-01m0wxjad4-processing-persistence-schema` at
64
- `4606eaf98f3c5f1f0dec4c361f34e2abe9aefa66`.
65
- - Its Workflow remains on exact `2.0.0-beta.12.6`. Task
66
- `TASK-01M0WXJAD4GZGVNRJ284ND95C6` remains revision 106 and
67
- `awaiting_execution_authorization`; live Workflow state was not mutated by beta.12.7 validation.
68
- - The dirty set remains exactly six paths: five modified processing-migration files and untracked
69
- `tools/postgres/run-processing-integration.ts`. After temporary hostile-test additions were
70
- removed, the beta.12.7 source preflight returned `eligible=true`, empty blockers, the preserved
71
- HEAD above, and dirty-worktree SHA-256
72
- `1cbeb0ccb4883ade6f2ea751423385cf504f5c18e45473f40cb9a39ca850ece1`.
73
- - The real Signal PostgreSQL harness was temporarily extended with two concurrent migrators and a
74
- forced mid-migration conflict followed by restart. `npm run processing:postgres:test` passed clean
75
- bootstrap/repeat, advisory-lock serialization, transaction rollback with no partial ledger/schema,
76
- unchanged restart convergence, tamper/order denial, catalog fingerprint, immutable evidence, and
77
- least-privilege checks against the pinned PostgreSQL image.
78
- - Those temporary product changes were then removed exactly and the original runner bytes were
79
- verified against a parallel Signal checkout before the recovery fingerprint was re-read. This
80
- proves product feasibility without falsely presenting pre-authorized test bytes to Workflow.
81
- - This is strong live read-only entry evidence plus real product proof. It is not a claim that the
82
- unpublished beta.12.7 package has already updated Signal or mutated its Task. Final live continuation
83
- still requires release publication, exact dependency-only transport, and following fresh
84
- project-local `next` through the tested sequence.
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.
85
72
 
86
73
  ## PDF release documentation evidence
87
74
 
88
- - Three tracked Russian PDFs were regenerated from current Markdown sources;
89
- `npm run docs:pdf:check` reported an empty stale set.
90
- - All 28 pages were rendered and visually inspected: architecture is 8 pages, the delegated
91
- chat-only guide is 9 pages, and the technical reference is 11 pages.
92
- - Titles, beta.12.7 version headers, Cyrillic glyphs, tables, code blocks, new recovery commands,
93
- page edges, and footers show 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.
94
81
 
95
82
  ## Existing boundaries and non-claims
96
83
 
97
- - Structural replacement remains intentionally disabled. beta.12.7 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,
98
90
  topology rewiring, completed-Step adoption, or a wider delegation surface.
99
- - The new bridge is limited to the proven beta.12.6 invalidation-plus-accidental-rebind sequence.
100
- It is not a general permission for dirty update, arbitrary Plan rollback, or manual state repair.
101
- - A negative Plan Risk Audit decision may truthfully return the same Task to planning, but no
102
- automatic component decides product semantics or widens Task objective, requirements, acceptance,
103
- or Milestone topology.
104
- - Git transport commits remain agent-executed operations on exact advertised boundaries. Runtime
105
- does not create, amend, merge, reset, publish, tag, or push release history.
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.
106
95
  - Validation performed no npm publication, Git commit, tag, remote push, Signal dependency update,
107
- or local plugin reinstall. Those remain separate release/deployment actions.
108
- - Confidence is high for the implementation, package artifact, synthetic Workflow E2E, and real
109
- PostgreSQL proof. Confidence in final live Signal continuation remains conditional on installing
110
- the published exact package and observing the same project-local recovery sequence.
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.7",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-gateway",
3
- "version": "0.1.0+codex.20260829143747",
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
@@ -226,6 +226,16 @@ the fresh `next.writerTokenContract` requires it. Successful `task run` returns
226
226
  `writerLeaseReceipt`; retain it only until Core releases that lease.
227
227
  Never search later payload fields for either credential and never copy credentials into evidence.
228
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
+
229
239
  Command discovery with `codex-workflow <noun> [action] --help` is read-only. Use it only when the
230
240
  exact invocation syntax is not already available from `next` and this protocol. Consume declared
231
241
  `requiredOptions` and `optionalOptions`; when `exactOptionContractAvailable=false`, consult the