test: LiveQuery cross-origin connections receive only public-read data#10504
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a test suite in ChangesLiveQuery cross-origin authorization tests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.22.0)OpenGrep fatal error (exit code 2): [00.13][ERROR]: Error: exception Unix_error: No such file or directory stat spec/ParseLiveQuery.spec.js 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@spec/ParseLiveQuery.spec.js`:
- Around line 1808-1810: The test currently uses a fixed sleep(300) which only
proves no create arrived within that window; replace this timing-based check by
keeping the socket open until after a known-public save and then assert the
exact list of created IDs from attacker.createdIds() (and/or check
attacker.countOp('create') equals the expected count) to ensure the private
secretObj.id was never emitted; specifically remove reliance on sleep(300) and
instead perform a public save (e.g., savePublicObj or the existing public save
helper used elsewhere) and then assert that attacker.createdIds() does not
include secretObj.id and equals the precise expected ID array.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 99832040-7299-42e3-bcbc-67b802e8a0f5
📒 Files selected for processing (1)
spec/ParseLiveQuery.spec.js
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10504 +/- ##
=======================================
Coverage 92.61% 92.61%
=======================================
Files 193 193
Lines 16947 16947
Branches 240 240
=======================================
Hits 15696 15696
Misses 1228 1228
Partials 23 23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Issue
LiveQuery cross-origin connections receive only public-read data
Tasks