test: fix stale audit stream guild filter assertion#293
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughTest case in auditStream.test.js updated to assert error response when sending a filter message targeting a non-matching guild. The test now consumes the error response message instead of proceeding without checking it. Changes
Possibly related PRs
✨ Finishing Touches
🧪 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 |
|
🚅 Deployed to the volvox-bot-pr-293 environment in volvox-bot
|
There was a problem hiding this comment.
Pull request overview
Updates the audit log WebSocket stream test suite to reflect the current server behavior when a client attempts to apply a guildId filter that differs from the authenticated guild.
Changes:
- Renames and rewrites the stale “non-matching guild filter” test to assert an error is returned for mismatched
guildIdfilters. - Adds an assertion that, after rejecting the mismatched filter, the connection continues to receive entries for the authenticated guild.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
| Filename | Overview |
|---|---|
| tests/api/ws/auditStream.test.js | A single blank line was inserted for readability inside the "should ignore a rejected guild filter" test. No behavioral or logical changes. Assertions correctly match the implementation in src/api/ws/auditStream.js. |
Sequence Diagram
sequenceDiagram
participant C as WebSocket Client
participant S as AuditStream Server
C->>S: auth (guild1 ticket)
S-->>C: auth_ok
C->>S: filter guildId=guild2
S-->>C: error "Guild filter does not match authenticated guild"
Note over C,S: ws.auditFilter stays null, guild1 scope preserved
Note over S: broadcastAuditEntry guild2
Note over S: filtered out, no message sent to C
Note over S: broadcastAuditEntry guild1
S-->>C: entry guild1
Last reviewed commit: 7f0c3c9
c97cca8 to
7f0c3c9
Compare
🧹 Preview Environment Cleaned UpThe Railway preview environment for this PR has been removed. Environment: |
|



Summary\n- update the audit stream test to match current guild filter behavior\n- assert that mismatched guild filters are rejected with an error\n- verify the connection continues using the authenticated guild after rejection\n\n## Why\nThis stale test is the baseline CI failure currently blocking all open Dependabot PRs from auto-merging.\n\n## Verification\n- pnpm lint ✅\n- pnpm test ✅\n- pnpm test:coverage ✅\n- pnpm --dir web lint ✅\n- pnpm --dir web build ✅