Skip to content

feat: add private mode to /match-candidates#204

Merged
michaelmwu merged 1 commit intomainfrom
feat/match-candidates-private-mode
Mar 9, 2026
Merged

feat: add private mode to /match-candidates#204
michaelmwu merged 1 commit intomainfrom
feat/match-candidates-private-mode

Conversation

@michaelmwu
Copy link
Member

Description

Adds an optional private argument to /match-candidates.
When private is set to a truthy value (true, 1, yes, y, or on), results are posted ephemerally; default behavior remains public.
Invalid values now return an explicit error.
Result publishing uses a private-aware sender path, with tests added for default behavior, private mode, and invalid input handling.

Related Issue

None.

How Has This Been Tested?

Commit hooks ran successfully (ruff, ruff format, mypy) during commit.

Copilot AI review requested due to automatic review settings March 9, 2026 21:04
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Warning

Rate limit exceeded

@michaelmwu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3b2b9580-04a9-4306-876e-fb4222c733a1

📥 Commits

Reviewing files that changed from the base of the PR and between a1351ad and 7fdf2c3.

📒 Files selected for processing (2)
  • apps/discord_bot/src/five08/discord_bot/cogs/jobs.py
  • tests/unit/test_crm.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/match-candidates-private-mode

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.

Copy link

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

Adds an optional private argument to the /match-candidates Discord slash command so users can request ephemeral (private) match results, while keeping the default behavior public.

Changes:

  • Add parsing/validation for a new private string argument and reject invalid values with an explicit error.
  • Make result publishing “private-aware” by deferring ephemerally and forcing followup sends to be ephemeral when requested.
  • Add unit tests covering default (public), private mode, and invalid input.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/discord_bot/src/five08/discord_bot/cogs/jobs.py Implements private arg parsing + private-aware defer/followup sending for /match-candidates.
tests/unit/test_crm.py Adds unit tests asserting ephemeral behavior for default/private modes and invalid private input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"""Parse the thread's starter message and find matching candidates ranked by fit.

Must be invoked inside a thread. The starter message is used as the job posting text.
The response is posted publicly in the thread.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The match_candidates docstring still says "The response is posted publicly in the thread.", but the new private arg can now make results ephemeral. Update the docstring to reflect the new behavior (public by default; ephemeral when private is truthy) so it doesn’t mislead future maintainers.

Suggested change
The response is posted publicly in the thread.
By default, the response is posted publicly in the thread; when ``private`` is truthy,
results are sent ephemerally instead.

Copilot uses AI. Check for mistakes.
@michaelmwu michaelmwu merged commit f746b91 into main Mar 9, 2026
9 checks passed
@michaelmwu michaelmwu deleted the feat/match-candidates-private-mode branch March 9, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants