Repository navigation
AI Bug Fixes: 2026-10-10T01:02:17Z — 1 fixed, 0 introduced, net +1 - #75
Merged
Merged
Conversation
When a user says 'I like coffee and pizza' after 'I like coffee and tea', coffee is existing (created=false) and pizza is new (created=true). Previously, anyNew=true caused the 'I've kept those reports separately' message — misleading because coffee was already saved before this turn. Fix: distinguish three cases in the records.length>1 branch: • allNew (every record created=true): 'I've kept those reports separately' (original) • mixed (some new, some existing): 'I've noted those:' with (already saved) labels • allExisting (none created): 'I have those saved already' (unchanged) Added regression test: 'I like coffee and tea' then 'I like coffee and pizza' asserts three active memories, no 'kept separately' text, and pizza in reply.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bugs Fixed This Run
Mixed-new/existing conjunction reply used wrong message variant
File:
src/model/dialogue.js(multi-item preference branch,records.length > 1)Bug: When a user said "I like coffee and tea" followed by "I like coffee and pizza", the system replied with "I've kept those reports separately" — a message designed for all-new conjunctions. But coffee was already saved (
created=false), so this was misleading: it implied both items were freshly stored as separate reports, when in reality one was pre-existing.Root cause: The branch used
anyNew = records.some(r=>r.created)to select the reply, which fires for any mix of new/existing records — including the partial-new case.Fix: Introduced
allNew = records.every(r=>r.created)and split into three cases:allNew→ "I've kept those reports separately:" (original behavior, correct for fully new conjunctions)anyNew && !allNew(mixed) → "I've noted those:" with(already saved)labels on pre-existing items!anyNew→ "I have those saved already:" (unchanged, from Run 3 fix)Test added:
mixed-new/existing conjunction must not say "kept separately" for the known iteminconversation.test.cjs— asserts 3 active memories, no "kept separately" text, and pizza mentioned in reply.Bugs Introduced This Run
None. All 51 tests pass; build check passes.
Net Improvement
Lessons Applied
records.length > 1branch is a semantic hotspot — always checkcreatedflags before selecting the reply variant. This run extended that to distinguishallNewvsanyNewvsallExisting, completing the three-way classification.memory.idbefore checking counts — already in place, enabling accurate per-recordcreatedflags for this fix.