Nick
|
d6cbc05951
|
feat(local_tool_runtime): close PARTIAL gaps — dichotomy wave
Name-preserving 1:1 port of the 22 functions the audit named missing
against the src/rune/local_tool_runtime.py oracle: _find_capability_executor,
_extract_context_length, context_length, reset_context_length_cache,
supports_tools, supports_thinking, _positive_int, _model_capabilities,
resume, approve, reject, _expose_tools, _deduplicate, _tool_message,
_event_to_state, _event_from_state, _request_to_state, _request_from_state,
_with_fallback_prompt (plus _post/_model_capabilities-side context caching
and the tool-protocol validation/spans core the loop needs). IO sits behind
injectable seams (PostFunc, LoopTransport, ToolExecutor, cloud/local
transport constructors, RecordFailure, ResetDiscoveredWindows, ParamOrder).
Frozen truth: scripts/gen_local_tool_runtime_truth.py exercises every
branch against the LIVE oracle with deep-copied inputs; truth.json
(embedded, byte-deterministic) replays 96 rows in Go — full envelopes,
chat payloads, executor calls, pending states. Documented divergences:
Python bool-sub-int quirk in _extract_context_length (Go rejects bools),
uuid call_ids in text-fallback envelopes (wildcard-matched), exception
TYPE names (message parity only).
Audit: local_tool_runtime 8/30 PARTIAL -> 30/30 FULL. Go: build/gofmt/vet/
-race green. Python oracle tests: 23 passed (delegation live and
RUNE_LOCAL_TOOL_RUNTIME_CORE=python pinned). Contract
BUILDER-2026-10-13T00:04:53Z-0b0047-factory-gap-ltr.
|
2026-10-13 07:01:01 +01:00 |
|