Skip to content

Recover planner localization without downgrading Act - #2749

Merged
webbrain-one merged 2 commits into
webbrain-one:mainfrom
esokullu:codex/planner-localization-download-intent
Aug 11, 2026
Merged

Recover planner localization without downgrading Act#2749
webbrain-one merged 2 commits into
webbrain-one:mainfrom
esokullu:codex/planner-localization-download-intent

Conversation

@esokullu

@esokullu esokullu commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • recover missing or partial planner localization from sanitized canonical display fields
  • preserve Act execution and canonical execution metadata when presentation-only localization is absent
  • keep clarifications without an actual localized question on the planner repair path
  • mirror the behavior in Chrome and Firefox with trace-shaped regression coverage

Root cause

The compact planner could return otherwise valid execution intent without the presentation-only localized object. The normalizer treated that omission as a fatal contract failure, so WebBrain repaired the planner response and could ultimately downgrade an Act turn to Ask/read-only mode even though the canonical execution fields were usable.

Impact

Recoverable localization omissions no longer revoke Act execution. Canonical planner text becomes the safe display fallback for missing or partial translated fields, while execution metadata such as requires_state_change remains unchanged.

Clarifications remain strict because their localized summary must contain the actual question presented to the user.

Deferred follow-up

Planner correction of incorrect download completion requirements is intentionally disabled and tracked separately in #2752. A prose heuristic was rejected because lookup framing such as Find the URL to download the report is semantically read-only despite containing to download.

Validation

  • npm test
  • Chrome/Firefox planner parity
  • git diff --check

Source change: a02b1435, rebased onto the current upstream main for a clean PR diff.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

@esokullu is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu
esokullu marked this pull request as ready for review August 11, 2026 15:00
@webbrain-one
webbrain-one requested a balanced review from Copilot August 11, 2026 15:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves planner recovery for missing localization and corrects download mutation intent across Chrome and Firefox.

Changes:

  • Backfills partial localization from canonical fields.
  • Detects download/local-save plans requiring state changes.
  • Adds cross-browser regression coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/chrome/src/agent/planner.js Updates Chrome planner normalization.
src/firefox/src/agent/planner.js Mirrors planner behavior in Firefox.
test/run.js Adds localization and download-intent tests.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/firefox/src/agent/planner.js Outdated
// bounded local-save phrase covers compact plans, whose steps omit tools.
const actionText = [summary, ...steps.map(step => step.action)].join('\n');
return actionText.split('\n').some(line => (
/(?:^|[.!?]\s*|\b(?:and|then|to)\s+)download(?:s|ed|ing)?\s+(?!(?:links?|urls?|buttons?|pages?|instructions?)\b)\S/i.test(line)
Comment thread src/chrome/src/agent/planner.js Outdated
// bounded local-save phrase covers compact plans, whose steps omit tools.
const actionText = [summary, ...steps.map(step => step.action)].join('\n');
return actionText.split('\n').some(line => (
/(?:^|[.!?]\s*|\b(?:and|then|to)\s+)download(?:s|ed|ing)?\s+(?!(?:links?|urls?|buttons?|pages?|instructions?)\b)\S/i.test(line)
@esokullu esokullu changed the title Fix planner localization recovery and download intent Recover planner localization without downgrading Act Aug 11, 2026
@webbrain-one
webbrain-one merged commit 93ac80f into webbrain-one:main Aug 11, 2026
1 of 2 checks passed
@webbrain-one
webbrain-one deleted the codex/planner-localization-download-intent branch August 11, 2026 15:24
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.

3 participants