Skip to content

fix(conventions+gate): Readable<SuccessResponse> is a CONSUMER unwrap, not a route fix (build15 wall)#156

Merged
agjs merged 1 commit into
mainfrom
fix/api-client-readable-unwrap
Jul 20, 2026
Merged

fix(conventions+gate): Readable<SuccessResponse> is a CONSUMER unwrap, not a route fix (build15 wall)#156
agjs merged 1 commit into
mainfrom
fix/api-client-readable-unwrap

Conversation

@agjs

@agjs agjs commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Stacked on #155. build15 parked at 3 on Readable — my earlier guide WRONGLY said fix-the-route. harness-diagnose 4/4 + grok (reproduced): @elysiajs/swagger emits json+multipart+text for EVERY route (unfixable at route); the real error is annotating the fn Promise + bare return data. Fix: infer-don't-annotate (universal) + unwrap by response shape (data?.data if enveloped, else data — NOT categorical); corrected data-fetching+api-service guides + new gate-stages Readable steer. Panel PASS.

…, not a route fix (build15 wall)

build15 (6 fixes) reached best=2, expert fired 3x (park fix validated), then parked at 3
on Readable<SuccessResponse<…>> — which my earlier guide WRONGLY said to fix on the route.
harness-diagnose (4/4) + grok (reproduced): `@elysiajs/swagger` hardcodes json+multipart+
text media types for EVERY route when hook.parse is empty, so openapi-fetch ALWAYS types
data as Readable<SuccessResponse> (scaffold's own routes included) — it is UNFIXABLE at the
route. The model's real error was annotating the fn `: Promise<IEntity>` + bare `return data`.

Corrected: (1) data-fetching guide — Readable is normal/universal; consume via `data?.data`
and let TS infer (auth-query pattern), never fix the route; (2) api-service guide — response:
schema is for the body TYPE (define like AccountResponse, no headers) and does NOT collapse
media types; (3) gate-stages — NEW per-error steer routing Readable<SuccessResponse> to the
consumer fix (the delivery vehicle build15 lacked while stuck ~60 turns). Refactored
signatureToError's steer branches into structuredSteerMessage (cognitive-complexity cap).
Tests updated to the corrected direction + the new steer.
Base automatically changed from fix/api-client-trailing-slash to main July 20, 2026 21:02
@agjs
agjs merged commit 54b11c0 into main Jul 20, 2026
1 check passed
@agjs
agjs deleted the fix/api-client-readable-unwrap branch July 20, 2026 21:02
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.

1 participant