Skip to content

Normalize structured adapter proposals before approval - #146

Merged
IamAngusU merged 1 commit into
mainfrom
fix/agent-structured-tool-instructions
Oct 4, 2026
Merged

IamAngusU merged 1 commit into
mainfrom
fix/agent-structured-tool-instructions

Conversation

@IamAngusU

Copy link
Copy Markdown
Owner

Fix a real natural-language agent planning failure: a model may return an adapter request as a JSON object instead of a JSON-encoded string. Normalize only fresh unapproved adapter proposals, before unchanged policy validation and hash binding. Preserve exact numeric IDs without float conversion. Saved plans remain string-only. Unknown envelope/step fields, duplicate keys, scalars, arrays, non-adapter objects, and oversized requests fail closed; adapter payload schema and scoped authority remain the adapter responsibility. Includes negative tests, saved-plan compatibility test and HTTP named-policy lifecycle integration. Local go test ./..., go vet ./..., and targeted race tests pass. CI mirror on angusu-de is triggered separately.

@IamAngusU

Copy link
Copy Markdown
Owner Author

Validated exact head 7ea2ce2 on angusu-de: all 12 CI jobs passed (run 37213445110), including Windows/Linux/macOS, race, security, DAST, installers and artifact checks. Both CodeQL analyses passed (run 37213491180). Local unit reproduction failed before the change and passes after it; named-policy HTTP lifecycle still preserves scope and exact request bytes. The separate free-form Qwen4B project evaluation still produced invalid semantic plans; this PR fixes representation handling, not model quality. No invalid live plan was executed.

@IamAngusU
IamAngusU merged commit 8c1f941 into main Oct 4, 2026
0 of 14 checks passed
@IamAngusU
IamAngusU deleted the fix/agent-structured-tool-instructions branch October 4, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant