Skip to content

fix(cerebro): reject blank memory update fields#610

Merged
yacosta738 merged 1 commit into
developfrom
bart/fix-cerebro-update-validation
Apr 20, 2026
Merged

fix(cerebro): reject blank memory update fields#610
yacosta738 merged 1 commit into
developfrom
bart/fix-cerebro-update-validation

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

Related Issues

  • None.

Summary

This PR closes a small validation gap in Cerebro memory updates.

  • add require_optional_non_empty for optional string fields that still must not be blank when provided
  • reject whitespace-only topic_key and scope values in mem_update
  • add a regression test covering a blank topic_key update request through the MCP tools contract

Tested Information

  • cargo test --manifest-path modules/cerebro/Cargo.toml mem_update_rejects_blank_topic_key
  • cargo test --manifest-path modules/cerebro/Cargo.toml --test mcp_tools_contract

Documentation Impact

  • Docs updated in:
  • No docs update required because this is a small validation fix for existing Cerebro tool behavior and does not change setup, APIs, or user-facing documentation.
  • I verified the documentation matches the current behavior.

Breaking Changes

  • None.

Checklist

  • I have checked that there isn’t already a PR solving the same problem.
  • I have read the Contributing Guidelines.
  • I ensured my code follows the project's style guidelines.
  • I have added or updated tests that prove my fix is effective or that my feature works.
  • I have updated the documentation, or I explained above why no documentation update is needed.
  • I verified the documentation matches the current behavior.
  • I have documented any breaking changes in the Breaking Changes section.
  • I have linked the related issue (if any).

Block whitespace-only scope/topic updates and add a regression test for mem_update.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 41 minutes and 25 seconds.

⌛ 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 449c66d0-35a8-49e1-8cf7-f067c8a409f3

📥 Commits

Reviewing files that changed from the base of the PR and between 1adbefa and 9a46505.

📒 Files selected for processing (3)
  • modules/cerebro/src/tools.rs
  • modules/cerebro/src/validation.rs
  • modules/cerebro/tests/mcp_tools_contract.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bart/fix-cerebro-update-validation

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.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 91% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 11 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3097 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 584 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 93% >= 0%
Repo History Min PRs Previous PRs in this repo 264 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-20 to 2026-04-20

@yacosta738 yacosta738 merged commit a391cfc into develop Apr 20, 2026
7 checks passed
@yacosta738 yacosta738 deleted the bart/fix-cerebro-update-validation branch April 20, 2026 16:25
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.

1 participant