Repository navigation
Closed
Description
Problem or outcome
First slice of Milestone 3 per the settled design in #22 (all five owner decisions adopted as recommended there). Delivers the access and lifecycle substrate the session/draft slices build on: the expanded capability vocabulary with Trainer and Coordinator bundles, durable trainer-to-enrollment assignments behind assignment-scoped access, the modeled enrollment lifecycle events that migration 0005 promised, and the phase-history event stream — with the coordinator/trainer web interface for all of it.
Scope
In scope:
- capabilities
author_evaluation,review_evaluation,view_assigned_records; Trainer and Coordinator bundles; role-bundle selection and mutable profile fields (employee identifier, title) in user creation training_assignmentconnecting a trainer to an enrollment with start/end instants and attribution, producing anassignment_creatednotice to the assigned trainer- append-only
enrollment_event(version change with actor and reason, withdraw, complete, reinstate); the 0005 "refuse silent repointing" trigger replaced by a database-enforced event-mediated version change - append-only
phase_event(advance, return, restart, pause, resume, complete) carrying both effective and recorded instants, validated against the pinned version's transition graph - assignment-scoped reads: an assigned trainer holding
view_assigned_recordscan read their trainees' enrollment and phase history - ADR 0008 encoding the settled Milestone 3 design
- web interface: user creation with bundles and profile fields, assignment management, enrollment lifecycle actions, and the phase timeline
Out of scope:
- training sessions (slice 2), drafts and contributor history (slice 3), review workflow and the remaining notice kinds (slice 4)
- relaxing 0005's (user, version) uniqueness for re-enrollment — reinstate covers the workflow; revisit with demonstrated need
Acceptance criteria
- a coordinator can create a trainer with the Trainer bundle, assign them to an enrollment, and the trainer is notified and can read that trainee's history
- enrollment version changes require a modeled event with actor and reason; silent repointing is refused by the database
- phase history records effective-dated events validated against the pinned transition graph, preserving both instants; nothing assumes monotonic progress
- enrollment and phase reads are refused without capability plus assignment scope
- all repository gates green
Expected proof
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace- database-invariant tests: append-only event streams, event-mediated version change, phase events pinned to the enrollment's version
npm run check,npm run build,npm run e2einweb/
Related roadmap, decisions, or issues
- Refs Milestone 3 design: sessions, drafts, and attribution (owner decisions needed) #22 (design record; stays open across slices); ADR 0007;
docs/roadmap.mdMilestone 3; migration 0005's deferral comments name this work
Metadata
Metadata
Assignees
Labels
No labels
Activity
training(lifecycle): harden review findings on scope, epochs, and pins
assignments(create): require view_assigned_records of the trainer
training(lifecycle): epoch time boundary, snapshot reads, eligible pi…