fix: skip autoRecall for heartbeat/NO_REPLY turns#148
fix: skip autoRecall for heartbeat/NO_REPLY turns#148eisen0419 wants to merge 1 commit intoCortexReach:masterfrom
Conversation
Add NO_REPLY, HEARTBEAT_OK, health_check, system_check and their variants to SKIP_PATTERNS so heartbeat turns no longer trigger autoRecall injection. Also strip heartbeat/healthcheck wrapper prefixes in normalizeQuery() before pattern matching. Closes CortexReach#137
CI failure noteThe CI failure is a pre-existing issue on The This version mismatch exists on the current |
Review: fix: skip autoRecall for heartbeat/NO_REPLY turnsVerdict: Fix-then-merge — one blocking item before merge. ✅ What's working
🔴 Blocking (please fix before merge)No negative test cases. The test suite has 9 "should skip" cases but zero "should NOT skip" cases. Without negative coverage, a future regex change could silently over-match real user messages and no test would catch it. Suggested additions to // These should NOT be skipped
assert.equal(shouldSkipRetrieval("I got no reply from the server"), false);
assert.equal(shouldSkipRetrieval("noreply@example.com"), false);
assert.equal(shouldSkipRetrieval("system check required before deployment"), false);
assert.equal(shouldSkipRetrieval("my health check results came back"), false);🟡 Non-blocking notes
Good catch on the |
Summary
Heartbeat /
NO_REPLYturns were still triggeringautoRecallinjection, causing compaction-related latency spikes (minutes-long delays).Changes
src/adaptive-retrieval.ts:NO_REPLY,HEARTBEAT_OK,health_check,system_checkand variants toSKIP_PATTERNSnormalizeQuery()(e.g.[heartbeat] ...,heartbeat: ...)test/adaptive-retrieval-skip-heartbeat.test.mjs: 9 test cases covering all heartbeat variantspackage.json: added new test tonpm testpipelineRoot cause
shouldSkipRetrieval()already had/HEARTBEAT/ibut missed:NO_REPLY(common heartbeat prompt)HEARTBEAT_OK/heartbeat okvariantshealth_check/system_checkpatterns[heartbeat] NO_REPLYorheartbeat: NO_REPLYTest plan
smart-extractor-branches.mjshas a pre-existing failure unrelated to this change)Closes #137