Prolog-RLM context compile is unbounded: compile_timeout missing on both call sites — wedged worker stalls every routed turn indefinitely #121
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/a0-symbolics#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Commit
7c057880("fix: route harness direct/complete through the context compiler", PR #92, in main atbba5dcba) made every Prolog-RLM–routed turn perform a blocking, unboundedharness.compile(request)call before dispatching:plugins/_prolog_rlm/helpers/loop.py:223—await self.harness.compile(request)with notimeout=argument.plugins/_prolog_rlm/tools/prolog_rlm.py:28— same,await harness.compile(request)with no timeout.compile_context_requestsends up to 192 units × 12,000 chars of raw host context through the worker transport.If the shared Prolog worker is slow/unresponsive (busy with a long
rlm_directturn, or wedged — see the pipe-deadlock class of failure), every chat turn and everyprolog_rlmtool call hangs indefinitely in the compile phase, before the model is ever reached. This converts the runtime from a verification layer into a single point of failure for the whole loop.Note this also directly undermines #106's blast-radius analysis: even if the model-call paths get timeouts, the compile path stays unbounded.
Repro
_prolog_rlmrouting for a chat.directaction is in flight, or SIGSTOP the worker process).PrologRLMModel.unified_turn→_compiled_context, never reaching the inner model;response_callback/streaming never fire.Expected
Context compilation has a bounded deadline; on timeout or worker failure the turn either falls back to the inner model (like the existing degenerate-turn path at
loop.py:173-184) or fails with a clear repairable error.Suggested fix
self.completion_timeout(or a dedicated, smallercompile_timeout_secondssetting) into bothharness.compile(...)call sites.TimeoutError/RuntimeFailurefrom the compile phase, decide policy explicitly: fall back to inner model with a warning (recommended — context compilation is an optimization, not a correctness gate) or surface a repairable error. Today the behavior is an unbounded silent hang, which is the worst option.bba5dcba; regression introduced in7c057880(2026-09-05).