fix(opcore): decide raw-vs-parsed before the request, not after #291
No reviewers
Labels
No labels
burndown-2026-06
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/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/umbra!291
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/bk79-raw-response"
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?
Part one of #289, and it fixes
coilyco-flight-deck/agentic-os#1044.The correction to #289
#289 reads the code as "specverb honours
RawResponse, opcore ignores it." The first half is not true.specverb/request.gohad the branch, but it was unreachable:FireCaptureJSON-decodes every success body and returns a coded error on failure, so atext/plainlog or anapplication/ziparchive aborted the call before either path consulted the flag. Both call sites were broken, not one. That is why setting the field "changes nothing" on the opcore path and equally on the CLI path.The fix
send- the transport, extracted out ofFireCapture. Never inspects the payload.FireCaptureRaw-sendwithout the decode.specverb.fireandopcore.Operation.Executeboth branch onDesc.RawResponsebefore firing.Deciding after the call cannot work, because the decode error is indistinguishable from a real one.
Security floor unchanged
Only the decode is skipped, never a gate. Restrict, auth, the redirect floor, and the non-2xx failure path all behave as before, and an op that declares no media type stays parsed - the fail-safe direction. A raw op has no decoded value, so an inline grant's
fail-whenhas nothing to evaluate and does not run.Tests
http/opcore/rawresponse_test.gopins six cases. The first two fail onmainwith the exact errors from the downstream report:The other four hold the line: undeclared non-JSON still rejected, upstream 404 still
upstream_failed, empty raw body still a success, restrict still enforced on a raw leaf.Verification
make build,make vet,make lint(0 issues), andgo test ./http/...are green.godoc-current.txtregenerated.Two things I did not get to a clean state, both pre-existing and neither caused by this change:
pkg/brokertests fail locally on macOS - the sandbox$TMPDIRpath exceeds the unix socket name limit (bind: invalid argument). Identical failure on a clean tree.pre-commit run --all-filesreports 15 code-comment violations, an 84-lineREADME.md, and drift inrepo-cli-guard/SKILL.md. All identical on a clean tree; this branch adds none. CI is green onmainat the same base commit, so this looks like local catalog-hook drift rather than a red repo.I also noticed
pre-commitautofixes trailing whitespace in threeassets/mark/umbra-favicon-*.svgfiles from #290. I deliberately left those out of this commit rather than sweep an unrelated fix into a bugfix PR.Still open on #289
Part two. The inline grammar has no node that sets
RawResponse, so a hand-written.mcp.kdlgrant still cannot request it - only the spec-driven path infers it from the declared media type. This PR does not close #289.Written up in
docs/specverb-raw-responses.md.