Skip to content

Milestone 4 slice 2: trainee timeline and the acknowledgment workflow #38

Closed

Description

@TusanHomichi

Problem or outcome

Second slice of Milestone 4 per the settled decisions in #32 (decision 3: all four verbs in v1), on the finalized-version substrate from #37. Delivers the trainee-facing half of defensible records: trainees see their own finalized versions and acknowledge, respond, or refuse them; coordinators record supervisor-attested refusals and unavailability; refusals escalate through the 0003 notice table. Acknowledgment means receipt, not agreement (docs/domain-model.md), binds to exactly one immutable version, and never alters the authored evaluation.

Scope

In scope:

  • Capabilities: view_own_records and acknowledge_own_record enter the implemented vocabulary (the deferral Milestone 3 design: sessions, drafts, and attribution (owner decisions needed) #22 recorded); the Trainee bundle carries both, and migration 0011 grants them to existing users identified by their enrollments — the typed trainee population — per capabilities.rs's rule that bundle changes reach existing users through explicit migrations
  • Migration 0011 — acknowledgment: bound by foreign key to one evaluation_version (so only finalized content is acknowledgeable and a successor version starts unacknowledged, by construction), the domain-model closed kind set (acknowledged, acknowledged_with_response, refused, supervisor_attested_refusal, unavailable), the subject user, the recording actor, the response or reason text, and the instant; append-only; one acknowledgment per version per person; shape held at the database — a plain acknowledgment carries no text, a response or any refusal reason is non-blank under the 0010 whitespace set, trainee-recorded kinds are recorded by the trainee and attested kinds never are, and the subject is always the version's own trainee
  • Services and API — acknowledge/respond/refuse by the trainee (acknowledge_own_record, own record, finalized, not yet acknowledged — each refusal typed); supervisor-attested refusal and unavailability recorded by review_evaluation holders with a required reason; a refusal of either origin escalates as notices to review_evaluation holders; finalization now also notifies the trainee that a record awaits acknowledgment; the own-records timeline read (view_own_records): the caller's finalized versions with acknowledgment status; the drafts read gate admits a trainee to their own record once it is finalized (sealed presentation only — working drafts stay out of scope); every acknowledgment audited
  • Web — a My Records timeline page; the sealed record view gains the acknowledgment panel for the record's trainee (acknowledge, respond, refuse with required reason) and acknowledgment status for every reader; coordinator attest controls where no acknowledgment exists; navigation for view_own_records holders
  • Tests and e2e — binding and append-only proofs (raw and service), the verb matrix including the recorded-by and subject backstops, escalation and await notices, timeline scoping (own records only; nothing unfinalized), API round trip, and e2e driving finalize → trainee opens their timeline → acknowledges with a response

Out of scope: amendments and re-acknowledgment mechanics (slice 3 — the version binding ships now so slice 3 gets re-acknowledgment by construction), acknowledgment windows or overdue escalation (needs a versioned-settings concept; refusal escalation ships now), weekly summaries and task signoffs (slice 4), exports (Milestone 5).

Acceptance criteria

  • a trainee sees exactly their own finalized versions on the timeline and can open the sealed presentation
  • acknowledge, acknowledge-with-response, and refuse each record once per version, typed-refused when repeated, unfinalized, someone else's, or unqualified; a refusal reason and a response are non-blank
  • coordinators record supervisor-attested refusal and unavailability with reasons; trainee-recorded and attested kinds are mutually exclusive at the database
  • refusals escalate as notices to reviewers; finalization notifies the trainee
  • acknowledgments are append-only and bound to the exact version, raw and through the service
  • all repository gates green

Expected proof

  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace
  • database tests: append-only, one-per-version-per-person, subject/recorded-by shape, binding to the version
  • npm run check, npm run build, npm run e2e in web/ — the e2e drives the trainee acknowledgment in a real browser

Related roadmap, decisions, or issues

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