History Entry
Historized is a mixin that adds typed, auditable change-tracking to an entity. Entities that include it gain a history field holding an immutable set of HistoryEntry records that accumulate across scope merges — no entry is ever discarded.
UserStory and Task carry Historized; UserStory overrides the field type to frozenset[UserStoryHistoryEntry] so that AC-level changes are recorded at the story level.
ChangeKind
ChangeKind
Bases: str, Enum
Classifies the type of change recorded in a HistoryEntry.
Attributes:
| Name | Type | Description |
|---|---|---|
CREATED |
The entity was created. |
|
UPDATED |
One or more of the entity's fields were modified. |
|
DEACTIVATED |
The entity was deactivated or retired. |
|
SUPERSEDED |
The entity was replaced by another entity. |
HistoryEntry
HistoryEntry
Bases: BaseModel
A timestamped record of a change made to a Historized entity.
Attributes:
| Name | Type | Description |
|---|---|---|
timestamp |
datetime
|
When the change was recorded (must be timezone-aware). |
description |
str
|
Free-form prose describing what changed. |
kind |
ChangeKind
|
Categorical type of the change. |
author |
str | None
|
Who made the change. Free-text string; defaults to None. |
UserStoryHistoryEntry
UserStoryHistoryEntry
Bases: HistoryEntry
A HistoryEntry specialised for UserStory changes.
Extends the base entry with sets of AC ids that were added or deactivated as part of the recorded change event.
Attributes:
| Name | Type | Description |
|---|---|---|
added_acs |
frozenset[int]
|
Integer ids of AcceptanceCriteria newly attached in this change. |
deactivated_acs |
frozenset[int]
|
Integer ids of AcceptanceCriteria deactivated in this change. |
Historized
Historized
Bases: BaseModel
Mixin that adds a typed change history to an entity.
Entities inheriting this mixin carry a history field holding an
immutable set of :class:~fushinryu_model.history_entry.HistoryEntry
records. Subclasses may narrow the field type (e.g. to
frozenset[UserStoryHistoryEntry]).
Merge semantics: history accumulates — both sides are unioned. Two entries are equal only when every field matches; identical entries appear once.
Attributes:
| Name | Type | Description |
|---|---|---|
history |
frozenset[HistoryEntry]
|
Ordered set of change records. Defaults to an empty frozenset. |