Skip to content

fix: evict oldest note before an unread handoff/question/answer - #15

Merged
praneethravuri merged 1 commit into
mainfrom
fix/priority-eviction
Jul 30, 2026
Merged

praneethravuri merged 1 commit into
mainfrom
fix/priority-eviction

Conversation

@praneethravuri

Copy link
Copy Markdown
Owner

Summary

  • Inbox eviction at the 500-message cap (qDropOldest) ordered strictly by id regardless of kind, so a flood of note messages could silently discard the handoff that carried the actual task
  • Fix: ORDER BY kind = 'note' DESC, id — notes evict first; handoff/question/answer only start dropping once every pending note is gone
  • Delivery order (qInbox) is untouched — still pure FIFO
  • README Bounds bullet corrected to match

Test plan

  • New test TestSendEnforcesInboxDepthPrefersDroppingNotes, written first and confirmed failing against the unmodified query
  • make lint && make test (race, full suite) — green

Inbox eviction at the 500-message cap dropped strictly oldest-first
regardless of kind, so a flood of notes could silently discard the
handoff carrying an agent's actual task.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@praneethravuri
praneethravuri merged commit c4d9aac into main Jul 30, 2026
26 checks passed
@praneethravuri
praneethravuri deleted the fix/priority-eviction branch July 30, 2026 05:09
praneethravuri added a commit that referenced this pull request Aug 1, 2026
fix: evict oldest note before an unread handoff/question/answer
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