Conversation
…fails and overall harden prompts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds a Possibly Related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/config_test.go (1)
110-119: ⚡ Quick winExpand bool parsing coverage to include falsey and invalid inputs.
Current table coverage only validates truthy inputs;
readBoolalso has explicit falsey and invalid-fallback branches that should be locked down to prevent regressions.♻️ Suggested test expansion
func TestDisableScrapeBoolParsing(t *testing.T) { - for _, value := range []string{"1", "true", "TRUE", "yes", "on"} { - t.Run(value, func(t *testing.T) { - t.Setenv(config.ENV_DISABLE_SCRAPE, value) - if !config.Load().DisableScrape { - t.Fatalf("DisableScrape %q: want true", value) - } - }) - } + cases := []struct { + name string + value string + want bool + }{ + {"truthy_1", "1", true}, + {"truthy_true_upper", "TRUE", true}, + {"truthy_yes", "yes", true}, + {"falsey_0", "0", false}, + {"falsey_false", "false", false}, + {"falsey_off", "off", false}, + {"invalid_fallback_default_false", "maybe", false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + t.Setenv(config.ENV_DISABLE_SCRAPE, tc.value) + if got := config.Load().DisableScrape; got != tc.want { + t.Fatalf("DisableScrape %q: want %v, got %v", tc.value, tc.want, got) + } + }) + } }🤖 Prompt for 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. In `@tests/config_test.go` around lines 110 - 119, The TestDisableScrapeBoolParsing test currently only validates truthy input values for the DisableScrape boolean parsing. Expand the test to include additional subtests covering falsey inputs (such as "0", "false", "FALSE", "no", "off") that should result in DisableScrape being false, and also add subtests for invalid or unexpected input values to verify the fallback behavior of the readBool function. This ensures all branches of the boolean parsing logic are tested and protected against regressions.
🤖 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 `@tools/search.go`:
- Around line 24-26: The SEARCH_DESC_NO_SCRAPE constant currently appends to
SEARCH_DESC, which means it inherits scraping-related instructions that conflict
with the no-scrape mode where scraping is unavailable. Refactor
SEARCH_DESC_NO_SCRAPE to be a complete, standalone description that does not
append to or inherit from SEARCH_DESC, ensuring it contains only instructions
appropriate for search functionality without any scraping capabilities.
---
Nitpick comments:
In `@tests/config_test.go`:
- Around line 110-119: The TestDisableScrapeBoolParsing test currently only
validates truthy input values for the DisableScrape boolean parsing. Expand the
test to include additional subtests covering falsey inputs (such as "0",
"false", "FALSE", "no", "off") that should result in DisableScrape being false,
and also add subtests for invalid or unexpected input values to verify the
fallback behavior of the readBool function. This ensures all branches of the
boolean parsing logic are tested and protected against regressions.
🪄 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 Plus
Run ID: 0b768550-58e9-4c26-abe1-be09996469b3
📒 Files selected for processing (8)
README.mdcommands/handler_test.gocommands/register.gocommands/scrape.gointernal/config/config.gotests/config_test.gotools/scrape.gotools/search.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
degoog-org/docs(manual)degoog-org/degoog(auto-detected)
…fails and overall harden prompts
Summary by CodeRabbit
New Features
DEGOOG_MCP_DISABLE_SCRAPE; when enabled, only the search tool is exposed.Improvements
Documentation
DEGOOG_MCP_DISABLE_SCRAPE.