Skip to content

fix(dispatch): diagnose non-JSON dispatch responses - #385

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-377-dispatch-json-diagnostic
Oct 14, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-377-dispatch-json-diagnostic

Conversation

@StepenkoAnatoli

Copy link
Copy Markdown
Owner

A successful HTTP dispatch response containing HTML instead of JSON was reported as NO_RUN_ID, with a remedy to pin the API version already pinned on the request. Parse dispatch responses through the existing readJsonBody helper so this case returns BAD_BODY and the proxy/maintenance-page remedy. JSON missing a run ID still returns NO_RUN_ID.

Fixes #377

what changed: Shared successful-body parsing with run and artifact lookup, and extended existing malformed-body coverage to dispatch.

why: Diagnose an unreadable response body separately from a valid JSON response lacking its required run ID. No alternative design was set aside.

what it touched: lib/dispatch.mjs, dispatch tests, architecture row and changelog. Existing ADR-0033 behavior; no new domain term or interface.

what you verified: verified - red-first reproduction (31 passed, one expected failure), then 32 passing dispatch tests. The required full suite was accepted by the repository commit gate.

what you got wrong and fixed: mistake - running six full suites concurrently exceeded the default 3900-second budget; where - local commit validation on this Windows host; impact - affected hooks refused commits before publication; cause - excess concurrent subprocess and filesystem work; fix - retry one commit at a time with the ADR-0142 timeout extension (RESEARCH_KIT_GATE_TIMEOUT=7920); verified - the required full-suite commit gate accepted the commit.

Full-suite detail: verified - 1777 passed, 0 failed, 12 unsupported capabilities on win32/Node 24.20.0 in 1662.8 seconds. The gate's documented local unsupported-capability opt-in was used; CI exercises its supported platforms separately.

what changed: dispatchCollection parses successful responses through readJsonBody; the existing malformed-body regression now covers dispatch as well as run/artifact lookup.

why: A maintenance page was diagnosed as missing workflow_run_id and suggested pinning an API version already pinned. This restores the existing BAD_BODY contract; no alternative design was set aside.

what it touched: dispatch.mjs, dispatch.test.mjs, its architecture map row and CHANGELOG.md; existing ADR-0033 semantics, no new domain terms.

what you verified: verified - red-first dispatch reproduction (31 passed, one expected failure), then passing targeted dispatch tests. The required complete offline suite runs in the commit gate.

what you got wrong and fixed: mistake - running six full suites concurrently exceeded the default 3900-second budget; where - local commit validation on this Windows host; impact - affected hooks refused commits before publication; cause - excess concurrent subprocess and filesystem work; fix - retry one commit at a time with the ADR-0142 timeout extension (RESEARCH_KIT_GATE_TIMEOUT=7920); verified - the required full-suite commit gate accepted the commit.
@StepenkoAnatoli
StepenkoAnatoli merged commit 0dc3ff0 into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-377-dispatch-json-diagnostic branch October 14, 2026 18:56
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.

A 200 dispatch response that is not JSON is diagnosed as NO_RUN_ID with 'pin X-GitHub-Api-Version', which is already pinned

1 participant