Skip to content

Milestone 3 slice 1: capabilities, assignments, and enrollment lifecycle #23

Closed

Description

@TusanHomichi

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_assignment connecting a trainer to an enrollment with start/end instants and attribution, producing an assignment_created notice 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_records can 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 e2e in web/

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