[bug] context_peek schema accepts selector.index but native validator rejects it #311
Labels
No labels
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/prolog-rlm#311
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?
Problem
The native direct-mode
context_peekcontract exposed to the model and the runtime validator disagree.Auto-Dig repeatedly receives model calls shaped like:
The call is then rejected during native-call preflight with:
This has reproduced across Auto-Dig integration runs reported in #308, #309, and #310 against Prolog-RLM ref
eb2411afdaf981a0a121f55b7ddf23dc9fcef812.Canonical consumer failure: lost-rob0t/starintel-gpt-auto-dig#2095 / workflow run
33268628425.Expected behavior
The schema presented to the model and the schema enforced by native argument validation must be the same contract. If
selector.indexis part of the public tool schema forhead,tail, ormetadata, the native validator must accept it. If it is not supported, it must not be advertised to the model.Required fix
context_peekJSON containingselector.type,selector.count, andselector.index.head,tail, andmetadataselectors.Reproduction evidence
The model successfully returns tool calls, but
context_calls=0andtool_calls=0; the run dies before any context operation executes. The repeated integration reports contain the full sanitized traces.Implemented in #314 (branch
fix/312-peek-schema-contract, basemain). The native validator now accepts the exact model-emitted shape reported here:selector:{type,count,index}withtypeas the only required field, optionalindex/countvalidated against the advertised minima (index >= 0, count >= 1), with defaults when omitted (head/tail count -> bounded whole, item index -> 0). Local deterministic gate: 1077/1077 tests, exit 0. CI on the PR is the canonical gate.