Repository navigation
ref: Remove isRecord and ban Record type guards - #3796
Merged
Merged
Conversation
Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>
Remove the last isRecord helper and add junior/no-record-type-guard. It reports any function named isRecord and any type guard that narrows to Record<string, unknown> or Record<string, any>. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
13 screenshot changes — 13 changed · 0 added · 0 removed Review screenshots in Frameshift Show 7 more changed screenshots |
BYK
approved these changes
Nov 19, 2026
BYK
enabled auto-merge (squash)
November 19, 2026 22:36
Co-Authored-By: Burak Yigit Kaya <[email protected]> # Conflicts: # tools/oxlint/junior/index.ts
Contributor
|
Found 2 test failures on Blacksmith runners: Failures
|
22 tasks done
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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-v2-3x.png)
isRecordonly proves that a value is some object. The code after it then reads loose fields by hand. This removes everyisRecordhelper and adds a lint rule so none comes back.What changed
packages/junior/src/chat/coerce.ts, the copy inpackages/junior-github/src/credential-support.ts(with itsJsonRecordtype), and the local copies in the core, GitHub plugin, and dashboard files.safeParse. Each site keeps its old fallback. The lenient coercers use per-field.catch()or.optional(), so a bad field is still dropped instead of failing the whole value. Other sites use plain narrowing (typeof,in,Array.isArray, discriminants). Noasassertions are added, and the type-assertion baseline goes down formcp/auth-store.ts,mcp/service-account.ts,plugins/agent-hooks.ts, andstate/conversation.ts.junior/no-record-type-guardreports any function or variable namedisRecord, and any type guard that narrows toRecord<string, unknown>orRecord<string, any>. It is on in the root and dashboard oxlint configs. TheRecord<string, unknown>guards inconfiguration/defaults.tsandconversation-privacy.tsare also replaced.Edge cases that now behave differently
configurationinmcp/auth-store.ts, andbyFileIdinslack/vision-cache.ts.z.number()rejectsNaNandInfinityin the MCP credential and service-account parsers. The oldtypeofchecks accepted them.undefinedinstead of leaving them out.via @BYK.
--
View Session [Sentry]