Skip to content

Milestone 4 slice 4: weekly summaries and task signoffs #42

Closed

Description

@TusanHomichi

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_evaluation holder) from a pinned weekly_summary form; the working copy carries the form's own ratings and narratives exactly like a daily plus the daily links: references to exact finalized daily-report evaluation_version rows 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_reports member (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 taking review_evaluation and 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_reports member 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_evaluation and 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 e2e in web/ — the e2e drives the weekly summary and a signoff in a real browser

Related roadmap, decisions, or issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions