Model rank/class I–IV as a comparable enum #10

Closed
opened 2026-07-01 00:50:39 +00:00 by manlycucumber · 0 comments
manlycucumber commented 2026-07-01 00:50:39 +00:00 (Migrated from github.com)

Problem

The traditional system ranks days as classes I through IV. Precedence and sorting need a single comparable type so the resolver can order observances deterministically.

Design alignment (v0.1.0)

Rank is a per-edition attribute (Layer 2 of the identity / edition / year model), not part of the Observance ID. The same subject can hold a different class across editions (e.g. 1954 vs 1962), so rank is resolved per edition and never encoded in the identity slug. See docs/design/observance-id-grammar.md.

Acceptance criteria

  • Rank type expresses classes I–IV with a total ordering
  • Comparison helpers (higher/lower/equal) are provided and tested
  • Constructs from an edition attribute record (not from an ID token)
  • Retains the edition's native/legacy rank token for round-trip fidelity
  • Unit tests verify ordering and equality across all four classes

Notes

Keep the type rubric-generic so later editions can remap legacy ranks (duplex / semidouble / simple → I–IV) at data-load time.

## Problem The traditional system ranks days as classes I through IV. Precedence and sorting need a single comparable type so the resolver can order observances deterministically. ## Design alignment (v0.1.0) Rank is a **per-edition attribute** (Layer 2 of the identity / edition / year model), **not** part of the `Observance` ID. The same subject can hold a different class across editions (e.g. 1954 vs 1962), so rank is resolved per edition and never encoded in the identity slug. See `docs/design/observance-id-grammar.md`. ## Acceptance criteria - [ ] Rank type expresses classes I–IV with a total ordering - [ ] Comparison helpers (higher/lower/equal) are provided and tested - [ ] Constructs from an edition attribute record (**not** from an ID token) - [ ] Retains the edition's native/legacy rank token for round-trip fidelity - [ ] Unit tests verify ordering and equality across all four classes ## Notes Keep the type rubric-generic so later editions can remap legacy ranks (duplex / semidouble / simple → I–IV) at data-load time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Directorium/Core#10
No description provided.