Skip to content

AI Bug Fixes: 2026-10-10T01:02:17Z — 1 fixed, 0 introduced, net +1 - #75

Merged
recursive-ai-dev merged 1 commit into
devfrom
ai-fixes/run-20261010T010217
Oct 10, 2026
Merged

recursive-ai-dev merged 1 commit into
devfrom
ai-fixes/run-20261010T010217

Conversation

@recursive-ai-dev

Copy link
Copy Markdown
Owner

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 item in conversation.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

  • Baseline bugs: 0 (all 50 tests passed at start of run)
  • Bugs found: 1 (mixed-conjunction reply used wrong message variant — revealed by new test)
  • Bugs fixed: 1
  • Bugs introduced: 0
  • Net improvement: +1

Lessons Applied

  • Run 3 lesson: records.length > 1 branch is a semantic hotspot — always check created flags before selecting the reply variant. This run extended that to distinguish allNew vs anyNew vs allExisting, completing the three-way classification.
  • Run 2 lesson: Deduplicate by memory.id before checking counts — already in place, enabling accurate per-record created flags for this fix.

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.
@recursive-ai-dev
recursive-ai-dev merged commit b9a53b7 into dev Oct 10, 2026
3 checks passed
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 45274e86-9df7-4bf1-9676-b27a97e469f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant