20 lines
4.8 KiB
Markdown
20 lines
4.8 KiB
Markdown
# RP32 — Verify project updates and archive outcomes before releasing drafts
|
|
|
|
Parent E12. Priority P1 / High draft-custody/state defect. Complexity M. Dependencies R04, RP30. Owner continuation authorizes implementation and commits. All seven conditional tasks remain deferred.
|
|
|
|
Verified baseline: `ResearchProjectPage.mutateProject` accepts any readable project response, replaces local project state and discards metadata/child drafts. Its conflict flag blocks metadata saves but archive actions and child writes can bypass it. `ResearchEntry.archive` ignores the returned record, clears editing and refreshes; an uncertain outcome leaves archive retries enabled. Existing project conflict/reload controls and revision draft controls provide most of the necessary recovery UI.
|
|
|
|
Scope: verify project edits/archive/restore against the captured normalized patch, stable ID/owner and expected next project revision. Verify hypothesis/note/finding archive acknowledgements against stable entry/project/owner/parent/kind/linkage and requested archive flag. Archive requests do not carry narrative revision preconditions: accept a valid newer latest revision from a concurrent editor; do not compare it to the stale loaded narrative or recalculate evidence. Refuse false success refresh/discard. Block further project/child writes after uncertain project outcomes and entry writes after uncertain archive outcomes, while preserving drafts. Explicit discard/reload must enter loading before releasing uncertainty; ordinary background refresh must not silently release it. Known nonambiguous refusals retain current retry behavior.
|
|
|
|
Affected files: `ResearchProjectPage.tsx`, `components/ResearchEntry.tsx`, existing research workspace UI tests, browser workbench and walkthrough. Reuse shared project patch schema, research API errors and current read endpoints. A small entry archive-uncertainty state/control is permitted; do not create a mutation framework. No backend/schema/financial/permission/idempotency change, archive revision precondition, forced narrative equality, strategy membership semantics, real study execution or deferred work.
|
|
|
|
Acceptance/tests:
|
|
|
|
- Reproduce stale/foreign/altered project patch and entry archive acknowledgements clearing drafts/refreshing falsely. Verify project ID/owner/revision/title/description/archive state and entry ID/project/owner/parent/kind/linkage/target archive flag. Valid normalized project saves and both archive/restore directions work; a legitimately newer narrative revision may accompany entry archival.
|
|
- Failed verification and lost/malformed/server-error responses preserve metadata/entry drafts and block one-shot retries. Project uncertainty blocks archive, membership and child writes, including existing child drafts. Refresh alone preserves the block; explicit discard/reload releases it only through loading/verified project reads. Existing known 4xx, conflict, loading/error/empty, historical and stale-response behavior remains intact.
|
|
- Actual production-built Chromium commits ordinary metadata/archival writes while corrupting acknowledgements, retains blocked raw drafts with one PATCH each, deliberately reloads and reopens exact committed project/archive state and narrative history. Native result, run/dispatch counts and narrative revision counts remain unchanged by archive/recovery.
|
|
- Run workspace/finding/source/canonical UI suites, complete browser workbench, application/authored types, contracts, strict scoped lint/formatting, secrets and diff checks. No native rebuild or performance work.
|
|
|
|
Definition of done: focused red regressions, minimal checks/recovery gates, root review, passing tests, usage/evidence/task updates and commits. No new architecture approval or real study activation.
|
|
|
|
Accepted after root review: plan `233178d4`, implementation `f84fa82b`. All 35 baseline acknowledgement/bypass regressions failed before implementation. Final workspace/finding/source/canonical UI suites passed 281 tests / 1,891 assertions. Complete built Chromium workbench passed 26 / 967, including real committed metadata/entry/project archival writes, corrupted acknowledgements, preserved blocked drafts, one PATCH per uncertain operation, deliberate recovery and ordinary restores. Narrative history, native result and run/dispatch counts remain unchanged. Initial archive review removed an unnecessary restriction on prior narrative revision conflicts; the added compatibility regression and final full browser rerun pass. Known 403 refusals remain retryable; project 409 conflicts cannot bypass review through archive/child writes. Application/authored types, contracts, strict scoped lint, formatting, secrets and diff checks passed. Disposable PostgreSQL/Redis fixtures were stopped. [Execution evidence](../../real-data-research.md#rp32--verified-project-updates-and-archive-outcomes).
|