Repository navigation
chore(api): Parse response schemas only in jsonResponse - #3818
Merged
Merged
Conversation
Add junior/no-response-schema-parse. It reports a parse of an api/schema schema under packages/junior/src/api, because jsonResponse already parses every REST response. Remove the readers' own parses, and keep the real edges behind a disable comment that names the edge. Co-Authored-By: BYK <[email protected]>
…ema-parse Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: BYK <[email protected]> #3808 removed the feed parse, so list.ts no longer needs the override.
…ema-parse Co-Authored-By: BYK <[email protected]>
Contributor
|
8 screenshot changes — 8 changed · 0 added · 0 removed Review screenshots in Frameshift |
BYK
approved these changes
Nov 19, 2026
This branch was successfully deployed
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.
jsonResponseparses every REST response against its schema. Manyapi/readers parsed the same value first, so each of those responses was validated twice.Rule
junior/no-response-schema-parse(tools/oxlint/junior/rules/, with a RuleTester test):.parse/.safeParse/.parseAsync/.safeParseAsyncon a value import from@/api/schemaor@/api/schema/*, or from a relative path that resolves there.packages/junior/src/api/**/*.ts.api/http.tsdoes not trigger it, because it parses a schema parameter, not an imported schema.acpInboundMessageSchemaoruserSchema, are not checked.Removed parses (16)
code/overview.ts(overview and person),code/repository.ts,cache-warming/savings.ts,stats.ts,notifications/routes.ts,people/code.ts.conversations/{child-agents,plan,watches,pending-messages,event-list,detail}.ts,locations/{detail,list}.ts,people/profile.ts.Each removed parse was followed by a
jsonResponseparse with the same or a wider schema. None of these schemas has a transform, pipe, default or catch. The detail, event page, location detail and actor profile schemas have only idempotenttrim()checks, whichjsonResponsestill applies, so the response does not change.Other callers:
getConversationreadsreadConversationDetail.readMcpPendingWorkreadsreadConversationPendingMessages.outputSchema, and the MCP SDK checksstructuredContentagainst it. They do not read annotations. Each detail event is still parsed inevents.ts.The detail parse had its own
Validate conversation detailspan. That span is gone with it.Readers that had no declared return type now declare their report type. After the change,
locations/detail.ts,locations/list.tsandpeople/profile.tswere only pass-throughs, so they are deleted and the routes callread*FromSqldirectly.Edges kept behind a disable comment
conversations/events.ts: stored read. It checks each stored event payload, and MCP readers use the result with no other parse.conversations/feed-brief.ts: stored read of the Brief JSON.mcp/tools/search-automations.ts: request input. These are MCP tool arguments, and the schema sets defaults.list.ts
readConversationFeedinconversations/list.tsis left as is, because #3808 removes that parse. A file-level.oxlintrc.jsonoverride turns the rule off forlist.ts. Whichever of this PR and #3808 merges second removes the override.via @BYK.
--
View Session [Sentry]