Ignore inherited provider and Bot registry entries - #697
Merged
davidmckayv merged 2 commits intoOct 2, 2026
Merged
Conversation
charan-rathore
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
October 1, 2026 14:12
davidmckayv
previously approved these changes
Oct 2, 2026
davidmckayv
enabled auto-merge (squash)
October 2, 2026 03:56
auto-merge was automatically disabled
October 2, 2026 05:16
Head branch was pushed to by a user without write access
charan-rathore
force-pushed
the
fix-registry-own-property
branch
from
October 2, 2026 05:16
3e851e5 to
02362e1
Compare
Contributor
Author
|
Refreshed onto latest main. The CHANGELOG conflict is resolved. I re-ran only the changed test file locally (shared/model-providers.test.ts, 30 pass); CI will cover the rest. |
davidmckayv
previously approved these changes
Oct 2, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
The current head 02362e1 matches the accepted source disposition from the refreshed triage. Required CI must pass before landing.
davidmckayv
enabled auto-merge (squash)
October 2, 2026 16:52
# Conflicts: # CHANGELOG.md
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.
What this changes
shared/model-providers.tsuses plain objects as registries. Looking upconstructoror__proto__can return an inherited object rather than a configured row.botSettings("__proto__", {})returns undefined provider/model fields instead of the existing missing-Bot error.Require an own property before reading either registry. Unknown providers return undefined, and missing Bot names throw the existing startup error. Defaults, normalization, environment overrides, and registered entries keep their existing behavior. This is a small correctness fix, not a claim of exploitable prototype pollution. No issue was filed.
Where it runs
Boundary and audit
Changelog
Proof
Bun 1.3.14, fresh main, frozen root dependency install, and the repository's normal test preloads:
bun test ./shared/model-providers.test.ts: 30 pass, 0 fail, 93 assertions.bun run lintandbun run format:check: pass.bun run test:ci: attempted twice, timed out at 65 and 110 seconds. A directbun run testalso timed out at 55 seconds; no full-suite pass claimed.