Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Make reflow-scan fail gracefully on unresponsive pages #303

Backlog

Description

@helen

Parent: github/accessibility-scanner#300

Goal

Make the built-in reflow-scan plugin finish or report an actionable failure within a bounded cooperative wait, without leaving the page at the wrong viewport or hiding the original error.

Current behavior

The plugin resizes to 320 x 256, evaluates horizontal overflow, calls addFinding when appropriate, and restores the original viewport in finally. Its own awaits have no explicit overall budget. Errors are caught and logged rather than propagated, and a failed or stalled viewport restoration can obscure the original failure.

Scope

  • Bound the plugin's viewport resize, overflow evaluation, finding callback, and restoration work. Reuse shared deadline/cancellation support where available rather than adding a second competing timeout system.
  • Identify the operation that failed or exceeded its budget and propagate that failure to the caller. The caller handles it according to the selected plugin-failure policy rather than interpreting a normal plugin return as a completed check with no overflow.
  • Attempt viewport restoration within a bounded cleanup budget. Preserve the original failure if restoration also fails, while retaining the cleanup error as useful context.
  • Do not let later scans reuse a page whose viewport/state could not be restored safely. Signal that condition to the caller rather than attempting an unbounded recovery loop in the plugin.
  • Preserve the existing overflow tolerance and finding content on healthy pages.

Acceptance criteria

  • Synthetic-page or mocked tests cover successful overflow/no-overflow checks and a non-returning or rejecting resize, evaluation, finding callback, and viewport restoration.
  • Every failure path exits within a documented cooperative wait budget and identifies the failing operation, provided the JavaScript event loop can run timers. These budgets do not guarantee termination of a blocked controller or browser teardown.
  • Restoration is attempted when appropriate; a restoration error does not replace the original scan error.
  • Healthy pages retain their original viewport after the plugin finishes, and the existing accessibility finding semantics are unchanged.
  • Failed reflow work is handed off as an explicit error and handled according to the selected caller policy. With the opt-in abort policy, incomplete plugin work must stop the run before findings are published for issue filing. With the compatibility log-and-continue policy, the caller logs the failure and may publish partial findings; those results are not a guarantee of complete coverage. Verify and document both behaviors in the separate configurable-policy PR.

Boundary

This task owns the built-in plugin's control flow and its failure handoff. Configurable caller handling (log-and-continue by default, abort when explicitly selected) is split into a separate PR; the plugin-local PR preserves existing caller behavior. This task does not own terminating a stuck browser/controller, generic custom-plugin watchdogs, the action-wide reporting schema, or issue reconciliation. Those are separate tasks under the parent. A plugin-local timer is not a substitute for the runner's hard recovery boundary.

🤖 Assisted by Copilot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions