docs(specverb): state the mapped-body string limit, and refuse a shape that wants past it #320
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!320
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/sb46-mapped-body-limit"
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?
Two of the three things #312 asked for, which the issue itself scopes as the cheap pair: "Items 1 and 2 are cheap and would have saved the entire investigation that produced this."
1. Say it in the docs
docs/specverb-request.mdgains a section stating the limit and, more importantly, the part neither existing rule says on its own:mapis the only construct that renames an input to a different upstream key, because a body field carrying an upstream alias is refused outright. So a guardfile whose upstream needs a parameter name colliding with a reserved engine flag is forced into mapped-body mode for that leaf, and mapped-body mode then forbids every non-string value on that same leaf, including parameters unrelated to the collision that forced it.An author reading either rule alone would not predict the combination. That is why this was worth writing down rather than left to the source.
The Exa measurement is carried over, because it is what makes the cost legible: absent is 200,
contents={"text": true}is 200,contents="text"is HTTP 400, and that 400 is the first and only notice, arriving in production against a metered API.2. Fail at parse time where the intent is visibly non-string
type=,format=, and a nested block are what an author reaches for when they want a non-string leaf. All three now fail closed with the limit named and a pointer to the issue that explains it:Previously
type="object"produced`map` needs exactly one `to="..."` property, which names nothing and reads as a syntax slip.A missing
to=keeps its own message. It is a different mistake, and naming the string limit there would be noise.3. Typed mapped leaves: not done, and why
The issue scopes this as its own design pass, "probably not worth doing on the strength of one consumer", and that stands.
Worth recording one thing I checked and could not use. It would be better to validate the mapped target against the operation's declared type rather than refuse a hand-written shape, since the engine would then know rather than guess. That is not reachable here:
validateBodyMappingModerefuses body fields and body mappings in combination, so a descriptor in mapped-body mode carries no declared type for the target at all. The check has nothing to check against.So the refusal above is the strongest available signal short of item 3, not a stand-in for a check that was easier.
Boundary with #311
Untouched, as the issue asks. A seeded fixed value is written as its own JSON shape and never passes through
mappedString, so pinned constants keep their types and this changes nothing about them.Verification
make test,make vet,make lint(0 issues), andgodoc-current.txtregenerated. Two new tests: the three shapes refuse with the limit named, and a missing target does not borrow that message.Refs coilysiren/inbox#426
🤖 Generated with Claude Code
mapsilently restricts a guardfile to string-valued upstream parameters and the only signal is a 400 at call time #312