You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(serve): stop trigger-C stuck false-fires + boot-burst hub drop
Two v0.1 post-ship nits that the user's browser session surfaced:
attention engine: trigger C (stuck) would instantly fire on daemon
restart because the hub ring's replay delivered old tool_call events
with their original (pre-restart) timestamps. The idle check used the
raw lastCall, so a session with a tool_call 10 min before the restart
already tripped the 5 min threshold at t=0.
Fix: Engine.bootTime is stamped at NewEngine, and trigger C uses
max(st.lastCall, bootTime) as the idle reference. A session truly
idle for IdleMinutes post-boot still fires; replay-only signals no
longer pre-age it. Regression test added.
hub buffer: subChanBuffer raised from 128 to 1024. The boot-burst
WARN ("hub subscriber dropping events filter=\"\" dropped_total=1")
came from the quota ingester's catch-up scan + tailer initial replay
fanning out tens of events faster than a newly-subscribed internal
consumer could drain its 128-slot channel. 1024 absorbs the burst
with negligible memory cost (~200 KB per subscriber) and the
SlowConsumerDrop test is now anchored to subChanBuffer so future
tweaks stay covered.
Verification: go test ./... 493/24, race-clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments