fix: route harness direct/complete through the context compiler #96
No reviewers
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!96
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/context-compiler-unused"
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
Routes every
prolog_rlmnetwork action through the Prolog context compiler and moves direct mode onto the bounded runtime direct agent loop, per the operator direction to fully use Prolog-RLM for all Agent Zero context and IO (first slice; see #91).Changes
plugins/_prolog_rlm/tools/prolog_rlm.py):directandcompletenow compile the live Agent Zero context through the runtime'scontext_compilesurface first.completemerges the compiled projection with the caller's explicit context. When the context compiler is not enabled the tool keeps the legacy arguments; a rejected context is an explicit failure, never a silent skip.plugins/_prolog_rlm/helpers/loop.py): every routed turn (includingdirect) compiles a bounded unit request (permanent system unit + prior messages as resources) instead of flattening history into opaque text.directmode dispatches through the runtime withmax_recursion_depth: 1(symbolic keeps 1, symbolic-recursive 3).plugins/_prolog_rlm/prolog/runtime_worker.pl):directdispatch now runsrlm:rlm_direct/4— the bounded provider-native direct agent loop — over the optionalcontext/1term, replacing the one-shotllm_query/3call.context_compileunwraps adapter outcomes and rejects withcontext_compile_rejected/1. All completion-family outcomes pass throughruntime_result/2: success returns the bare result dict,error(...)surfaces as a failed envelope (runtime_fault(...)), never as anok:true$term-encoded payload.helpers/harness/client.py):direct(prompt, context, budget)and a newcompile(request)convenience over the closed catalog.debug-ioprovider-IO debugging skill from the Prolog-RLM lab intoskills/debug-io/(OpenRouter generation fetch, attribution headers, failure signatures).test_prolog_rlm_tool.py; worker contract tests added.Verification
pytest plugins/_prolog_rlm/tests plugins/_prolog_context_compiler/tests— 58 passed (bounded container, pinned runtime source)agent_zero_tool_pack_test.pl— 3/3 passeddirect→value: "391"(1 model call, recursion budget active);complete→value: "217"; undersized budget → failed envelope withtoken_budget_exceeded(fault surface proven)prolog-verify check— pass (facts + observations recorded in.prolog/)Pull request closed