Verdict: FAIL — design requires corrections before implementation approval.
Date: 2026-11-28. Scope: owner requirements, proposed design and actual local runtime code. This is a completed design review, not an implementation acceptance.
Итог: независимая проверка завершена; дизайн пока не готов к реализации, итог FAIL.
Проблемы: возможны обход verification при ручной приёмке, конфликты записей, изменение файлов ревьюером, неверные повторы и небезопасное выключение цикла.
Решение: принять приведённые минимальные исправления как условия реализации; окно внедрения и пилот согласовать отдельно после независимого PASS реализации.
Read in full: data/project_materials/FACTORY-RUNTIME/automatic-review-requirements.md (REQ) and review/automatic-review-design.md (D). Code inspected: dispatcher claim/finalize/selection; runtime approval/recovery/context; startup recovery; supervisor eligibility/fallback; verification; owner decisions and console mutation routes; executor policies; Codex/Claude launch paths; schema/migrations. Source references below are repository-relative, with function names where line ranges would be brittle.
Three actual calls against a fresh in-memory SQLite database, using the repository schema, _migrate, owner_decisions.decide and runtime.recovery_decision, produced:
| Probe | Observed result |
|---|---|
| FAILED task, recorded result, failed execution, no verification evidence; valid owner token and confirmation; accept | ACCEPTED |
| Task pinned EXPLICIT Codex; Claude review TIMEOUT, attempt 2/5 | REVIEW / EXPLICIT_EXECUTOR_MISMATCH |
| Codex TIMEOUT, global attempt 5/5, representing a later step's first run | FAILED / RETRY_EXHAUSTED |
These demonstrate current integration hazards, not defects in an already implemented cycle. No production DB mutation, production-code change, service restart, external request, or writes to Coral/L-IT were performed. Existing 46/46 and 123/123 results are accepted historical project knowledge, not suites rerun here. Live task counts and pilot readiness stated in D were not independently refreshed and must not serve as deployment authorization. The local git status command reported that this workspace is not a Git repository; no clean-tree claim is made.
Requirement: never bypass failed verification; release dependencies only after successful delivery, subject to the explicit owner checkpoint.
Evidence: D I1 permits “explicit owner accept”, I5 forbids verification bypass, and §7 reuses existing accept without a new guard. console/owner_decisions.py:13 (decide) permits FAILED/REVIEW acceptance when result is nonempty; it never checks verification. The in-memory probe confirms this. Dispatcher prepare_dependencies and claim treat ACCEPTED as sufficient. Thus a failed delivery can release dependants through the proposed UI.
Correction: one cycle acceptance predicate shared by automatic finalization and every owner acceptance route: matching approved snapshot, current producing execution/revision, durable successful verification, unchanged reviewed deliverable manifest, valid independent PASS, and no live execution. Owner acceptance resolves the checkpoint after PASS; it does not waive failed/missing verification or silently replace review. Explicitly replace I1's exception with this rule. A changed requirement/contract needs renewed approval and a new validated run. Reject stale/missing evidence. Preserve the producing execution's changed:true baseline: checking a review against its own pre-review hash would incorrectly fail a read-only review. Reuse bound evidence while artifacts remain unchanged; reverify when evidence becomes stale, rather than imposing D §11's unconditional “never repeated re-verification”.
Acceptance: failed/missing/stale verification cannot reach ACCEPTED through any route; successful PASS + checkpoint remains REVIEW until owner acceptance; only then does its dependent become READY.
Evidence: D §3 snapshot omits explicit workspace, dependency/checkpoint identity and content digests for referenced inputs; §5.1 chooses current effective_executor, despite storing resolved config. executor_policy.py:30 resolves current project defaults and prioritizes next_executor. run_one reads live project context and attachments. console/app.py project executor update and task executor update can change assignments; verification.configure:68 allows edits while non-running. D guards only ACTIVE, leaving STOPPED resumable with altered inputs. D §7.1 creates v+1 before renewed approval, although snapshot fields require approval identity/time.
Correction: create the immutable snapshot only in the approval transaction. Freeze instruction, expected result, criteria, contract, resolved execution/review policies and allowed fallback, workspace, resources, checkpoint/dependencies, relevant project instructions and attachment/material identifiers plus digests. Distinguish contextual background from approved requirements. Existing snapshots never re-resolve project defaults. Requirements edits create a draft, supersede the prior cycle, clear approval and return PLANNED; approval creates the next snapshot/cycle. Guard ACTIVE and STOPPED cycles and pending approved runs across contract, assignment, status, attachment and owner-decision routes. Guidance may explain an existing criterion; acceptance/resource/scope changes go through renewed approval, not /resume.
Acceptance: edit project defaults or a stopped task's contract/attachment; the old snapshot cannot silently change. Restart/resume uses exactly the approved snapshot. New scope cannot dispatch before approval.
Evidence: D §6 explicitly excludes legacy tasks from leases; this contradicts REQ shared-resource conflict protection. claim has no resource admission checks. The proposed resource TEXT key provides equality, not ancestor/descendant conflict semantics. Workspace ROOT is commonly shared. A lease on out/ must conflict with out/result.md; relative/absolute aliases and symlinks can name the same target. Artifact paths do not describe test commands' write sets or database/service resources. D alternately retains leases until terminal and treats STOPPED leases as invalid.
Correction: common transactional admission check for all dispatcher writers, including legacy claims, when a cycle reservation overlaps them. Derive conservative legacy write sets (workspace subtree when unknown); block starting a cycle against an already running conflicting legacy task and block the reverse race. Canonicalize filesystem paths relative to the frozen workspace, reject escapes, compare path components for containment, and handle symlink aliases conservatively; use separate typed keys for DB/service resources. Snapshot declared write scope, not just outputs. For untracked external writers, require a dedicated isolated workspace/resource or hold the cycle; leases alone cannot control them. Preserve ordinary legacy behavior where there is no conflicting reservation. Hold reservations through a running stop request until the process exits; on STOPPED release only after quiescence, and reacquire plus validate evidence before resume. This replaces “byte-for-byte legacy path” with a precise compatibility promise.
Acceptance: cycle↔legacy both arrival orders, parent↔child paths, aliases, existing live writer, stopped-but-still-running process, and resume after outside changes; unrelated branches still execute.
Evidence: D §6/§13 relies on prompt instructions and hashes. verification.snapshot:117 hashes only file checks. executors/codex.py:107 launches workspace-write; executors/claude_code.py:71 allows Bash/Edit/Write with acceptEdits. Changes to non-manifest files, databases or external services, and write-then-restore, evade hashes. The recovery claim that replay is safe because reviews are read-only therefore does not hold.
Correction: add a review execution profile in the existing adapters: reviewed source/artifacts mounted or otherwise enforced read-only, writes restricted to disposable test scratch, no host write-capable tools/connectors, and dispatcher-owned verdict publication. Run tests needing writes in an isolated copy tied to the reviewed manifest. Disabling Edit/Write alone is insufficient while unrestricted Bash can write. Verify enforcement for both existing executors; if unavailable under current permissions, STOP with an actionable reason instead of degrading to writable review. Keep hash comparison as a secondary integrity check. This is a necessary adapter change within scope, not a new service or file-protection policy for delivered documents.
Acceptance: attempted writes via shell, edit tools, sibling paths and symlinks are denied; tests can use scratch; verdict publication still works; unavailable isolation fails closed.
Evidence: D says “only counting queries” change. Actual runtime.recovery_decision compares the passed global attempt to max_attempts, computes backoff from it and applies the task's EXPLICIT executor to all failures. recovery.py:recover_interrupted passes global attempt. supervisor.eligible checks both total count and attempt; compatible and its history query use task-wide execution history. The probes above reproduce early exhaustion and reviewer pin mismatch. Reviewer REVIEW_FORMAT is not an existing transient class. D I2's “≤4 executor runs” omits technical retries.
Correction: keep executions.attempt globally monotonic for its existing UNIQUE constraint and artifact names; derive a separate step attempt ordinal/count for budgets/backoff. Pass (cycle, revision, phase, role policy, producing_executor) through claim, recovery, startup and supervisor. Scope failure/unavailability history to the step. Review fallback must exclude the actual producer, honor reviewer policy and never inherit task EXPLICIT or execution-phase next_executor; clear/partition fallback state at phase changes. After execution fallback, select an eligible different reviewer or stop. Define format retries as at most two additional launches, included in the five-launch step cap, surviving restart. Claimless unavailable conditions need a finite stop rule too. Total launch cap is 2*(max_revisions+1)*MAX_ATTEMPTS; initial + three revisions gives at most 40 launches at five attempts, not four runs. Owner grants cannot reset spent history or exceed ceiling five.
Acceptance: later revision begins with full step budget despite global attempt >5; pinned executor + distinct reviewer recovers correctly; fallback never self-reviews; malformed output and restart cannot reset counters.
Evidence: D §4 says every STOPPED task is REVIEW, but its technical path and §15 preserve FAILED; FAILED blocks dependants. Manual running stop sets a flag while §5.3 only says “not advanced”, leaving no definite terminal step. runtime.record_recovery only checks task status, not cycle stop/version. supervisor.eligible does not inspect cycles. The proposed transition uniqueness covers execution outcomes, not owner transitions. Reusing existing owner revise/hold/accept would leave cycle state and leases inconsistent.
Correction: for cycle tasks, all exhausted technical/content/manual stops become STOPPED + task REVIEW with typed reason and Russian summary; execution history may remain FAILED/INTERRUPTED. Keep legacy FAILED semantics only for noncycle tasks. Define precedence: stop/supersede/cancel fence blocks all subsequent advancement; finalization records evidence then settles STOPPED and releases resources after worker exit. Recovery sees the same fence and never rearms it. Supervisor explicitly excludes STOPPED/superseded cycles regardless of last failure metadata. Manual transitions use cycle CAS/version and an idempotency key; late outcomes require matching cycle/snapshot/step/version and execution id. Route old owner controls through these transitions. A passed cycle with checkpoint closes as PASSED while task remains REVIEW; acceptance subsequently changes only the checkpoint disposition.
Acceptance: stop during execution/review, crash after stop request, stale worker outcome after requirements change, duplicate outcome/control request and supervisor pass cannot resurrect work or release dependencies. Check all transaction boundaries, not just the happy replay case.
Evidence: D §3.1 says AI_FACTORY_REVIEW_CYCLE=0 “forces legacy behaviour”; §9 warns old code claims cycle READY rows as ordinary tasks. Draining only zero ACTIVE cycles omits live workers, pending stop requests, and PASSED checkpoint/STOPPED tasks exposed to old manual acceptance. An environment switch alone is not a hot operational stop without process restart.
Correction: feature-off disables creation/new cycle claims, never changes an existing cycle into a legacy task. Use a durable operator switch read at admission/finalization/recovery; environment-off may additionally veto enablement. Atomically park existing cycles; allow live steps to settle under the stop fence. Define restart-free disable behavior. Downgrade preflight requires zero cycle live executions, zero active transitions/reservations, no cycle task runnable or auto-releasable by old code, and unresolved cycle tasks inaccessible to old acceptance/resume paths (archive/park under a proven old-code hold with guarded console access, or defer downgrade). Disable supervisor release and dispatch during the migration window; verify with an old-code dry-run against a copied DB. Retain evidence/schema and use a consistent SQLite backup, not an uncoordinated main-file copy.
Acceptance: switch off in READY, RUNNING, retry-backoff, REVIEW and checkpoint states; no legacy execution or acceptance bypass. Downgrade refuses unsafe state. An idle deployment window remains required; this review does not authorize a restart.
Evidence: D §4.1 treats any out-of-criteria finding as SCOPE_EXPANSION; this can turn a recommendation into a blocker contrary to REQ. Its hash-only no-progress test can stop a valid fix to source/test configuration when the listed output file is unchanged. Hash snapshots omit SQLite/API/test state. A finding key based on normalized prose can change with paraphrasing. Verification-only failures bypass reviews, yet no-progress is defined only “after review r+1”. Threshold wording differs between §4.1 and §15 (“two consecutive repeats”).
Correction: only necessary work requiring expanded scope stops the cycle; optional outside-scope advice remains nonblocking. Valid PASS with recommendations remains PASS; FAIL without any valid blocker is a protocol error, bounded separately, not a content revision. Define stable criterion/check/target identifiers and carry finding ids across revisions; prose is not identity. Count no-progress only while a validated blocker persists after one completed remediation opportunity (r and r+1), including dispatcher verification failures. Use unchanged relevant evidence plus no meaningful response/fix evidence as support, not identical output hashes alone. Evaluate successful PASS before no-progress. Retain bounded dispute rulings; an evidenced changed result can resolve a finding even when output bytes are identical.
Acceptance: optional advice never causes a scope stop; source-only fix can pass; repeated verification failure stops without spending all revisions; paraphrased same blocker cannot evade the threshold; disputes and external blockers stop with the correct reason.
Evidence: D declares project defaults/task overrides but UI names only enable/criteria controls. owner_intervention can apparently omit mandatory stops. Null/inheritance, project-vs-task criteria and unsupported executor pairing are undefined. D claims validate_executor makes DeepSeek text-only, but runtime.candidates explicitly supports its workspace tool sandbox; capability must not be inferred from that label. Dispatcher cycle selects LIMIT MAX_WORKERS before claims; skipping three reserved/full tasks can starve the fourth. Capacity checks for cycles only do not prevent simultaneous legacy claims; load_executor creates fresh adapter modules, so a module-level Claude lock is not a reliable cross-load/process reservation.
Correction: validated settings API/UI exposes enabled, executor, distinct reviewer, max additional revisions, criteria and owner-intervention policy at project/task levels. Define absent=inherited, explicit false=disabled, and null only for documented auto selection; resolve once at approval. Mandatory safety stops cannot be disabled. Reject unknown fields, nonboolean enabled, invalid counts/criteria and unsupported pairings; use a small tested cycle capability allowlist rather than widening adapters. Project-default changes affect future approvals only, including after pilot; no retroactive cycle creation. Reserve executor capacity atomically with claim across all tasks/processes, alongside resource admission. Scan/paginate beyond ineligible candidates until capacity is filled or candidates exhausted; waiting consumes no execution attempt. Do not rely on adapter locks alone.
Acceptance: absent/disabled legacy behavior, all override combinations, invalid settings, unchanged already approved task, project default enablement, simultaneous scoped/global claims, Claude capacity one, and eligible fourth task behind three blocked candidates.
| Owner requirement group | Assessment / required closure |
|---|---|
| Native durable loop; original task; no ChatGPT between revisions; no scope expansion | One-task design suitable; B2/B6/B8 close approval and lifecycle gaps |
| Independent artifact/test review; evidence-backed blocking only; responses/disputes | Contract suitable; B1/B4/B8 required; validate evidence against the exact execution manifest and recorded test result, not path existence alone |
| Defaults/overrides, executor/reviewer, default three additional revisions | Present but incomplete; B2/B5/B9 |
| Stop on pass/limits/blocker/scope/rights/paid/business/no-progress; Russian summary | Enumerated; B6/B8/B9 unify behavior and mandatory stops |
| Independent branches, dependencies, capacity, resource conflicts | Existing dependency predicates reusable only after B1/B6; B3/B9 necessary |
| Compact UI, history, evidence, phase/revision, stop/revise/change requirements | Layout adequate; B1/B2/B6/B9 must govern every existing and new control |
| Recovery, retries vs revisions, idempotency, bounded loops, backward compatibility | Additive approach suitable; B5/B6/B7 and conflict-aware legacy admission required |
| First pass, fail-fix-pass, multiple revisions, exhaustion, blockers, parallelism, dependencies, restart, manual stop, disabled behavior | D matrix covers basic names; add the concrete negative/race cases above before acceptance |
| Real Claude/Codex E2E; independent implementation and documentation review | Keep mandatory; execute only after offline PASS and controlled deployment authorization |
| Optional AI-NUMISMATIST pilot, active-task check, no disruption/retroactive changes | Correctly deferred; refresh state at pilot time; pilot is optional, not a prerequisite for core correctness |
| Existing architecture/Capabilities/Control Plane/Dispatcher/Supervisor/runbook/settings/handoff/lifecycle/recovery/examples/agent instructions | Update existing documents in place; explicitly include settings and structured response/verdict examples; review code and docs together |
| No new paid services/permissions/restart during active work; no Coral/L-IT writes | Retain; inability to enforce a review profile is a held capability, not permission to weaken it |
No production implementation is authorized by this review itself. The following replaces D's roadmap dependencies and supplies closure criteria.
| Stage | Depends on | Concrete output and exit gate |
|---|---|---|
| R0 Correct design | This review | Incorporate B1–B9, one transition table with stop/acceptance precedence, exact settings schema and resource/reviewer execution rules. Retain default three revisions, ceiling five. No unresolved safety exception |
| R1 Durable model and approval | R0 accepted | Additive migrations, snapshots/digests, step identity/budgets, state transitions/CAS, strict verdict/response validation, progress/dispute policy. Isolated tests: replay, snapshot edits, grants, all stops |
| R2 Admission and review isolation | R1 | Common capacity/resource admission including conflicting legacy writers; overlapping-path handling; reviewer profiles and scratch tests. Prove denied writes and absence of starvation; unsupported profile stops before launch |
| R3 Runtime integration | R1, R2 | Claim/finalize/recovery/supervisor all use frozen role policy and step counters; bound verification to producer; guarded acceptance and owner controls; durable switch and downgrade preflight. Negative/race tests for B1–B7 pass |
| R4 Settings/UI and existing docs | R3; docs may be drafted alongside it | Full project/task override controls, compact phase/revision/history, evidence and Russian stop reason; update existing architecture, Capabilities, runtime, supervisor, verification, executor policy, runbook and agent instructions. Examples agree with implementation |
| R5 Independent offline acceptance | R4 | Different executor reviews implementation and docs; run relevant existing suites plus D matrix and B1–B9 regressions against fresh/copy databases. Record commands/results, separate known unrelated debt. Required verdict PASS |
| R6 Controlled deployment and real E2E | R5 + authorized idle window | Consistent backup; flag-off rollout; test both Codex/Claude roles with genuine first-pass PASS and seeded fail-fix-pass, checkpoint/dependency release, technical retry and restart recovery. Restart scenario only in isolated harness or authorized no-unrelated-work window. Show stop/switch safety and bounded counts |
| R7 Optional pilot/default rollout | R6 + refreshed active-task check + owner authorization | New pilot tasks only, no retroactive changes to AI-NUMISMATIST chain; independent branches undisturbed. Project-default enablement only after successful evidence review |
Completion criterion for the next design/implementation task: all blocking findings have source/test evidence of closure; recommendations remain optional. No new services, broad executor rewrite, legacy debt cleanup or unrelated project work is required.