fix: align shadow controller execution-mode semantics for single_tool vs run_plan #1
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?
Context
A fresh Kimi audit plus live shadow logs show a semantic mismatch in the meta-controller: grounded
single_toolcases are being explained aspolicy_prefers_plan:single_toolwithdecision=run_plan.Why this matters
This breaks the type boundary between plan selection and execution mode. A
single_toolpreference should constrain the controller toward direct grounded execution, not toward a plan runner abstraction. If left unfixed, future learned policies can drift into tool misuse under uncertainty.Current evidence
/home/openclaw/.openclaw/workspace/logs/meta-controller-shadow.jsonl/home/openclaw/.openclaw/workspace/lib/meta_controller.py/home/openclaw/.openclaw/workspace/lib/bandit_policy.pyDeliverables
execution_modefromplan_keyin controller outputs and trajectories.single_toolmaps to direct execution semantics.Definition of done
Shadow logs no longer emit
run_planfor groundedsingle_toolcases, and the sacred gate still passes.Done.
Implemented
execution_modeto shadow-controller outputs.execution_modeto typed trajectories.single_toolprefers direct execution instead ofrun_plan./home/openclaw/.openclaw/workspace/bin/backfill-execution-modeto backfill old shadow/replay rows./home/openclaw/.openclaw/workspace/bin/check-shadow-execution-modeas a targeted regression check.Validation
{"ok": true, "changed_rows": 564}{"ok": true, "checked": [{"message": "Fasse diese Webseite in drei Stichpunkten zusammen: https://example.com", "decision": "answer_direct", "execution_mode": "direct", "reason": "policy_prefers_execution:single_tool:direct"}, {"message": "Erklaere DNSSEC in einfachen Worten.", "decision": "answer_direct", "execution_mode": "direct", "reason": "policy_prefers_execution:single_tool:direct"}, {"message": "Was ist ein Snapshot?", "decision": "answer_direct", "execution_mode": "direct", "reason": "policy_prefers_execution:single_tool:direct"}]}/home/openclaw/.openclaw/workspace/evals/results/sacred_gate_20260321T081854Z.jsonNotes
This fixes the execution-mode semantic mismatch in the shadow/controller layer. A follow-up issue is still needed to make the offline trainer learn priors over
execution_modeitself, not only plan keys.