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

final-hardening.md

Factory Interface final hardening — 2026-11-28

Implemented M1 and L1–L4 from final-review.md; read docs/operating-model/02-security.md. Scope is code, regression tests and operational documentation only. No service restart, production DB mutation, external outreach, or writes to Coral/paused L-IT projects. Activation and business acceptance remain separate.

Changes

Runbook §7, Context Card and External Access now describe shortened collision-safe ZIP paths, F1 legacy artifact routing, F2 directory filtering, structured summaries, report permissions/fallback, preview limits, activity sorting and activation boundaries. Earlier reports, screenshots, historical counts and the implementation-evidence REPORT are preserved as historical, not silently rewritten.

Validation

Regression tests in control_plane/tests/test_owner_result.py cover cross-project/root/docs denial via report HTTP responses, legitimate project/workspace reports, traversal/symlink denial, all five exact legacy exceptions and wrong identities, NUL route handling, malformed href formatting, protocol-relative links, structured/legacy previews and portable ROOT-relative fixtures. Fixtures use isolated SQLite/artifact storage; the five-file production check used SQLite mode=ro only.

Initial focused run: 29 tests passed in 46.088s (test_owner_result, test_deliverables, test_activity_sort). An expanded focused run covers these plus verification, dispatcher and console cache; final result and command are recorded below.

Remaining baseline and activation limits

The independent final-review.md historically recorded 147 tests with 15 failures and 3 errors. Its baseline comparison identified 11 runtime-family cases (test_runtime 6, test_supervisor 4, test_approved_runtime 1) and six UI cases (test_owner_decisions 4, test_executor_policy 2), plus the relocated owner-result path failure addressed here. The six UI cases are stale markup/DOM expectations, not evidence reversing the owner's FI-OWNER-ACTION-001 acceptance. Those unrelated suites were not repaired or re-baselined in this task; the historical full-suite total is not claimed as a current run.

No activation was performed. Follow the separate idle-execution, backup, authorization, restart and smoke-check procedure; owner iPhone review remains separate. Existing 2 MB report limit, 1500-character fallback error limit, inferred deliverable acceptance and in-memory bounded ZIP construction remain unchanged.

Expanded focused validation: 83 tests passed in 105.633s, command:

.venv/bin/python -m unittest control_plane.tests.test_owner_result control_plane.tests.test_deliverables control_plane.tests.test_activity_sort control_plane.tests.test_verification control_plane.tests.test_control_plane_dispatcher control_plane.tests.test_console_cache

Evidence: final-hardening-tests.log beside this report. This run preceded the final addition of latest-execution-summary fallback to card previews; a final owner-result suite rerun is recorded below. Legacy access and relocated-module checks also passed as described above.

Final preview-change validation: 14 owner-result tests passed in 14.622s (.venv/bin/python -m unittest control_plane.tests.test_owner_result), including a rendered project card with an empty task result and a structured latest execution summary. Evidence: final-hardening-preview-tests.log. All requested focused regressions are green; no known failure in the changed behavior remains.

Материалы