fix(conventions+gate): Readable<SuccessResponse> is a CONSUMER unwrap, not a route fix (build15 wall)#156
Merged
Merged
Conversation
…, 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.