fix(core): omit undefined permission metadata - #48495
Open
S1LentH3arT wants to merge 1 commit into
Open
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: The search results show that PRs #46964 and #46906 are related but not duplicates—they address the same bug pattern in the older
No duplicate PRs found |
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.
Issue for this PR
Closes #37650
Type of change
What does this PR do?
Pending permissions can contain optional metadata values set to
undefined. The metadata is JSON-encoded when pending requests are listed, so those values cause the response encoding to fail.This change removes only
undefinedmetadata entries whenPermissionV2builds a request. It applies at the sharedask/assertboundary and keeps valid values such asfalse,0, andnull.PRs #46964 and #46906 address the same bug pattern in the older
Permissionimplementation onv2. This PR applies the fix to the currentPermissionV2implementation ondev; the normalization strategy is intentionally the same, not a separate algorithm.How did you verify your code works?
bun --version->1.3.14bun turbo typecheck --concurrency=2-> 30 successful taskscd packages/core && bun test test/permission.test.ts-> 12 passed, 0 failedScreenshots / recordings
Not a UI change.
Checklist