Repository navigation
espn: fix roster-edit outcome classification (FREEAGENT/EXECUTED misrecorded as waiver_pending) - #184
Open
warnerktsang wants to merge 2 commits into
Open
warnerktsang wants to merge 2 commits into
warnerktsang wants to merge 2 commits into
Conversation
warnerktsang
added a commit
that referenced
this pull request
Oct 31, 2026
warnerktsang
added a commit
that referenced
this pull request
Oct 31, 2026
warnerktsang
added a commit
that referenced
this pull request
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug (live incident, 2026-10-30 ~23:00 ET)
Edit baefb882 (add Aday Mara, drop Myles Turner) was approved and submitted. ESPN's transaction 4024e95b is unambiguous: type FREEAGENT, status EXECUTED, effective the next scoring period (period 12). The module nevertheless recorded the edit's outcome as waiver_pending — implying a waiver claim and a priority spend that never happened. The propose-time snapshot had correctly said on_waivers: false, and the move itself worked.
Root cause
Two compounding defects in backend/espn/roster_edits.py:
The fix
The genuine waiver path is preserved: an edit for a player who IS on waivers still records waiver_pending (existing test with a WAIVER/PENDING response, plus a new test where ESPN echoes EXECUTED on a WAIVER transaction, plus a preservation test for the no-type-echo verification path).
Tests
ESPN scope: 565 passed (562 baseline + 3 new). The incident regression test replays a FREEAGENT/EXECUTED response (ADD/DROP items) with the add not yet on the roster (next-period effectiveness) and asserts executed; it and the type-keying test both fail on the pre-fix code, verified by stashing the fix.
Not in scope
The historical record baefb882 stays mislabeled in the DB — no backfill and no data migration for one row in this PR. No changes to propose/approve flows, payload stamping, or response shapes.