Skip to content

fix(buff_state): QueueLogic initial stacks drop shortest non-front - #247

Merged
Roddygithub merged 6 commits into
mainfrom
fix/buff-uptimes-merge
Aug 19, 2026
Merged

Roddygithub merged 6 commits into
mainfrom
fix/buff-uptimes-merge

Conversation

@Roddygithub

Copy link
Copy Markdown
Owner

Summary

Fixes QueueLogic initial overflow handling and Dolyak Signet effect GUID.

Changes

1. QueueLogic initial stacks ()

Initial stacks from (CBTS_BUFFAPPLY snapshots at fight start) were incorrectly dropping the oldest stacks on overflow. EI's QueueLogic drops the shortest duration non-front stack and replaces it in-place to preserve queue order.

Fixed to process each initial stack with the same overflow logic as mid-combat applies.

Impact: Improves swiftness/protection/quickness/vigor/aegis/resistance/resolution/superspeed/stealth uptimes. Reduces diffs from 232 → 226 (-6).

2. Dolyak Signet GUID variant ()

Logs contain GUID () but only had (). Both variants now mapped to skill 14413.

Impact: Resolves 2 missing Dolyak Signet casts. Reduces diffs from 41 → 37 (-4).

Parity Results

Metric Before After
Total diffs 302 292
buffUptimes.uptime 232 226
rotation (player rows) 41 37

All tests pass (342 analytics + 190 parser). Ruff/mypy clean.

Next Steps

  • Investigate handling for QueueLogic (ignore natural expiration notifications with source=0, duration>0)
  • Identify recorder's squad for proper filtering
  • Fix instance-recycling slice bounds in

Signed-off-by: Roland Salardon r.salardon@gmail.com

…ID fix

- rotation.py: use ownership_resolver (TemporalIdentityResolver) for all pet/minion
  spawn attribution (Ranger Pet -28, Siege Turtle, Fern Hound, Smokescale,
  Warclaw, Jungle Stalker) instead of static spawn_owner_by_target map
- rotation.py: add gw2_build parameter and GW2 build 194363 cutoff for Sand
  Cascade effect GUID -> skill ID mapping (pre-194363: 62671, 194363+: 43448)
- ei_compare.py: pass fight.header.gw2_build to build_skill_rotation
- test_rotation.py: update post-July Sand Cascade test to pass gw2_build=200000

Signed-off-by: Roddygithub <roddygithub@users.noreply.github.com>
- buff_state.py: increase Regeneration capacity 5->15, Resolution 9->15
  (matches EI's effective queue depth; fixes 52 buffUptimes diffs)
- test_buff_state.py: update Regeneration eviction test for new capacity

Signed-off-by: Roddygithub <roddygithub@users.noreply.github.com>
- _advance_intensity: decrement total_durations with elapsed time to match
  EI's Shift() where TotalDuration = Duration + Extensions decreases as
  Duration ticks down. This fixes extension grafting matching stale
  TotalDuration values.

- remove_single OverrideLogic: add TotalDuration ±15ms fallback matching
  EI's Math.Abs(removedDuration - TotalDuration) < BuffSimulatorDelayConstant
  when stack_id match fails. Removes index-0 fallback that incorrectly
  dropped shortest stack.

Result: Might (740) diffs 248 → 21, total EI diffs 536 → 302.

Signed-off-by: Roddy <roddy@localhost>
Fix formatting issues from CI lint check.

Signed-off-by: Roddy <roddy@localhost>
- _process_buff_apply: apply same overflow logic as mid-combat applies
  (drop shortest non-front duration, replace in-place) instead of
  dropping oldest stacks. Fixes swiftness/protection/quickness uptimes.
- rotation: add both observed Dolyak Signet effect GUID variants
  (...1EE... and ...C3E...) to _EFFECT_CASTS_BY_DST.

Reduces EI parity diffs: 302 -> 292 (buffUptimes 232->226, rotation 41->37).

Signed-off-by: Roland Salardon <r.salardon@gmail.com>
Signed-off-by: Roddygithub <roddygithub@users.noreply.github.com>
@Roddygithub
Roddygithub enabled auto-merge (squash) August 19, 2026 21:43
…ion/quickness

- swiftness: 9 -> 15 (matches EI queue capacity for high-uptime boons)
- protection: 9 -> 15 (matches EI, fixes E N A.7540 -1.09% diff)
- quickness: 9 -> 15 (matches EI, fixes LuiStheGamers -0.58% diff)
- fury: already 15

These capacities match Elite Insights' BuffSimulatorDuration queue sizes
for boons that frequently stack from multiple sources in WvW.

Reduces buffUptimes diffs: 226 -> 190 (-36), total diffs: 292 -> 256 (-36).

Signed-off-by: Roland Salardon <r.salardon@gmail.com>
Signed-off-by: Roddygithub <roddygithub@users.noreply.github.com>
@Roddygithub
Roddygithub merged commit 89b47ec into main Aug 19, 2026
11 checks passed
@Roddygithub
Roddygithub deleted the fix/buff-uptimes-merge branch August 19, 2026 22:19
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