Skip to content

test: fix stale audit stream guild filter assertion#293

Merged
BillChirico merged 1 commit intomainfrom
fix/main-ci-baseline
Mar 11, 2026
Merged

test: fix stale audit stream guild filter assertion#293
BillChirico merged 1 commit intomainfrom
fix/main-ci-baseline

Conversation

@BillChirico
Copy link
Collaborator

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 ✅

Copilot AI review requested due to automatic review settings March 11, 2026 21:08
@github-project-automation github-project-automation bot moved this to Backlog in Volvox.Bot Mar 11, 2026
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4d69e05b-324b-4d2d-8449-8c7d7502a4dd

📥 Commits

Reviewing files that changed from the base of the PR and between 99bb01f and 7f0c3c9.

📒 Files selected for processing (1)
  • tests/api/ws/auditStream.test.js

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Tests
    • Updated audit stream filter tests to properly verify server error responses when guild filters target non-matching guilds.

Walkthrough

Test 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

Cohort / File(s) Summary
AuditStream WebSocket Test Updates
tests/api/ws/auditStream.test.js
Updated test to await and assert error response when guild filter message targets non-matching guild.

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/main-ci-baseline
  • 🛠️ Publish Changes: Commit on current branch
  • 🛠️ Publish Changes: Create PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@BillChirico BillChirico enabled auto-merge (squash) March 11, 2026 21:09
@railway-app railway-app bot temporarily deployed to volvox-bot / volvox-bot-pr-293 March 11, 2026 21:09 Destroyed
@railway-app
Copy link

railway-app bot commented Mar 11, 2026

🚅 Deployed to the volvox-bot-pr-293 environment in volvox-bot

Service Status Web Updated (UTC)
web 🕒 Building (View Logs) Mar 11, 2026 at 9:22 pm
docs 🕒 Building (View Logs) Web Mar 11, 2026 at 9:22 pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 guildId filters.
  • 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.

@greptile-apps
Copy link

greptile-apps bot commented Mar 11, 2026

Greptile Summary

This PR makes a single whitespace-only change: it inserts a blank line between sendJson(ws, { type: 'filter', guildId: 'guild2' }) and const filterError = await q.next() in the should ignore a rejected guild filter and keep the authenticated guild scope test. There is no behavioral, logical, or assertion change — the diff is purely cosmetic.

The PR description ("update the audit stream test to match current guild filter behavior / assert that mismatched guild filters are rejected with an error") describes what the test already does, not what this commit changes. The assertions themselves were already present on the base branch.

Key observations:

  • The blank-line addition is valid and improves readability by visually separating the "act" step from the "assert" step.
  • The test logic is verified against the implementation in src/api/ws/auditStream.js — the assertions for the error message, the guild-scoped fallback, and the broadcast filtering all match the source code behavior correctly.
  • There is pre-existing minor test duplication: the test at line 452 (should reject filter guildId that differs from authenticated guild) is a strict subset of the test at line 302 and adds no additional coverage.

Confidence Score: 5/5

  • Safe to merge — change is a single blank line with no behavioral impact.
  • The entire diff is one blank line added for formatting. The test assertions were already present and correctly reflect the implementation in auditStream.js. No production code is touched.
  • No files require special attention.

Important Files Changed

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
Loading

Last reviewed commit: 7f0c3c9

@BillChirico BillChirico force-pushed the fix/main-ci-baseline branch from c97cca8 to 7f0c3c9 Compare March 11, 2026 21:22
@railway-app railway-app bot temporarily deployed to volvox-bot / volvox-bot-pr-293 March 11, 2026 21:22 Destroyed
@BillChirico BillChirico merged commit 581452d into main Mar 11, 2026
8 of 14 checks passed
@BillChirico BillChirico deleted the fix/main-ci-baseline branch March 11, 2026 21:22
@github-project-automation github-project-automation bot moved this from Backlog to Done in Volvox.Bot Mar 11, 2026
@github-actions
Copy link
Contributor

🧹 Preview Environment Cleaned Up

The Railway preview environment for this PR has been removed.

Environment: pr-293

@sonarqubecloud
Copy link

@coveralls
Copy link

Coverage Status

coverage: 89.87% (-0.006%) from 89.876%
when pulling 7f0c3c9 on fix/main-ci-baseline
into 99bb01f on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants