feat(specverb): honor the spec's declared response media type #278
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!278
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/honor-response-media-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?
Fixes the last thing between the Forgejo 16 upgrade and actually reading CI logs from an agent.
Symptom
The log body starts with an ISO timestamp, so the JSON decoder reads
2026as a number and then hits the hyphen.curlagainst the same endpoint returns HTTP 200 and 23935 bytes.Cause
Everything except the response path was already correct:
GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs.produces: ["text/plain"]with a string response.But nothing in this engine read the declared media type.
runtime.firecalledrespfmt.Renderunconditionally, andRenderunconditionallyjson.Unmarshals. Every op-based verb assumed JSON regardless of what its spec said.output "raw"existed, but only onfetchblocks, which do not surface as CLI verbs.Change
DescriptorgainsRawResponse, set inresolveDescriptorfrom the operations declared 200 or 206 content type. When set,fire` writes the body through untouched.Deciding from the spec rather than from the bytes matters. A parse-and-fall-back-to-raw heuristic would make behaviour depend on payload content and would mask genuine JSON errors, which is the wrong shape for a security-boundary engine.
Fail-safe direction preserved
+jsonsuffixes, and media types carrying parameters all keep the parsed path.Projections are refused, not ignored
--queryover a raw body returns a user error rather than silently returning everything. The caller asked to filter a payload the engine cannot parse, and quietly answering a different question is worse than failing.Verification
make build,make vet, andgo test ./http/specverb/pass, including two new tests covering the media-type matrix and the fail-safe defaults.Pre-existing failures, confirmed by stashing and re-running on clean
main: fivepkg/brokerserver tests fail, andmake lintreports one gosec hardcoded-credential finding in the generated describe tree. Neither is touched by this change.Downstream
aosguard pins a cli-guard ref, so this needs a pin bump and a specgen rebuild before
action-job logsworks on a host. No guardfile change is required: the grant and the vendored spec are already right.🤖 Generated with Claude Code