fix(channels): bound inbound debounce key-chain — steal from unsettled flushes (tulgey#238)#15
Conversation
…ettled flushes A flush whose downstream work never settles (hung pre-agent media call in processMessage) parked every later inbound for that chat key on a dead promise chain: messages logged as Inbound, never reached the command queue, and the chat went permanently silent until restart re-primed the same poison. Fourth member of the unbounded await-the-prior-holder family (session lock #6, models.json #11, lane slot #12). Bounded at OPENCLAW_INBOUND_CHAIN_WAIT_MS (default 5 min) with a warn naming the chat key. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges. Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR introduces a chain-steal mechanism to the inbound debouncer. Per-key task execution now uses a bounded timeout on prior promises; if a prior flush hangs beyond the configurable threshold, the chain is stolen and the new task proceeds with a warning. Two test cases verify that hung first flushes don't block second messages and that ordering is preserved when tasks settle normally. ChangesInbound Debouncer Chain Steal Mechanism
🎯 3 (Moderate) | ⏱️ ~20 minutes
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The chat-deafness bug: one hung flush permanently parked all later messages for that chat (inbound logged, command queue never reached). Live-confirmed via inspector lane dump: lanes completely empty while messages arrived. Bounded chain wait (5 min, env-tunable) + steal + warn naming the key. Regression test: never-settling flush no longer deafens the chat; ordering preserved on the happy path.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests