Task FI-FINAL-REVIEW-001 (execution 312). Reviewer did not edit implementation, restart services or write to the production DB.
02-security.md, Task-Execution-Runbook.md, and all reports in review/ (original review, F1, F2, activity sort, owner result).control_plane/deliverables.py, console/app.py, console/owner_result.py, console/activity.py, owner_task.html, and the dispatcher diff against backups/deliverables-20261127.backup() from the production DB opened mode=ro into /tmp/rv/factory.db./tmp/rv/tree with the copy's artifact paths rewritten to it. It holds data/artifacts/deliverables and CBS-001./tmp/rv/base, with pre-change dispatcher, verification, console app, templates and CSS from backups/deliverables-20261127.data/factory.db mtime is unchanged (Nov 27 22:31). The WAL and shm are touched by the live service.Full unittest discover -s control_plane/tests: 147 run, 15 FAIL, 3 ERROR.
| Suite | Result | Baseline comparison |
|---|---|---|
| test_deliverables, test_verification, test_control_plane_dispatcher, test_console_cache | all pass | n/a |
| test_activity_sort | all pass | n/a |
| test_owner_result | 8 of 8 pass in a copy whose root path was patched. As-is in my copy it fails 1 (test_report_relative_absolute_and_absent). | Environment-bound, see L4. It is not a product failure on /home/iovon/ai-factory. |
| test_runtime (6), test_supervisor (4), test_approved_runtime (1) | 11 fail | Identical 11 test names with the pre-change dispatcher and verification. Pre-existing, not a regression. |
| test_owner_decisions (4), test_executor_policy (2) | 4 FAIL, 2 ERROR | Identical 6 names with the pre-change console. They are stale markup and DOM-stub expectations. This agrees with the F1 and activity reports. |
The 15 failures plus 3 errors are the 11 runtime-family, the 6 UI-suite, and 1 owner_result environment artefact, minus one overlap, so the sets match the baselines. There are no regressions attributable to this work.
Caveat: the 6 UI tests are red while the owner has accepted that UI (FI-OWNER-ACTION-001). The tests are stale and should be repaired or retired in a separate task.
All probes ran against the read-only DB copy.
F1, legacy 321/322 — PASS.
/artifacts/321 gives 200, 42,209 bytes, .md inline as text/plain. Download gives an attachment./artifacts/322 gives 200, 22,755 bytes, attachment./tasks/108/executions/175/deliverables/* route and its ZIP (404). A legacy row cannot poison a ZIP.F2 directory filtering — PASS. Probed on a temp workspace:
o/../../etc/passwd is rejected.ZIP paths — PASS.
testzip(). The longest entry name is 49 characters.review/crop-review.pdf, input/screenshots/cropped/…png, output/concept/concept.pdf.a together with a/b is rejected explicitly.42 historical snapshots and acceptance — PASS.
deliverable rows exist: 42 for tasks 209/210 and 2 legacy.Transactional registration — PASS (code review).
BEGIN IMMEDIATE, then a SAVEPOINT around register().O_EXCL, and hash-checked on read.Activity ordering and cache — PASS.
julianday normalisation and an ID tie-break. The five activity tests pass.no-store. CSS is content-hash versioned, so a stale iPhone cache cannot hold old markup or CSS after a restart. There is no server-side result cache to invalidate.Owner summary and report fallback — PASS.
Report file disclosure, symlink and path confinement.
/etc/passwd.md, ../outside/o.md, secrets/, backups/, dot-directories, and symlinks to files outside the root or inside secrets. A symlink pointing at another in-tree file resolves to that file. These cases are rejected because resolve() runs before the root and denied-part checks..md inside the factory root outside the denied parts is served if a task's stored result text mentions its path. This includes other projects' data/project_materials/* and workspaces/* (Coral and paused L-IT included), and docs/.control_plane/VERIFICATION.md, docs/acceptance/FACTORY-HEALTH-20261106.md, CRYPTO_BACKUP_REPORT.md and two archive-*-report.md files in the factory root.Markdown XSS — PASS.
javascript:, JaVaScript:, space-prefixed, data:, vbscript:, entity-encoded and tab-split link schemes are all inert." in a link URL stays escaped inside href, with no attribute breakout.nosniff and sandbox; default-src 'none'. HTML and SVG are attachment-only.Authorised artifact routes — PASS.
/artifacts/{id}: a kind=deliverable row requires a matching execution/task pair. Non-deliverable rows must be under data/artifacts, symlink-free, and hash-checked when a hash is recorded.Mobile markup, headless Chromium — PASS with a limit.
scrollWidth 485 against innerWidth 500) or at 1440 px.| # | Severity | Finding | Action |
|---|---|---|---|
| M1 | MEDIUM (hardening) | resolve_report accepts the first mentioned .md anywhere in the factory root (minus denied dirs). A prompt-injected executor result could surface another project's file to the owner. The page is owner-only, so there is no external exposure. | Backlog. Consider allowing the task workspace, its project's data/project_materials/<key>, docs/, and a root allow-list. |
| L1 | LOW | render_markdown("\x000\x00") raises IndexError, so /tasks/{id}/report and /summary return 500 if a stored result contains NUL plus digits. It cannot be exploited for script injection. | Strip \x00 before stashing. |
| L2 | LOW | A URL containing **x** yields <strong> inside an href: broken markup only, no breakout. A protocol-relative //host link is allowed. | Backlog. |
| L3 | LOW | The card preview shows the raw FACTORY_OUTCOME: COMPLETED … prefix and truncates at 400 characters. It does not use the structured summary, which is available only after the dispatcher restarts. | Cosmetic. Strip the prefix in owner_preview. |
| L4 | LOW | MD_PATH hardcodes /home/iovon/ai-factory/, so the owner_result test fails in any other checkout. | Derive from ROOT. |
| L5 | LOW | In the fallback, the execution error is cut to 1500 characters in the "Проблемы" field. | Acceptable. Know the limit. |
| L6 | INFO | The deliverables acceptance flag is still inferred (original F6). ZIPs are buffered in memory (F3), at 50 MB per file, 512 MB per ZIP, 500 files. | No change. |
| L7 | INFO | The 6 stale UI tests and the 11 runtime/supervisor tests are red on baseline. | Separate cleanup task. |
| L8 | INFO | Emoji in the "Технический отчёт" link renders as a missing-glyph box in headless Chromium, which has no emoji font. | Check on iPhone. |
Blockers: none.
Task-Execution-Runbook.md §7 still says "ZIP all/group … retains full workspace-relative paths". The F2 report says it is superseded: names are now relative to a single shared root (project-material root, or common parent). Update before activation.docs/task-execution/ChatGPT-Context-Card.txt says "ZIP … preserving paths". It should say shortened, collision-safe relative paths.docs/implementation-evidence/deliverables-20261127/REPORT.md has the same old wording and the old test counts./tasks/{id}/summary route and the ## Сводка для владельца executor contract;/tasks/{id}/report fallback and path rules;kind=deliverable rows without provenance or relative_path use the legacy path through /artifacts/{id};deliverables-fix-report.md and the original review say the 6 UI-suite failures are "baseline". That is true but the owner accepted that UI. Note the stale tests in docs/ so they are not read as a UI defect.Do not do these until no RUNNING or QUEUED execution exists, and the owner authorises the restart.
SELECT count(*) FROM executions WHERE status IN ('RUNNING','QUEUED');
This must return 0. Right now execution 312 is running.
data/factory.db using the SQLite backup API, not cp.test_owner_result, test_deliverables and test_activity_sort.register() apply to new executions. It currently runs the old code.uvicorn console.app:app, port 8110, started Nov 26). The new routes, owner_result, the activity ordering and the F1/F2 handlers are not live until then./ and /projects/FACTORY-INTERFACE return 200 with the activity-ordered list./artifacts/321 and /artifacts/322 return 200 (42,209 and 22,755 bytes).testzip() clean, names like review/crop-review.pdf./tasks/{id}/summary and /tasks/{id}/report on one historical task, one empty-result task, and a task with no report file.## Сводка для владельца block. Until then every historical task correctly shows the fallback.backups/deliverables-* and restart. No DB rollback is needed. The historical rows are additive, and the pre-registration backup is backups/deliverables-20261127/factory-before-registration.db.None for code acceptance. Open items: