-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: respect user instructions against mock/fake data generation #8843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add CRITICAL DATA HANDLING RULE to system prompts - Implement detection for anti-mock data instructions in user preferences - Add prominent directive when user requests no mock/fake/simulation data - Include comprehensive test coverage for detection logic - Update system prompt snapshots to include new rule Fixes #8842
Review Complete✅ No issues found This PR looks good to merge. The implementation is well-structured with:
The code is type-safe, follows project conventions, and all snapshots are properly updated. Latest commit review: Snapshot updates correctly synchronized with the implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
Updated snapshots in add-custom-instructions.spec.ts to include the new CRITICAL DATA HANDLING RULE that was added to the system prompts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
This PR attempts to address Issue #8842 where Roo Code was consistently generating mock/fallback data despite explicit user instructions not to do so.
Problem
Users reported that when they explicitly instructed Roo Code not to use mock data, fake data, simulations, or fallback data, the agent would still generate placeholder values instead of implementing real data connections.
Solution
This implementation adds multiple layers of protection against unwanted mock data generation:
1. System Prompt Enhancement
2. User Instruction Detection
detectAntiMockDataInstructions()function that detects 18 different patterns users might use to express they don't want mock data3. Prominent Warning Directive
4. Comprehensive Testing
Technical Details
src/core/prompts/sections/rules.ts- Added data handling rulesrc/core/prompts/sections/custom-instructions.ts- Added detection logic and directive insertionsrc/core/prompts/sections/__tests__/custom-instructions.spec.ts- Added comprehensive testsTesting
Fixes #8842
Feedback and guidance are welcome!
Important
Enhances system prompts and adds detection for user instructions against mock data generation, with comprehensive testing.
detectAntiMockDataInstructions()incustom-instructions.tsto detect user instructions against mock data.rules.tswith a critical data handling rule to respect user instructions against mock data.custom-instructions.spec.tsto verify detection of anti-mock instructions and proper directive placement.loadAgentRulesFile()incustom-instructions.tsto handle symlinks and read agent rules files.This description was created by
for b1f32d3. You can customize this summary. It will automatically update as commits are pushed.