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

hardening-review.md

Hardening review: task 222 (2026-11-28)

Reviewer: independent, review only. I did not edit implementation, restart services or write to the production DB. DB access was SQLite mode=ro. Probes ran in-process against console/owner_result.py and the live tree.

Read: final-review.md, final-hardening.md, docs/operating-model/02-security.md, Task-Execution-Runbook.md (§7, F1/F2 and owner-summary sections), console/owner_result.py, and the /tasks/{id}/report and /summary routes in console/app.py.

Verdict

Evidence

Cross-project report confinement: PASS. resolve_report now takes the task and allows only data/project_materials/<project_key> and the project's own workspace.

Exact legacy exceptions: PASS. LEGACY_REPORTS holds five (id, key, project) → file tuples:

TaskKeyProjectFile
54FACTORY-VERIFY-001FACTORY-RUNTIMEcontrol_plane/VERIFICATION.md
83YUR-001YURKEVICH-ARCHIVEarchive-discovery-report.md
84YUR-002YURKEVICH-ARCHIVEarchive-followup-report.md
98FACTORY-HEALTH-20261106AI-FACTORYdocs/acceptance/FACTORY-HEALTH-20261106.md
108CBS-001CRYPTO-BACKUP-STORAGECRYPTO_BACKUP_REPORT.md

Markdown safety: PASS.

Preview fallback: PASS (code and tests).

Regression tests: PASS.

Activity sorting and deliverables F1/F2: no regression.

Documentation: PASS. The Runbook now covers summary, report rules, exact exceptions, previews, ZIP paths, F1/F2 and the activation boundary. This closes the drift items from final-review.md. I did not re-check the Context Card or REPORT.md line by line.

Remaining limitations (none blocking)

  1. Not live until the restart. The old process still serves the old resolver, which has the M1 exposure (owner-only page).
  2. I could not make HTTP-level probes, because there is no httpx client. I called the resolver and renderer directly and read the route code. Run the authenticated smoke test after activation: /tasks/54/report, /tasks/83/report, /tasks/108/report (200 with the file) and one foreign-mention task (200 saved-result fallback).
  3. Unchanged and accepted: inferred deliverable acceptance, in-memory ZIPs, the 1500-character error cut, the 2 MB report limit.
  4. The 11 runtime-family and 6 stale UI tests are still red and need a separate cleanup task. They do not reverse the owner's acceptance of FI-OWNER-ACTION-001.
  5. The owner still has to check mobile layout on iPhone Safari. I did not check it here.
  6. Backlog (cosmetic): a task whose stored result mentions a Markdown file outside its project (other than the five exceptions) gets the fallback page. That is intended.

Activation steps

  1. Confirm SELECT count(*) FROM executions WHERE status IN ('RUNNING','QUEUED') returns 0. It returns 1 now (execution 314).
  2. Back up the DB with the SQLite backup API.
  3. Get the owner's authorisation.
  4. Restart the dispatcher, then the console.
  5. Run the smoke checks above and the final-review.md list.
  6. Rollback: restore the code files from backups/deliverables-* and restart. No DB change is needed.

Материалы