FACTORY_OUTCOME: COMPLETED ## Сводка для владельца Итог: PASS — блокирующий дефект B-1 устранён: после PASS владелец может сделать revise/hold, устаревшее решение владельца даёт HTTP 409, запоздалые результаты воркеров по-прежнему отсекаются. Результат задачи 253 подтверждён по сессии Codex. Проблемы: блокирующих нет; незакрытые замечания R2/R3/R4 и 13 устаревших legacy-тестов остаются отдельным долгом. Код выхода исходного процесса задачи 253 не восстановлен и не утверждается. Решение: принять R1 как исправленный (PASS); включение, рестарт и деплой по-прежнему не разрешены (PARKED). Отдельно запустить исправление recovery диспетчера. # R1 recheck — independent verification of the B-1 fix Date: 2026-11-29. Reviewer: independent recheck task. No code edits, no production migration/restart, no scope expansion. All tests used temporary SQLite DBs/workspaces and fake executors. Production DB and the Codex session file were opened read-only (`mode=ro` / read). ## Verdict: PASS No blocking evidence found. B-1 (owner revise/hold on a PASSED cycle was a silent no-op) is fixed and covered by regression tests that failed before the fix (per the fix report's `b1-before.log`: 7 failed, which I did not re-run since that would require reverting code). ## Inputs read design v4 and its review (v4 design-review), `automatic-review-r1-report.md`, `automatic-review-r1-review.md` (original FAIL, B-1), `automatic-review-r1-fix.md`, `r1-evidence/` (hash manifest, logs, `legacy_probe.py`). ## 1. Changed files and hashes Recomputed SHA-256 and byte counts of all 11 files in `r1-evidence/source-sha256.json` against disk: **all 11 match**. The three changed files: | File | SHA-256 (matches report) | |---|---| | `control_plane/review_cycles.py` | `bdba402d4668bfe0680477eeb2f948f501e56460eef88face9cf641865a46f0c` | | `console/owner_decisions.py` | `fcb853a6d62c15c957302c4d2441726b6887a6583a9fc5bd41073582377834ad` | | `control_plane/tests/test_review_cycles_r1.py` | `403a1441f62865ecb17a38747eaff5ef36285c6e52bf6f3a27498f0fd5665cb9` | Limit: no Git history exists in the workspace, so I cannot independently prove that *only* these three files changed since the original review; I can only confirm that the other eight match the manifest (and the original review recorded db.py 52c1e93b…, which is unchanged). No historical diff is claimed. ## 2. Code inspection - `review_cycles.py:437-439` — the stale rule is now `stale or state in (SUPERSEDED, CANCELLED) or (worker and state in (PASSED, STOPPED))`. The PASSED/STOPPED fence applies **only to worker triggers**. SUPERSEDED/CANCELLED fences are unchanged. - Owner `stop` (non-worker, not live) → STOPPED/MANUAL_STOP, task REVIEW. Owner `change_requirements` (non-worker, not live) → SUPERSEDED, task PLANNED, instruction replaced, approval cleared (`approved_at=NULL`), acceptance `{}`. Both go through the version-CAS `UPDATE` (`version=version+1`). If an execution is live, stop/revise only persist the request (`STOPPING`), keeping the live-execution guard. - Owner `accept` on PASSED still requires `can_accept` (fresh verification, independent PASS, unchanged manifest). - `owner_decisions.py:36-45` — the returned transition is inspected; `STALE_OUTCOME` raises `Conflict`, mapped to `HTTPException(409)`. Token check (`version()` includes cycle row), live-execution check and project-active check remain. - Worker delivery evidence is not overwritten if a transition for that execution is already recorded (`recorded` check), and stale outcomes do not advance version or task state (`if outcome == 'STALE_OUTCOME': pass`). ## 3. Tests run (fresh, this review) | Command | Result | |---|---| | `.venv/bin/python -m pytest -q control_plane/tests/test_review_cycles_r1.py control_plane/tests/test_runtime.py::RuntimeTests::test_migration_is_additive_and_repeatable` | **51 passed**, 2 warnings, 3 subtests passed, 91.6 s | | `... test_review_cycles_r1.py -k test_b1` | **6 passed**, 44 deselected, 3 subtests, 9.8 s | | `r1-evidence/legacy_probe.py` (legacy runtime/approved_runtime/supervisor/verification/owner_decisions minus 13 listed exclusions) | **56 passed**, 13 deselected, 15 subtests passed, 101.9 s | Counts reproduce the fix report (51 / 56 / 15 / 3). The two warnings are FastAPI `on_event` deprecations, unrelated. The 13 deselected legacy tests are the pre-existing, explicitly listed exclusions (outdated DeepSeek/text-only/UI expectations); I did not re-triage them and no exclusion was added. Real-CLI adapter tests and E2E were not run. ## 4. New B-1 tests — what they actually assert `test_review_cycles_r1.py:106-171`: - `passed_owner_action` ×4 (`revise`/`hold` × completed/checkpoint task, after producer→independent PASS): HTTP 303; cycle `version` +1; state `SUPERSEDED` (revise) or `STOPPED`/`MANUAL_STOP` (hold); task `PLANNED` / `REVIEW`; instruction appended with owner request for revise, unchanged for hold; revise clears `approved_at`/`approved_by` and acceptance; `accepted()` is false afterward; **repeating the same POST with the old token → 409** (stale owner token); then a late reviewer delivery returns `STALE_OUTCOME` and leaves cycle, task and executions byte-identical (**worker fencing**). - `test_b1_stale_owner_outcome_returns_conflict`: `cycle_apply` mocked to return `STALE_OUTCOME` with a valid token → revise, hold and accept each return 409; cycle/task unchanged. This isolates the new outcome check from token rejection. - `test_b1_passed_worker_outcome_remains_fenced`: late worker delivery after PASSED is record-only; cycle, task, executions unchanged; acceptance still valid. Assessment: the assertions are specific (state, version, status, instruction, HTTP codes), not tautological. Limit: the HTTP checks call the route handlers directly, not a running server (as the fix report discloses). ## 5. Owner revise/hold after PASS, stale 409, worker fencing — conclusion - Revise/hold after PASS: **verified working** (tests above; code path read). - Stale owner 409: **verified** both through an old token and through a returned `STALE_OUTCOME`. - Worker fencing: **verified** — worker deliveries after PASSED/STOPPED/SUPERSEDED/CANCELLED remain record-only; late reviewer cannot overwrite consumed evidence. ## 6. Task 253 result recovery (read-only evidence check) Task 253 is the fix delivery; its execution was finalized by manual operator recovery after a SQLite lock. - `executions` id 343 (task 253, executor codex): status COMPLETED, started 08:40:44, completed 08:45:33, `failure_class`/`error` empty; `recovery_action = OPERATOR_RECOVERY`. - Event `OPERATOR_RESULT_RECOVERED` (recorded 11:19:34) states: source `/home/iovon/.codex/sessions/2026/11/29/rollout-2026-11-29T08-40-45-01a22608-….jsonl`, `session_sha256 ac2be5f3…c1ba8`, completion event `2026-11-29T06:45:33.362Z`, baseline "reconstructed … original in-memory snapshot lost", **`"exit_code": "not recovered"`**, method "manual recovery from actual final session message". - My check: the session file's SHA-256 is `ac2be5f335681ffbebd4b92296cf64d77134da39e3172680c11e69fa1c471ba8` — matches the recorded hash. It contains exactly **one** `task_complete` event (line 163, timestamp `2026-11-29T06:45:33.362Z` = 08:45:33+02:00, matching `completed_at`). Its `last_agent_message` (605 chars) is **byte-identical** to both `executions.summary` (id 343) and `tasks.result` (task 253). - Conclusion: the recorded result is faithfully the real Codex final message. **No claim is made about the original process exit code**; the record explicitly says it was not recovered, and I do not infer one. The reconstructed baseline is an operator reconstruction, not original evidence — treat the execution's baseline/diff data as non-authoritative. Note: the recovered message's embedded test counts match what I reproduced, but that is a separate confirmation, not part of the provenance. ## 7. Non-blocking, unchanged (tracked, not fixed here) Original review findings 1–3 and observation 4 (mutation reason masked by stop/park; stale reviewer mutation record-only; no CANCELLED producer; PASSED shown after accept) remain deferred to R2–R4 as the fix report states. 13 legacy exclusions and the two real-CLI adapter mock defects remain separate debt. One new minor remark: a repeated owner POST after the action returns 409 via the token check (not via the returned-outcome check), which is correct behavior but means the outcome check is exercised only through mocking. ## 8. Boundaries No production write, migration, restart, deployment, switch change, external outreach, or Coral/L-IT work. Production remains PARKED per the earlier read-only review; I did not re-inspect `review_cycle_control` beyond task 253 rows. The separate dispatcher recovery fix is out of scope here.