Skip to content

Milestone 1: persisted in-app notices, with backup failures as the first producer #10

Closed

Description

@TusanHomichi

Problem or outcome

The architecture requires workflow notices to be persisted and shown in the application — nothing may depend on email delivery. The shell (#6) has nowhere to surface operational events, and a failing automatic backup (#8) currently reaches only the server log, which a small center may never read. Establish the notices mechanism now with backup failure as its first real producer, so later milestone workflows (finalization, review requests, acknowledgments) land on proven plumbing.

Scope

In scope:

  • Migration 0003: notice table (recipient user, kind, message, created instant, read instant), STRICT, recipient-scoped
  • Notices domain service: create, list for recipient (unread first), mark read (own notices only — recipient-scoped authorization)
  • Producer: when an automatic backup fails, every user holding manage_users receives a notice (deduplicated so a repeatedly failing backup does not flood: no new notice while an unread backup-failure notice exists for that user)
  • HTTP: GET /api/notices (authenticated, own notices), POST /api/notices/{id}/read (own notices only)
  • Shell: notices panel on the status page with unread count and mark-read; unread count in the header
  • Integration tests: scoping (no cross-user reads or mark-reads), dedup behavior, producer on backup failure, API auth
  • Browser E2E extended to cover the notices panel

Out of scope:

  • Workflow notices for training-domain events (their milestones own them)
  • SMTP mirroring (held until justified)
  • Notice retention/expiry policy (revisit with retention administration in Milestone 5)

Acceptance criteria

  • A failed automatic backup produces exactly one unread notice per administrator until acknowledged
  • Users see only their own notices and can only mark their own as read
  • Notices survive restart (persisted, not in-memory)
  • All repository gates pass

Expected proof

  • cargo fmt --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace
  • npm run check && npm run build in web/; browser E2E

Related roadmap, decisions, or issues

Activity

  1. added a commit that references this issue on Aug 28, 2026
    8671060
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