Repository navigation
Fix bugs from the repo audit: event order, stale data after untrack, reset/export gaps - #98
Merged
Merged
Conversation
- Drain sorts prod's newest-first pages oldest-first before persisting and routing, so workers see events in order (outcomes landed on the wrong run, runs in one tick were numbered backwards, episodes scrambled). - Untracking a student from the last board also purges their goal profiles and switches, so a re-add no longer mixes in stale goal runs. - Goal profile writes signal the states channel, so an open sheet stops showing the previous evidence for the newest run. - Reset keeps alerts that are still open (current state, not history). - The CSV export, and so the reset backup, includes goal evidence. - Resuming a paused board re-backfills its students to fill the pause gap. - A failed notes/history/detail fetch keeps the last good data instead of blanking; switching students still clears.
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.
Fixes from a full audit of the repo (backend, pipeline, frontend, prod data).
High
page_by_timeis newest-first (likepage_student), anddrainpersisted and routed in page order. In prod, 303 of 503 consecutive vex_log rows go back in time. So a tick with several events fed the worker backwards: a playgroundData outcome could attach to the wrong run, runs in one tick were numbered newest-first, and episodes scrambled. Drain now collects its pages and sorts oldest-first before persisting and routing.goal_profileorswitch_event, so a re-add mixed old goal runs into the rebuilt ones.Medium
student_state, with no change signal of their own, so an open sheet could refetch before the newest run's evidence landed.goal_profilenow bumps thestateschannel.goal_profile.Low
Every backend fix has a regression test in
tests/test_audit_fixes.pythat failed before the fix. Backend 262 passed, ruff clean; frontend 49 passed; build OK.Not changed (design questions): dismissing an identity switch is global rather than per board, and the trigger on/off config is global.
🤖 Generated with Claude Code