Closed Bug 2057024 Opened 1 month ago Closed 1 month ago

Memories in v1 schema pre-source field do not convert to v2

Categories

(Core :: Machine Learning: General, defect)

defect

Tracking

()

VERIFIED FIXED
155 Branch
Tracking Status
firefox154 --- verified
firefox155 --- verified

People

(Reporter: cdipersio, Assigned: cdipersio)

References

Details

(Whiteboard: [aidisc])

Attachments

(3 files)

Memories in the v1 schema that are old enough to be missing the source field raise errors in v1->v2 conversion. The migration function needs to be updated to handle the error case.

Pushed by cdipersio@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5235d59814a5 https://hg.mozilla.org/integration/autoland/rev/59128e8c5981 Memories in v1 schema pre-source field do not convert to v2 r=cmurray,ai-platform-reviewers,thasan
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

Steps to reproduce

  1. Ensure you're working off the latest beta without this Bug's patch
  2. Replace the memories.json.lz4 file in your Firefox profile with the attached one
  3. Open Smart Window and Browser Console
  4. Attempt to view memories in the settings page
  5. You should see the following error in Browser Console, and the memories settings page should show a single line where memories should be listed. It should not say "No memories yet"
Uncaught (in promise) TypeError: can't access property "includes", memory.sources is undefined
    computeMemoryStrength moz-src:///browser/components/aiwindow/models/memories/Memories.sys.mjs:213
    migrateMemoryStoreVersionOneToTwo moz-src:///browser/components/aiwindow/services/MemoryStore.sys.mjs:221
    migrateMemoryStoreVersionOneToTwo moz-src:///browser/components/aiwindow/services/MemoryStore.sys.mjs:137
    loadMemories moz-src:///browser/components/aiwindow/services/MemoryStore.sys.mjs:283

Steps to confirm fix

  1. Add the patch to your beta build
  2. Repeat steps 2-4 above
  3. You should not see the error in Browser Console
  4. The memories settings page should show the following memory: Plans Firefox AI features and strategy
Attached file memories.json.lz4

Memories test file to confirm bug fix

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Smart Window memories created before 3/30 cause the function that loads memories to throw due to a missing key. No memories will be loaded. This patch addresses the missing key and makes the function robust to other potential missing keys.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Steps to reproduce and verify in Bugzilla, including a test memories file.
  • Risk associated with taking this patch: low
  • Explanation of risk level: This patch only touches the function that migrates Smart Window memories from the v1 to v2 schema. It does not affect any other part of Smart Window or Firefox more broadly.
  • String changes made/needed?: n/a
  • Is Android affected?: no
Attachment #9616965 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Attachment #9616965 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift][qa-ver-needed-c155/b154]

We reproduced the issue on Beta 153.0b3 under macOS 26 arm using STR from comment 4.

The issue is verified as fixed on latest Nightly 155.0a1 and Beta 154.0b4 under macOS 26 arm, Win 11 and Ubuntu 26.

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c155/b154] → [uplift][qa-ver-done-c155/b154]
Flags: qe-verify+
QA Contact: cgeorgiu
Blocks: 2057625
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: