mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
1733f4fd48
EffectRunner posts ClassifierVerdictIssued from inside DecisionStepProcessor.ApplyStep, i.e. on the SignalIngress worker thread. With the bounded channel (256) full, Post's back-pressure slow path blocked the channel's only consumer as a producer: nothing could ever drain, every collector Post blocked behind it, and the whole decision/monitoring pipeline froze silently until the max-lifetime watchdog. Post now detects a call from the worker thread itself and routes the item to a worker-local follow-up queue that WorkerLoop drains (iteratively, ahead of the channel) right after the current item. Same processing path — ordinals, SignalLog, emit, reduce, ApplyStep — just never blocking. Worker posts are accepted during the Stop drain too, since the verdict belongs to the step being finished. ReentrantPostCount exposed for observability/tests. Tests: full channel + worker post releases a blocked foreign producer and processes the verdict before the next channel item (fails against the previous code by hanging); follow-up chain drained in order without recursion; verdict posted during Stop drain is not lost. Docs: agent/decision-engine.md, agent/overview.md, log.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>