Closed Bug 2084938 Opened 1 month ago Closed 1 month ago

Perma TEST-UNEXPECTED-FAIL | browser/components/aiwindow/models/tests/browser/browser_aitab_generation.js | test_modification_is_answered_by_the_model - Test timed out when Gecko 160 merges to beta on 2026-10-22

Categories

(Core :: Machine Learning: Frontend, defect)

defect

Tracking

()

VERIFIED FIXED
161 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr153 --- unaffected
firefox158 --- unaffected
firefox159 --- unaffected
firefox160 + fixed
firefox161 --- verified

People

(Reporter: smolnar, Assigned: rrando)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 external files)

Central as Beta simulation

How to run these simulations

Failure log

[task 2026-10-22T10:13:58.580+00:00] 10:13:58     INFO - TEST-PASS | browser/components/aiwindow/models/tests/browser/browser_aitab_generation.js | test_createAITab_links_to_the_stored_page - "about:smartpage?page=hotels-in-lisbon" == "about:smartpage?page=hotels-in-lisbon"
[task 2026-10-22T10:13:58.581+00:00] 10:13:58     INFO - Leaving test test_createAITab_links_to_the_stored_page
[task 2026-10-22T10:13:58.582+00:00] 10:13:58     INFO - Entering test test_modification_is_answered_by_the_model
[task 2026-10-22T10:13:58.582+00:00] 10:13:58     INFO - Buffered messages logged at 10:12:07
[task 2026-10-22T10:13:58.584+00:00] 10:13:58     INFO - TEST-PASS | browser/components/aiwindow/models/tests/browser/browser_aitab_generation.js | test_modification_is_answered_by_the_model - The generate_page call left its result in the chat - {"id":"faaa40ae-d90a-44f5-9694-a09c5c429d3b","createdDate":1792663926688,"ordinal":4,"role":3,"content":{"tool_call_id":"generate_page_0","body":{"message":"The page was created. Link the user to it as [Hotels in Lisbon](§url_token: SAVED_PAGE_SMARTPAGE_1§).","page":{"slug":"hotels-in-lisbon"}},"name":"generate_page","args":{"modify_slug":"undefined"}},"turnIndex":1,"parentMessageId":"9881cb5e-a406-4722-80a5-16411b4e2e5c","modelId":"test-model","params":null,"usage":null,"toolCallId":null,"toolName":null,"revisionRootMessageId":"faaa40ae-d90a-44f5-9694-a09c5c429d3b","isActiveBranch":true,"convId":"ff13f021-5355-42ac-919a-3ba55a239e35","pageUrl":null,"memoriesEnabled":null,"memoriesFlagSource":null,"memoriesApplied":[],"webSearchQueries":[],"followUpSuggestions":[],"pageHistoryDeleted":false,"tokens":{"search":[],"existing_memory":[],"followup":[]},"toolUIData":null,"toolUIDraft":null,"historyResults":[],"citations":[],"kit":"undefined"} == true
[task 2026-10-22T10:13:58.584+00:00] 10:13:58     INFO - Buffered messages finished
[task 2026-10-22T10:13:58.585+00:00] 10:13:58     INFO - TEST-UNEXPECTED-FAIL | browser/components/aiwindow/models/tests/browser/browser_aitab_generation.js | test_modification_is_answered_by_the_model - Test timed out
[task 2026-10-22T10:13:58.586+00:00] 10:13:58     INFO - TEST-UNEXPECTED-TIMEOUT | browser/components/aiwindow/models/tests/browser/browser_aitab_generation.js | Test timed out
[task 2026-10-22T10:13:58.586+00:00] 10:13:58     INFO - TEST-INFO took 120034ms
[task 2026-10-22T10:14:00.902+00:00] 10:14:00     INFO - GECKO(9026) | Completed ShutdownLeaks collections in process 9026
[task 2026-10-22T10:14:00.903+00:00] 10:14:00     INFO - TEST-START | Shutdown
Flags: needinfo?(rrando)

The cause is in the test only. test_modification_is_answered_by_the_model (added by bug 2083956) opens about:smartpage?page=… in a tab (browser_aitab_generation.js). That page is gated by browser.smartwindow.aitab.enabled, which defaults to @IS_NIGHTLY_BUILD@ (StaticPrefList.yaml). When the tree builds as beta the pref is false, so AboutRedirector.cpp returns NS_ERROR_NOT_AVAILABLE. That error does not produce an error page, so no load event fires and BrowserTestUtils.openNewForegroundTab waits until the test times out. The test file never sets the pref: add_setup only pushes the log level, and browser.toml only sets browser.smartwindow.enabled. The earlier tasks pass on beta because they never load the page. Turning the pref off removes generate_page from the tool list sent to the model (Chat.sys.mjs), but it does not stop the tool from being called.

Fix: add ["browser.smartwindow.aitab.enabled", true] to the existing pushPrefEnv in add_setup, or to a pushPrefEnv inside this one task. The pref is mirror: always, and the AITab actor's enablePreference registers when the pref changes, so setting it while the test runs is enough. The same pattern is already used in browser_conversation_stream.js and browser_aitab_page.js. No other task changed by bug 2083956 loads the page.

Suggested severity: S4. Only the test is affected: the feature behind it is off by default on beta, so no user sees a change. It is still a permanent failure that should be fixed before the merge.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

It's too late to fix this before the main -> beta merge, but we can uplift the fix. Hopefully, :rrando can provide a patch soon.

Set release status flags based on info from the regressing bug 2083956

about:smartpage is unavailable when the pref is off, which is the default on beta.

Assignee: nobody → rrando
Status: NEW → ASSIGNED

sorry, I missed this. will get it done ASAP.

Flags: needinfo?(rrando)
Pushed by rrando@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e0c84326fb0c https://hg.mozilla.org/integration/autoland/rev/cf49e34033a1 Enable browser.smartwindow.aitab.enabled in browser_aitab_generation.js. r=jlewis
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: If declined the test fixed will continue to be a permafail
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: This is a test only fix, so there is nothing to test in nightly or QA.
  • Risk associated with taking this patch: low
  • Explanation of risk level: Low as it's a test only change
  • String changes made/needed?: No
  • Is Android affected?: no
Attachment #9668264 - Flags: approval-mozilla-beta?

about:smartpage is unavailable when the pref is off, which is the default on beta.

Original Revision: https://phabricator.services.mozilla.com/D336523

Attachment #9668264 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified fixed in today's beta simulation.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: