Term Lifecycle
What It Models
The lifecycle gives Membership one shared interpretation of term dates, standing and continuity. It also supplies sweep decisions and the catalogue of explanations staff use for status actions. The memberships module owns and changes the records being interpreted.
Identity and Attributes
Pure functions receive rules, dates and term facts and return dates, status, episodes, cache values or detections. The facade can obtain program and type settings through domain hooks. Reusable column declarations define the stored vocabulary; status reasons have ordinary configuration identities.
Relationships
Packages and grants supply term rules, and programs and types supply allowances. Memberships locks its holdings, reads terms, calls the engine and persists the answers. Configuration stores and serves the reason catalogue on the lifecycle's behalf.
Invariants
The structured rows distinguish pure decision functions from facade methods and database column declarations. A term that reaches its end retains its stored state; its calculated standing changes with the requested date.
How It Is Stored and Shared
The terms service exposes calculation code and a workspace health route. It owns no holding or term table. Memberships implements purchase, staff and sweep execution, while the engine's declared Commerce and billing entry points still fail as unbuilt.
Open Design Questions
Fixed-window behavior for fresh purchases, reinstatement absence and overlapping windows remain unsettled. Reason-use changes and the cancellation fallback must be reconciled with planning before implementation preparation.