Skip to content

tracecheck: threat_off_tank counts only mobs that are on the holder, with a live tank (ties go to the tank) - #283

Merged
pjerra merged 1 commit into
devfrom
fix/threat-oracle-refine
Oct 21, 2026
Merged

pjerra merged 1 commit into
devfrom
fix/threat-oracle-refine

Conversation

@pjerra

@pjerra pjerra commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The threat_off_tank oracle failed in every round 1/2 run, but about a quarter of its episodes were artefacts (PLAN-THREAT-265 section 1). Now a frame counts only when the mob's target is the top-threat holder; mobs with no target or out of combat (polymorph, flee, evade) are skipped; frames where the tank is dead are skipped; a tie between the tank and the holder is the tank's; Detail adds the rate per tank-combat-hour; observe mode writes header.tank = lead (older traces without it keep the role / most-often-top-threat fallback). Re-scored 5 traces: 56->40, 87->90, 136->77, 89->72, 172->125 (540->404 episodes; long-span seconds 6505->3442). Fixture tests per rule with fail-if-removed checks; go test clean. Review: Sonnet cold review (SHIP, LOW notes only: a frame that omits the tank counts as not alive; a dead tank hides off-tank time, by spec). Not a fix for the threat itself: that is the module change (engage on arrival, separate PR).

threat_off_tank counted a mob whenever a non-tank was on top of its threat
list, so polymorphed, fleeing and evading mobs, mobs that still swung at the
tank, and dead-tank frames all showed as lost threat.

A frame now counts only when the mob's tg is the holder; mobs with no target
or out of combat are skipped, as are frames where the tank bot is not alive
(the span ends there). A tie between the tank and the holder counts as the
tank's, since the core keeps a tie in insertion order.

The detail now reports the spans per tank-combat-hour as well as the worst
span. An observed run's trace names the lead bot in header.tank: the server's
run leader drives it and is the tank, so the check no longer guesses.

Fixture tests cover each rule, the tie and the rate; the README check table
says what the check reads.
@pjerra
pjerra merged commit 32c344e into dev Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant