Repository navigation
Closed
Description
Problem or outcome
Fourth and final slice of Milestone 3 per the settled design in #22 and ADR 0008, on the draft substrate merged in #29. Delivers the review workflow: a submitted draft is decided by a qualified reviewer — approved, returned with change requests, or returned plain — completing the milestone exit: trainers document an invented session collaboratively without losing attribution, and the documentation moves through review.
Scope
In scope:
review_decision: the decision record — reviewer, decision from the closed set (approved,changes_requested,returned), comment (required for change requests, held by a CHECK), decided instant; append-only at the database; a decision row is accepted only while the record's latest contributor event is submitted-for-review, and the database also refuses a reviewer who appears in the record's attribution- single-step, capability-gated review (ADR 0008): any
review_evaluationholder who is not a contributor decides; self-review refused — a contributor is the current owner, an actor of created/contributed/submitted events, or an ownership recipient (a coordinator who only moved ownership between others stays eligible); a reviewer who requested changes earlier remains eligible for the resubmission - decision effects, derived from the stream plus the latest decision (never stored beside them):
approvedkeeps the working copy frozen — it awaits Milestone 4 finalization;changes_requestedtakes the second snapshot (change_request_return, per ADR 0008's two snapshot points) and reopens the copy;returnedreopens without a snapshot; resubmission repeats the submission contract (snapshot, freeze, viewed revision) - migration 0009 reworks the 0008 freeze triggers onto the derived frozen state (submitted or approved ⇒ frozen; the 0006 drop-and-recreate precedent), keeping the database backstop exact through the new states
- the
review_decidedcontributor event (the kind slice 3 reserved) pairs with each decision; creation, and every decision, audited (draft_review_decided) - workflow notices (0003 table): submission notifies
review_evaluationholders except the submitter; each decision notifies the owner (draft_approved,draft_changes_requested,draft_returned) - reads:
review_evaluationholders read records that have been submitted at least once; a review queue read lists currently submitted drafts with the caller's eligibility - web: a Review queue card on home for reviewers; a decision panel on the draft workspace (approve / request changes with required comment / return) shown exactly when the caller may decide; decisions with comments presented in the workspace; reopened drafts editable with the change request visible; approved drafts frozen with their status shown; resubmission from the reopened state
Out of scope:
- configured multi-step review chains (ADR 0008 rejected for v1), whether review is required before finalization (Milestone 4 completion rules, versioned configuration), weekly summaries, finalization, acknowledgments, amendments (Milestone 4)
Acceptance criteria
- a qualified non-contributor reviewer can approve, request changes (comment required, refused typed without one), or return a submitted draft; deciding an unsubmitted draft is refused
- self-review is refused for the owner, authors, the submitter, and ownership recipients — at the service and the database — while an uninvolved coordinator may decide
- approval keeps the draft frozen at the service and the database; a change request snapshots the reviewed content with reason
change_request_returnand reopens the copy; plain return reopens without a snapshot - the reopened draft edits and resubmits under the same revision contract, and the earlier reviewer may decide the resubmission
- the decision stream is append-only, decision rows are refused on unsubmitted records, and every decision appears in the attribution stream and the audit log
- submission and decisions produce the documented notices to the affected users
- all repository gates green
Expected proof
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace- database tests: append-only decisions, submitted-only decision inserts, self-review backstop, frozen-when-approved and thawed-when-returned raw refusals
- service tests: eligibility matrix, comment requirement, full submit → changes → edit → resubmit → approve cycle, notices, queue gating
npm run check,npm run build,npm run e2einweb/— the e2e drives request-changes → revise → resubmit → approve in a real browser
Related roadmap, decisions, or issues
- Refs Milestone 3 design: sessions, drafts, and attribution (owner decisions needed) #22 (design record; closes with this slice's milestone completion decision left to the owner); ADR 0008;
docs/roadmap.mdMilestone 3;docs/domain-model.mdReviewDecision; builds on Milestone 3 slice 3: daily evaluation drafts with contributor history #28/drafts(attribution): daily evaluation drafts with contributor history #29
Metadata
Metadata
Assignees
Labels
No labels
Activity
review(workflow): single-step review for daily drafts
storage(drafts): roll back refused writes before returning
drafts(freeze): guard both sides of raw row moves
review(schema): decisions advance the workflow atomically
review(schema): guard the event stream the frozen state derives from
review(schema): anchor raw change requests; finish the blank-comment set
drafts(freeze): coverage is frozen with the copy