Repository navigation
Description
Problem or outcome
Last slice of Milestone 4 per the settled decisions in #32 (decision 5: a weekly summary carries its own authored content and validated links to exact daily versions; decision 6: task signoffs are in scope as the closing slice). Delivers the two remaining record kinds: the WeeklySummary — its own EvaluationRecord type referencing the exact finalized daily-report versions it covers, with independent narrative, finalization, acknowledgment, and amendment history (docs/domain-model.md) — and the TaskSignoff — a versioned record that a configured task was observed or demonstrated, where overrides require explicit authority and a recorded reason. With these, the Milestone 4 record-and-acknowledgment scope in docs/roadmap.md is complete.
Scope
In scope:
- Weekly summary records — created on an enrollment (coordinator, or an assigned
author_evaluationholder) from a pinnedweekly_summaryform; the working copy carries the form's own ratings and narratives exactly like a daily plus the daily links: references to exact finalized daily-reportevaluation_versionrows of the same enrollment, authored while editable, frozen with the copy, validated typed (finalized, daily-report type, same enrollment — a link to a draft, another enrollment, or a non-daily is a typed refusal, held raw by triggers). Links pin the exact version: a later amendment of the daily never rewrites what the summary summarized. - Record schema 2 — the envelope gains the canonically ordered
daily_reportsmember (record id, version number, content hash per link; empty for daily reports), so the summary's bytes commit to exactly what it covered. New finalizations emit schema 2; existing schema-1 bytes are never rewritten (ADR 0011's evolution rule). Presentation resolves each link through its pinned immutable version, never a mutable join. An ADR records schema 2, the weekly linking model, and the task-signoff model. - The full record lifecycle applies unchanged — completion rules from the pinned version's policy, review as configured, finalization, acknowledgment (records(ack): acknowledgments and the trainee timeline #39), and amendments (Milestone 4 slice 3: amendments and successor versions #40, ADR 0012) all operate on weekly summaries because they are ordinary records; tests prove it rather than rebuilding it.
- Task signoffs —
task_signoff: enrollment, pinned task (owned by the enrollment's pinned version, held raw), kind from a closed set (observed,demonstrated,revoked), signing actor with a presentation-name snapshot, instant; append-only and versioned per (enrollment, task) — the latest row is the current state. The first signoff takes an assigned author or coordinator; any subsequent row is an override takingreview_evaluationand a required non-blank reason (the 0009 White_Space set), held raw. Audited (task_signoff_recorded). - Web — weekly-summary creation from the enrollment page (form picker when the version pins several), the link picker over the enrollment's finalized dailies in the workspace, sealed presentation of the covered dailies from the envelope, and the task-signoff panel on the enrollment page (competency → task matrix with current state, sign and override-with-reason controls); the trainee timeline already lists summaries because they are records.
- Tests and e2e — link validation typed and raw; schema-2 envelope round trip with byte reproducibility and link hashes; the lifecycle matrix on a weekly summary (submit/review/finalize/acknowledge/amend smoke); signoff versioning (initial, override authority, reason shape, revocation) typed and raw; e2e driving create summary → link finalized daily → author narrative → finalize → trainee acknowledges, plus a signoff with an override.
Out of scope: acknowledgment windows and reminders, attachments, retention/disposition, exports and the export identity of schema 2 (Milestone 5), phase evaluations (a later milestone; the record type exists in configuration only).
Acceptance criteria
- a weekly summary links only finalized daily-report versions of its own enrollment, pinned exactly; the links freeze with the copy and seal into the envelope
- schema-2 bytes reproduce and their
daily_reportsmember carries each link's version number and content hash; schema-1 records remain untouched and readable - weekly summaries travel the whole existing lifecycle: policy gates, review, finalization, acknowledgment, amendment
- task signoffs are append-only and versioned per (enrollment, task); the first takes authoring scope, every override takes
review_evaluationand a recorded reason; the latest row answers the current state - all repository gates green
Expected proof
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace- database tests raw and through the service for the link and signoff backstops
npm run check,npm run build,npm run e2einweb/— the e2e drives the weekly summary and a signoff in a real browser
Related roadmap, decisions, or issues
- Refs Milestone 4 design: defensible records (owner decisions needed) #32 (decisions 5 and 6; slice order), ADR 0011 (schema evolution by
record_schemabump), ADR 0012 (amendments apply to summaries unchanged),docs/domain-model.mdWeeklySummary and TaskSignoff,docs/roadmap.mdMilestone 4 - Builds on records(finalize): canonical bytes, completion rules, and the immutable version #37, records(ack): acknowledgments and the trainee timeline #39, records(amend): amendments and successor versions #41; closes out the Milestone 4 design: defensible records (owner decisions needed) #32 slice plan
Activity
records(summary): weekly summaries, schema 2, and task signoffs