← Назад к задаче

dispatcher-recovery-harden-review.md

FACTORY_OUTCOME: COMPLETED

Сводка для владельца

Итог: независимый (Claude) вердикт — B1 и B2 закрыты PASS в офлайн-границах: хэши совпадают, 33/33 целевых и мои 7 дополнительных проб прошли, полный набор даёт те же 15 падений. Для R1.5 код готов только как «PARKED, без активации».
Проблемы: (1) новый код с гейтом уже лежит в боевом каталоге, а работающий диспетчер (PID 4063952) запущен до этого и без receipt — любой его рестарт превратится в тихий бесконечный отказ (цикл ловит ошибку и просто спит), без падения сервиса и алерта; (2) сейчас в боевой БД 1 RUNNING execution и 1 RUNNING task — активация отказала бы (не idle); (3) активация опирается на аттестации оператора, а не на детекцию процессов; (4) 15 падений полного набора не устранены, причина lock execution 343 не доказана, у боевого диспетчера почасовые «database is locked».
Решение: принять офлайн-вердикт PASS; активацию не разрешать до отдельного окна (drain → остановка всех старых процессов → activate); решить, как удерживать рестарт-риск до окна (пинить версию кода или принять тихий отказ), и считать ли 15 падений техдолгом.

Independent review — dispatcher recovery hardening (task 257), B1/B2

Reviewer: independent Claude (Sonnet 5.5). The Codex self-reviews (independent-review.md, resume-independent-review.md) were not used as acceptance; I used them only as claims to check. Scope: source, runbook, evidence and offline tests. I made no source repairs, no production DB writes, no migration, restart, deployment, activation or real executor CLI. Probes are in /tmp/rev2/ (outside the repo); I added no repo files. There is no git repo, so I compared against the retained *.before.py and diff files.

Verdict

ItemVerdict
B1 — per-row failure isolation, lock exhaustion, no dispatcher wedgePASS (offline)
B2 — single-version idle rollout, receipt, rollback docsPASS (offline), with operational conditions below
Owner/fence semanticsPASS
Full suite greenNO — 15 failures, identical to the claimed set; not caused by this change
Readiness for R1.5Ready as PARKED/offline only. No activation. Listed conditions apply before any window.

1. Source and evidence hashes

2. B1 — failure isolation (checked in source, the diff and tests)

Residual B1 notes (non-blocking):

3. B2 — rollout gate, owner fencing, receipt

Limitations of the gate:

4. Restart refusal risk (the main operational finding)

Read-only observations of the live host:

Requirement: before any window, either keep a pinned copy of the old release for service restarts, or accept in writing that an unplanned restart equals "dispatcher halted until activation". Add an explicit non-zero exit or alert for ActivationRefused so the halt is visible. That is a code change for the next task, not a repair made here.

5. Test evidence (my own runs, offline, temp DBs, stub executors)

RunResult
test_outcome_recovery.py + test_recovery_harden.py + dispatcher RecoveryTests + checkpoint-branch test33 passed, 4 subtests, 61 s
My probes (/tmp/rev2/test_probe.py, 7 new + inherited cases)13 passed, 21 s
Full control_plane/tests218 passed, 15 failed, 76 subtests passed, 473 s (matches the claimed 218/15/76)

The 15 failing node IDs are exactly identical to resume-full-failures.json (set difference empty). They equal the 13 in r1-evidence/legacy-known-failures.json plus two ExecutorPolicyTests (test_creation_forms_and_visible_roadmap, test_inline_javascript_persists_then_refreshes_and_reports_failure). Nothing disappeared and nothing new appeared. The two extras match what the task-255 review found, and that review showed they fail identically with the connection change reverted. These are outdated executor-default, UI and fallback expectations (the same debt as the legacy DeepSeek expectations in project knowledge). They are not recovery regressions, but the suite is not green. R1 evidence: the same 51 R1 and migration tests pass inside the full run, and no R1 failure ID appears among the 15.

6. Blockers

For R1.5 as PARKED / offline there are no code blockers.

Blockers before any activation or DEV/PROD separation:

  1. Restart-refusal handling (§4): silent spin on missing receipt. Needs a visible failure or pinned old release.
  2. Process detection: activation relies on attestations only. Needs a recorded process inventory in the window, or a code-hash-bound receipt.
  3. Receipt not code-bound, and path gating is hard-wired to ROOT/data/factory.db. A DEV copy has its own ROOT and receipt, which is acceptable. DEV must not share data/control-plane-dispatcher.lock, the artifact outcomes/ journal root, or the DB. Journal paths hash the DB path, so they do not collide. The global lock path is derived from ROOT. Re-check any DEV setup that points two roots at one DB.
  4. No version control. Rollback depends on manual copies; DEV/PROD parity cannot be checked by diff. Take a snapshot and hash set before any window.
  5. The live dispatcher's hourly lock errors are unexplained; execution 343's holder is unproven. The fix is recoverability, not lock-cause removal.
  6. The 15 suite failures should be triaged before DEV/PROD gating relies on the suite.

7. Limitations

Offline only: temp SQLite, stub executors, single-host flock. I did not test power loss, a real executor CLI, production load, mixed versions or the real activate against production. I did not run systemctl, restart anything or read process memory. Service, process and journal observations were read-only (ps, systemctl cat/list, journalctl, read-only sqlite3). I did not use the Codex reviews as evidence. This verdict does not authorize migration, restart, deployment or activation.

Сводка (RU)

Материалы