refactor: trim MCP instructions and fix Alliance appendix numbering - #197
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR trims operator/install/deploy content from the core and Alliance instruction strings, rewrites the Alliance manual flow into unnumbered bullets with a suggest-flow escape clause, and updates tests plus supporting changelog and configuration notes. ChangesInstruction content and Alliance flow updates
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #197 +/- ##
=======================================
Coverage ? 83.86%
=======================================
Files ? 45
Lines ? 2306
Branches ? 779
=======================================
Hits ? 1934
Misses ? 372
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@src/constants.test.ts`:
- Around line 40-45: The duplicate-numbering guard in the
ALLIANCE_INSTRUCTIONS_APPENDIX test only checks for a numbered 4. step, so it
can miss a future 5. step appearing alone. Update the assertion in
src/constants.test.ts around ALLIANCE_INSTRUCTIONS_APPENDIX to cover both step-4
and step-5 numbering patterns, using the same test block that currently
references ALLIANCE_SERVER_INSTRUCTIONS and ALLIANCE_INSTRUCTIONS_APPENDIX, so
the guard detects either duplicate numbering case.
In `@src/constants.ts`:
- Around line 66-72: The Alliance appendix in ALLIANCE_INSTRUCTIONS_APPENDIX
repeats the suggest-flow gate in two places and should be consolidated into a
single guidance statement. Update the appended text so the mandatory gate around
suggest_query_params is stated once, and ensure that gate explicitly applies to
query, count, and query_documents in the unified instruction. Keep the wording
aligned with the existing manual flow guidance while removing the duplicated
bullet/paragraph redundancy.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: d5edfc4d-9eda-4800-99ed-bf21b5d76af0
📒 Files selected for processing (4)
CHANGELOG.mddocs/CONFIGURATION.mdsrc/constants.test.tssrc/constants.ts
Description
Trim operator/install/deploy content from default MCP
instructionsstrings and restructure the Alliance appendix for clarity. No runtime behavior change —setupCoreServer/setupAllianceServerdefaults, config resolvers, and theinstructionsoverride are unchanged.Addresses instruction review concerns C2 (operator token cost), C3 (duplicate Alliance step numbering), and C6 (suggest-flow escape clause).
Type of Change
Changes Made
src/constants.tsPINECONE_RERANK_MODELframing)PINECONE_DISABLE_SUGGEST_FLOW=trueescape clause to the manual-flow bulletsrc/constants.test.tsrag-hybridassertion from appendix testdocs/CONFIGURATION.mdCHANGELOG.md[Unreleased] > Changedentry for instruction trimToken reduction
CORE_SERVER_INSTRUCTIONSALLIANCE_INSTRUCTIONS_APPENDIXALLIANCE_SERVER_INSTRUCTIONSTesting
npm run ci— 339 tests)Related issues
Additional Notes
No API, tool surface, or config default changes. Stripped operator content was already documented in
docs/CONFIGURATION.mdandREADME.md; the only doc addition is clarifying that missing config throws at startup, not as an MCP tool error.Summary by CodeRabbit
Documentation
apiKeyorindexName) are missing in single-key mode.Tests