Skip to content

fix(core): account for page progress in repeated clicks - #718

Open
tiancaihao wants to merge 1 commit into
mozilla:mainfrom
tiancaihao:fix/progress-aware-repetition
Open

tiancaihao wants to merge 1 commit into
mozilla:mainfrom
tiancaihao:fix/progress-aware-repetition

Conversation

@tiancaihao

Copy link
Copy Markdown

Description

Repeated clicks on the same control can advance a calendar or pager, but the current action-only guard aborts them as a loop. Track observed page states alongside the existing semantic action signature, using the snapshots already captured by the agent.

  • Reset the click repetition count for a previously unseen URL/normalized accessibility snapshot. Revisiting earlier states in the same action sequence does not reset it, so A/B cycles still stop.
  • Exclude regenerated refs and autonomous ARIA timer/marquee regions; keep compact fingerprints rather than historical snapshot strings.
  • Scope progress resets to clicks, retaining value-based repetition handling for equivalent fills and existing resets for exempt actions and reconnects.
  • Add execution-level regression tests, a local calendar fixture and opt-in real Chromium tests; document the behavior and its limits.

PR Type

  • Bug Fix

Related issues

Fixes #640. The calendar regression follows the maintainer's reproduction (13d77af).

Testing

  • pnpm run check: formatting, all workspace typechecks and schema drift check pass; 1,610 tests passed, 6 skipped by default.
  • pnpm run build: core, Chrome/Firefox extension builds and published package assembly pass.
  • Opt-in Chromium integration: 3 passed using local fixtures, a scripted language-model provider and real AI SDK tool execution. Five calendar clicks reach February; stagnant and cycling calendars stop despite timer changes.
  • Against original source, the same real-browser calendar test fails with Aborted: Excessive repetition; it passes after this change.
  • Regression coverage also checks ref churn, URL-only progress, progress followed by a stall, and equivalent fills whose snapshot values change cosmetically.

Limits

Snapshot novelty is a heuristic: unmarked dynamic content can still appear as progress. The overall iteration cap remains in place. Browser validation uses local fixtures rather than live-site evaluations.

Checklist

  • Implementation reviewed against the current execution loop
  • Tests and production build pass locally
  • Documentation updated
  • Contribution guidelines followed

AI Usage

  • No AI was used
  • AI was used for drafting/refactoring
  • This is fully AI-generated

Prepared and verified with OpenAI Codex.

Track normalized page states per repeated action so calendar and pager
clicks can advance without being mistaken for stagnant loops. Retain
loop detection for revisited states and value-based actions.

Add execution regressions and opt-in real-browser calendar coverage.

Fixes mozilla#640
@tiancaihao
tiancaihao requested a review from a team November 20, 2026 13:19

This branch has not been deployed

No deployments
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.

Repetition detector is state-blind: paging a date picker aborts the task (the stagnant-page signal #430 flagged is now load-bearing)

1 participant