fix(opcore): give an action's scalar arg the type its field declares #329
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
sunday-sprint
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/umbra!329
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/328-scalar-type"
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?
Closes #328. Sibling of #326, which landed in #327 - this is the half that did not make it into that merge.
The behaviour
BindSlicelowers array elements to the type the leaf's schema declares (#315, #319).Binddid not do the same for a scalar, so a body field declaredintegerreceived the raw CLI string:booleanhad the same shape:closedwould receive"true".Why it matters
This is #316's defect one level up. A quoted numeral is not an integer, and Forgejo's answer to a wrong type is frequently a 200 that changes nothing - the entire subject of
coilyco-flight-deck/agentic-os#1047.It also decides which of a leaf's fields a shadow can correctly carry. #326 lets a shadow carry the optional ones at all; without this, carrying
--milestonewould silently send the wrong type, which is worse than dropping it.agentic-os#1105restores--milestoneon top of both.The change
CoerceScalarmirrorsCoerceItems:integer,numberandbooleanparse to their JSON type, anything else stays a string, and a value that does not parse is refused rather than sent.Body fields only.
PathValsandQuery.Setkeep taking the raw token, because path and query values are strings on the wire.Verification
go build ./..., thehttp/...andpkg/...suites, andmake lint(0 issues) all clean on this branch. Two tests: an integer field reaching the wire as a JSON number, and--milestone soonrefused before the write rather than degrading to a string.Confirmed end to end against a shadow built from this branch -
--milestone 16renders unquoted in the plan, and--milestone soonexits 1 witharg "milestone": value "soon" is not an integer.