Summary
Implement a safe yearly reset workflow that previews changes in a dry-run summary and requires explicit admin confirmation before execution.
Problem
The MVP requires an annual reset flow where users are prompted to refresh roles and guild configuration can be updated ahead of the new school year.
This is a high-impact operation because it can affect:
- role assignments
- year/group structure
- announcement behavior
- eligibility assumptions across the guild
The specification requires that the reset must not execute blindly. A dry-run and explicit confirmation are mandatory.
Why This Matters
This is a safety-critical MVP workflow.
It protects against:
- accidental destructive resets
- stale or incorrect academic-year configuration
- unintended mass role changes
- unreviewed announcement execution
Without this guard, the yearly reset is operationally risky.
Required Behavior
- Admin can initiate a yearly reset preparation flow.
- System produces a dry-run summary of proposed changes.
- Reset does not execute until explicit confirmation is received.
- Execution and confirmation are audited.
- Reset remains tied to the configured year-start workflow already defined in the MVP.
Acceptance Criteria
- Dry-run preview is generated before any reset side effect is applied.
- Reset cannot run without explicit confirmation.
- Preview includes enough information for an admin to review the impact.
- Confirmation and execution are both audited with actor and timestamp.
- Cancellation path leaves the current guild state unchanged.
Dry-Run Should Include
At minimum:
- target guild
- effective reset date
- current config summary
- proposed config summary
- affected role categories
- affected reset actions
- announcement intent or preview summary
Suggested Implementation Targets
- src/commands/admins/announce.ts or a new yearly reset command
- new scheduler or reset service under src/services
- prisma/schema.prisma for audit persistence if needed
- src/services/PostgresDatabaseService.ts
Suggested Technical Direction
Separate yearly reset into two phases:
-
Plan phase
- read config
- compute intended reset actions
- return preview summary
-
Execute phase
- require explicit confirmation token or command path
- apply changes
- emit audit records
- trigger announcement flow
Validation
- unit test: dry-run computes expected actions without side effects
- unit test: execute path is blocked without confirmation
- integration test: confirmed reset applies intended changes
- integration test: cancelled reset leaves system unchanged
- audit test: dry-run, confirmation, and execution are all traceable
Traceability
- Spec: docs/specs/issue-93-specification.md
- Matrix rule: TRC-014
- Related docs:
- docs/specs/traceability-matrix.md
- docs/specs/issue-drafts.md
- docs/specs/mvp-scope.md
Related Issues
Summary
Implement a safe yearly reset workflow that previews changes in a dry-run summary and requires explicit admin confirmation before execution.
Problem
The MVP requires an annual reset flow where users are prompted to refresh roles and guild configuration can be updated ahead of the new school year.
This is a high-impact operation because it can affect:
The specification requires that the reset must not execute blindly. A dry-run and explicit confirmation are mandatory.
Why This Matters
This is a safety-critical MVP workflow.
It protects against:
Without this guard, the yearly reset is operationally risky.
Required Behavior
Acceptance Criteria
Dry-Run Should Include
At minimum:
Suggested Implementation Targets
Suggested Technical Direction
Separate yearly reset into two phases:
Plan phase
Execute phase
Validation
Traceability
Related Issues