[P1] Test the untested attribution cores (Observe, block ledger, poison proration) + golden event-sequence replay #262
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens#262
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: P1. From the 2026-07-02 uncapped audit pass. Covers load-bearing untested cores (distinct from the #257 test-fidelity hygiene). Depends on the CI-gate issue to be protective.
Untested attribution cores
Observe()— the master routing point for every combat-history entry — has zero tests (#116). It should have a table-driven test feeding each entry type and asserting the rightRecord*path fires.gained == absorbed + wasted + remainingacross a scripted sequence.TryRecordPoisonTickDamagefractional-share proration across multiple owners is untested (#117).Flake time-bomb (fix now-ish)
CombatEndingDamageTestsmutates the shared_observedDamageResultsstatic with no xUnit[Collection]serialization (#118) — two test classes touching that static can race under parallel execution and abort the hard unit-test gate. Add a[Collection("RunTrackerState")]/DisableParallelizationcollection around the tests that touch mutableRunTrackerstatics.Highest-leverage new artifact — golden event-SEQUENCE replay harness (#150)
Every lifecycle-ordering bug this codebase has hit (killing-blow suppression, Continue re-fire, loss-before-CombatEnded, CardEnterDeckPatch-before-RunStarted) was found in live play because the tests pin methods, never orderings. Build a harness that replays a recorded sequence of
CombatHistoryEntry/ lifecycle events throughObserve+ the lifecycle handlers and asserts the finalRunData. Extract the testable cores behind internal seams (InternalsVisibleTois already granted). Record each discovered ordering trap as a replayable fixture —SchemaLoadingTestsdoes this for shapes; this does it for time.Findings: #116, #115, #117, #118, #150.
Closing during repository issue cleanup. If this becomes active work again, we can reopen or recreate it as a fresh, specific task.