patchwise-agent-studio / docs /FINAL_REPORT.md
EnergyVenom's picture
Astra: regression catalogue, runner robustness, idempotent Agent Studio contract, key-screen design (2182ef729b22)
152e0c1 verified
|
Raw History Blame Contribute Delete
5.64 kB

Historical record. This page describes the product as it was when it was written, under an earlier name, and is not kept up to date. For the current system (Astra) read ARCHITECTURE.md, DEPLOYMENT.md, RUNBOOK.md, REMOTE_RUNNER.md and SECURITY.md.

Final report: production hardening

Branch production-hardening (from trio-apple-ui at 1c7e8c0), 3 Nov 2026. Detail and evidence per item: AUDIT.md. Earlier hardening on trio-apple-ui (31 Oct to 2 Nov) is included where it closed audit items.

What was found

44 findings from three reviews (backend reliability, user flows, security and operations) plus this audit's own checks. The most serious:

  1. Anyone who signed up on the public URL could start runs on the client's Fusion pod (Critical).
  2. A double click on Approve could skip the QA review gate (Critical, reproduced 5 of 10 times).
  3. One failing schedule stopped all schedules and could lock the Fusion test user (Critical).
  4. A storage error at start could wipe the backup (High).
  5. The Fusion connection test never signed in; a fully passing Fusion run came out NO-GO; reports called Fusion runs "mock" (High).
  6. FPT_FUSION_MODULES=AP, the documented form, stopped the app at start; an empty CORS value did the same (found by loading .env.example through the real settings class).
  7. Browser runs crashed the whole web app after approval (a link inside a toast rendered outside the router; found by the end-to-end test).

What was fixed

Security: sign-up role, per-visitor sign-in limits behind the proxy, capped password hashing, sessions ended on reset and password change, reset links from configuration, secrets kept out of child processes and traces, trimmed public readiness, HSTS, API docs switch, no CORS on the Space, safe return path after sign-in, practice-app advisories.

Reliability: atomic gate answers, no duplicate starts or sign-offs, crash-proof scheduler, persisted queue, Fusion test data recorded and cleaned up, bounded backups, plain failure messages, browser-crash detection, settings parsing.

UI: plain-language errors, confirmations, failure review completeness, role-aware "waiting for you", Defects and Scenario detail pages, report toolbar, one live stream, sign-in page (Caps Lock, keep me signed in, lockout words), 404 and crash-recovery pages, on-demand loading of less-used pages.

What was added

Your-account page (password, sessions, sign out everywhere else); feature switches; storage and backup panel; CSV export; /api/metrics; optional Sentry-compatible error tracking; log rotation; .env.example; ruff and pre-commit; CI on every push and pull request with tests, coverage and dependency scans; ARCHITECTURE, SECURITY, DEPLOYMENT, RUNBOOK, CONTRIBUTING and CHANGELOG; README rewritten to match the product.

Verification

All run on 2-3 Nov 2026 on this branch:

Gate Result
Backend tests (coworker/tests, triage/tests) 357 passed
Backend coverage 76% overall; auth 85-100%, users 90%, pods 90%, vault 93%, audit 94%, QA rule 90%, scheduler 89%
Lint (ruff) clean
Web type-check, lint, build passes; main bundle 853 kB (was 926 kB)
Web unit tests 90 passed
Web end-to-end (Playwright: sign-in, consultant flow, RBAC/CSRF, live view, chat, brand and keyboard) 5 passed
Automation type-check clean
Dependency scans Python: no known vulnerabilities; npm: practice app fixed, web 2 moderate (react-router 6, documented)
Secrets in git history (149 commits) none found
Fresh clone following only the README installs, builds, starts, first admin signs in. Found and fixed: .env did not reach the first-admin setting; Windows long-path note added
Real Oracle Fusion run (31 Oct, eiiv-dev2) connection test signed in; 6 of 6 Payables scenarios passed; re-scored GO with the report fix

What remains, and why

Item Why not done
FPT_STATE_KEY for the backup Changing the key re-encrypts the backup; needs the owner present (RUNBOOK "Rotating secrets")
react-router 7 upgrade A major version; the moderate advisories are not reachable here (documented)
Digest-pinned images, hashed Python lock file Needs a build pipeline change and a decision on update cadence
E-mail / Telegram notifications Needs a mail provider or the Hermes Telegram secrets
"New patch available" for Fusion pods Needs Oracle's release information per pod; larger work
Fusion coverage beyond Payables Scripts must be written and verified on a real pod per business area
Unsaved-changes guard, screen-reader pass Forms are short sheets today; a manual accessibility review is still due
Load test, penetration test Not in scope of this pass
The Fusion test-data sweep Tested against a fake pod only; first real check on the next Fusion run

Decisions for the owner

  1. Set FPT_STATE_KEY (with the backup re-save described in the RUNBOOK).
  2. Keep Supabase "Confirm email" on.
  3. Registration on the public URL: keep (viewer) or switch off in Settings > Features.
  4. Rotate the credentials shared in chat during this project (Fusion test user, NVIDIA key, Hugging Face token, Supabase token).
  5. Deployed to the Space on 3 Nov 2026 (Space commit 4545bb3): ready, data restored from the backup, HSTS on, new sign-ups are viewers, API docs hidden, metrics need sign-in. A real Fusion run on the Space is still to be done.