test: cover emitter domain guidance regressions#911
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@cursor please rebase this PR onto the latest Since this branch was opened, #912 ( Two asks:
After rebasing, make sure the full suite (incl. the new |
|
I've successfully rebased the PR onto the latest Changes Made1. Rebased onto current main
2. Updated tests for new heuristic
3. Justified the The problem it fixes: Generic prompts like "Optimize this API and make it better" were incorrectly triggering React-specific performance questions ("Have you profiled it with React DevTools Profiler?") How it's fixed: By removing Test coverage: The test 4. Verified full test suite
Ready for ReviewThe PR is now cleanly rebased and all tests pass. The behavior change is intentional, well-tested, and solves a real false-positive routing issue. The changes remain conservative and provider-agnostic as requested. |
Co-authored-by: Mehmet Özel <madara88645@users.noreply.github.com>
Co-authored-by: Mehmet Özel <madara88645@users.noreply.github.com>
Co-authored-by: Mehmet Özel <madara88645@users.noreply.github.com>
Adapt scenario consideration tests to match the stricter detect_frontend_download_feature logic from #912. The new detection requires three signals: download/export action, feature-adding verb (add/create/implement), and frontend surface (browser/button/users). The updated tests now correctly validate both positive and negative paths for the centralized heuristic. Co-authored-by: Mehmet Özel <madara88645@users.noreply.github.com>
3e62151 to
4b7b18f
Compare
There was a problem hiding this comment.
PR Risk Assessment
Risk level: Low
Code review required: No
Reviewers assigned: None (not required at this risk level)
Approval: N/A — PR already merged (df3db9e by @madara88645)
Evidence-based assessment
| Area | Finding |
|---|---|
| Files changed | 3 (app/emitters.py, tests/test_emitters_utils.py, tests/test_expanded_prompt.py) |
| Production logic | 1-line change: removed "optimi" from perf-marker list in _relevant_followups |
| Tests | +102 lines of focused regression coverage (unit + expanded-prompt integration) |
| Blast radius | Narrow — fixes false-positive routing where generic "Optimize this API…" prompts incorrectly received React-profiler follow-ups |
| Infra / auth / schema | None |
Rationale
The diff is predominantly test additions, but it includes a small production behavior fix in shared emitter routing. That places it above Very Low (test-only), yet the change is a single, well-isolated heuristic correction with strong positive/negative test coverage — consistent with Low risk.
No CODEOWNERS file is present; no domain-expert review is warranted at this level.
Automated risk assessment — conclusions derived from diff evidence only.
Sent by Cursor Automation: Assign PR reviewers



Summary
app/emitters.pyRisky behavior now covered
Test files added/updated
tests/test_emitters_utils.pytests/test_expanded_prompt.pyWhy these tests materially reduce regression risk
Validation
python3 -m pytest tests/test_emitters_utils.py tests/test_expanded_prompt.py -qpython3 -m pytest tests/test_emitters.py tests/test_emitters_utils.py tests/test_expanded_prompt.py -qNotes