feat(catalog): continue saved assessments as audit cases
Summary
Deliver a bounded customer handoff: saved company assessment → prepare partial catalog audit → explicit save → reopen and continue with an evidence-bound review note.
- Add
/catalogs/reviews, a Catalogs entry point and a Start catalog audit link on a current saved assessment. - Use the existing same-origin Context proxy with explicit workspace binding; isolate actor/session/workspace/connection state and cancel stale requests. Reactively synchronize API override/clear events so stale guards cannot leave the page inert.
- Display retained summary, input provenance and coverage gaps; preserve every snapshot collection on continuation.
- Freeze exact payload/key/revision through uncertain writes, malformed receipts and generic 409s; resolve by exact retry or same-case readback.
- Replace old content with redacted receipts; unsupported legacy cases stay read-only.
- Preserve unconfirmed notes as unsaved manual drafts after conflicting readback; confirmed note ID/content clears the draft, redaction/auth loss erases it, and no auto-resend occurs. Restoration requires unchanged original assessment/source bindings; removed or replaced evidence discards the private draft.
Released-source qualification
Integrated App main e22f99a07701a4e7ee36c7ca813f6909d818a705 with a normal merge, preserving original candidate 9222fd413799b8c4db5ea6a4411a701279fac189 as first parent. Complete synthetic prepare and selected-evidence fixtures were emitted by the real API contract producer at released API tree eb30766e807cd79cc0dec4c769ec3af91b5c2a11 (merge 486d32ee3346d6ff4b41d7e13be415ac9dc124be). Fixture SHA256: 6096eeba69b725111389377a13a2c7d74ebeeb08f0d1f81ba8204c7d4e391d5d.
The real App hook, same-origin route and proxy are exercised together against those outputs. Tests retain complete schema-v1 snapshots, fingerprints, summary, input manifest, freshness and gaps through explicit save/reopen/note continuation and exact uncertain-write retries. Selected evidence remains a separate response. Save/read receipts use synthetic storage echoes; they do not prove database persistence or permissions. Equivalent mixed-case brief UUIDs are accepted without rewriting evidence.
Dependencies and acceptance
Docs #15 and API #1173 are source-merged. API deployment verification, database prerequisite #125, intended-account access and the authenticated native journey remain separate gates before release acceptance. Do not close the Context or Catalog epic on this source-only slice. Related: #2116, #2277. The coordinating owner retains merge authority.
Validation
Integration commit 57e34cbc341a2991db2958375d4761eeb127d4d7: 3,007 full-suite tests passed (one skipped), 118 focused tests passed, Next typegen/full TypeScript/changed-file ESLint/format checks passed, independent exact-head source review passed. Production build passed with synthetic environment placeholders after preserving the first missing-TELEGRAM_BOT_TOKEN failure. No real credentials were used.
Successor ad8028a12537fa9d1834b39cc70f72d95c5aff98 also closes confirmed automated-review findings: actor/session/connection isolation includes release-list state and streams; full records cannot masquerade as withheld placeholders; inherited source names are rejected; continuation requires a partial assessment; superseded assessments do not offer audit creation; unavailable-parent notes are hidden; excluded topics and unavailable citations are explicit; opening another audit preserves an unsaved note until manual save/clear. Validation functions are separated into focused modules.
Local validation at ad8028a: 3,017 tests passed (one skipped), 68 focused tests passed, independent reviewer ran 63 relevant tests and approved the exact commit. Full TypeScript and formatting passed; ESLint has zero errors and one existing effect warning. Production build passed with synthetic placeholders. Exact-head full-suite, onboarding-browser, contracts-and-interactions, OAuth consent and Vercel preview checks passed. Cubic completed on ad8028a with four new findings and an auto-approval block; its success badge was not approval. The subsequent repair is described below.
All 30 Cubic findings were independently assessed. Generic 404 remains an uncertain write because it does not prove no commit; retry payload/key/revision stay frozen. All-source note withdrawal dependencies and connection remount boundaries remain intentional. Membership is enforced by the API; no silent fallback to personal workspace was added. The repeated 100-line mandates lack a repository-instruction basis and broad constants refactoring is outside this fix. The source fixture entries are independent producer scenarios that reuse synthetic IDs, not successive reads of one saved brief; their original bytes remain unchanged. Minor busy-label wording is retained. CodeRabbit's last successor review was rate-limited, so a green badge alone is not treated as approval.
No local browser was attempted. Authenticated browser/account and hosted database acceptance remain unverified. No customer/provider mutations, paid execution, migration or manual deployment was performed.
Final actor/session repair
Actor-boundary head 21c646b690412f2433f80f69681467fe82a9479c follows ad8028a normally. Four confirmed findings from review 5922498394 are fixed: account results carry the initiating actor and remain hidden until the current actor resolves; account-bootstrap deduplication includes actor identity; the release request token ref updates in the layout phase before reload; prepared stale assessments are rejected; transport assertion collection resets and drains per test at module scope. Late bootstrap/profile-save responses cannot replace another actor's account. No access token is stored in the dedup key or forwarded as account identity.
Regression evidence: four tests failed before the repair; 88 focused tests now pass, including existing profile upload consumers and same-identifier actor transitions. Independent review passed 30 relevant tests. TypeScript, changed-file lint and format passed. Final full suite: 3,023 passed / one skipped across 460 passed files. Production build passed with synthetic environment placeholders. Independent exact-head review approved 21c646b; its remote checks passed; the subsequent profile-form finding was repaired below. The repeated 100-line-cap findings remain unsupported by owning AGENTS.md/principles.md; their actual one-function-per-file rule was addressed in the preceding validation split. No bot-requested discussion replies or resolutions were posted.
Final successor a413d008dca703351da8e9fbe5a64747f6fd66fa fixes the additional profile-form finding from review 5922692160. Profile fields, modal and updating state now belong to the actor; previous values disappear synchronously during a new bootstrap, and old setters cannot erase the new actor's draft. Bootstrap failures keep the new actor unresolved. The form-state helper is extracted with stable setters. A failing regression now passes, including late profile-save completion after the next actor edits their form. 89 focused tests pass; the independent reviewer ran 19 tests and approved this exact commit. TypeScript, changed-file lint and formatting pass. Final full suite passed: 3,024 tests (one skipped). Production build passed with synthetic placeholders; all exact-head GitHub Actions and Vercel preview checks passed. Cubic completed with auto-approval blocked by its remaining style/test-strength findings, not a clean approval. Final review 5922797187 retains a broad hook-refactoring request, declined under the owning rules, and a P3 isolated-assertion concern. A controlled mutation removing both stale-setter guards made the existing late-save test fail exactly because actor B’s unsaved draft was erased; the exact source was restored and independently verified clean. Existing regression coverage therefore catches the defect, so no further source change was needed. Independent final exact-head source approval remains PASS; Cubic’s success status is not being represented as auto-approval.
Review disposition: note dependencies
Notes conservatively retain references to all sources in the opened case, not just the initial assessment subset. The UI displays all retained assessments and source summaries, so a user's free-text note can depend on any of them. These are withdrawal/retention dependencies, not a claim that each source independently validates every statement. Narrowing them to the initial assessment could preserve private derived text after other displayed evidence is withdrawn. Conservative withholding is intentional and independently reviewed.
This prepares a partial evidence-backed workpaper, not completed diligence, verified rights, provider integration or registration.
Summary by CodeRabbit
- New Features
- Added a catalog reviews workspace where users can prepare, browse, and reopen audits; review assessment summaries, evidence, and gaps; and save review notes.
- Added links to catalog reviews from the catalogs page and eligible assessments.
- Added controls for refreshing and paging through saved audits, with notices for loading, recovery, and save outcomes.