Repository navigation
Assert the caller userId in the publish-note isolation test - #927
Merged
Merged
Conversation
The assertion matched only the source id, so it would have passed with the userId omitted or wrong, which is the one thing the test exists to check.
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: π Files selected for processing (1)
π WalkthroughWalkthroughThe cross-user access rejection test now asserts that ChangesRepository access test
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touchesπ Generate docstrings
π§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
π Preview deployed: https://kody-pr-927.kody-a99.workers.dev Worker: Mocks:
|
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.
Summary
Last review point from #925, which merged before I could fold it in. CodeRabbit was right and it is worth fixing rather than leaving.
The cross-user test for
repo_show_publish_noteasserted the scoped lookup like this:objectContainingonly checks the keys it names, so the assertion would still have passed ifuserIdwere omitted entirely or passed with the wrong value β which is the single thing that test exists to verify. Now it asserts the exact argument:One line, test-only, no production change.
Validation
npm run validategreen in full:format:check,lint(1 pre-existing warning insentry-tunnel.node.test.ts, 0 errors),typecheck, 1295 unit tests across 400 files, 18 Playwright E2E, 2 MCP E2E,backup:build,primitives:check,migrations:check.System recap β composes existing primitives (low risk)
Mode: recap Β· Base:
main@36edd717Β· Head:5d8adab9Classification: composes β test-only assertion tightening. No production code, no primitive behaviour change.
Primitives touched
capability-registryInvariants
Strengthens the guard on per-user isolation rather than changing it: the repo-source lookup test now fails if the
userIdpredicate is dropped from the query call.Summary by CodeRabbit