Skip to content

(find): Add per-URL timeouts and recovery - #320

Open
smockle wants to merge 6 commits into
mainfrom
smockle-timeout-per-url-refinement
Open

smockle wants to merge 6 commits into
mainfrom
smockle-timeout-per-url-refinement

Conversation

@smockle

@smockle smockle commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Part of https://github.com/github/accessibility/issues/11286 (Hubber access only)

Part of #302

This PR enables the Find action to clean-up timed-out scans, report the URL-specific failure, and stop without publishing partial findings. The timeout is configurable via a new, optional timeout_per_url input. The recovery path uses POSIX process groups; further work would be required to support Windows runners.

Related to #313; the biggest differences are:

  • This PR “fails closed”—as soon as one URL scan times out, all scanning stops. No findings are reported; cached findings from previous runs aren’t forwarded.
  • This PR is roughly 33% smaller than #313, and it directly targets main without depending on earlier stacked PRs.

smockle and others added 3 commits December 3, 2026 00:14
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@smockle smockle changed the title Add per-URL scan timeouts and recovery (find): Add per-URL timeouts and recovery Dec 3, 2026
smockle and others added 2 commits December 3, 2026 01:38
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@smockle
smockle marked this pull request as ready for review December 3, 2026 14:42
@smockle
smockle requested a review from a team as a code owner December 3, 2026 14:42
@smockle
smockle requested review from accessibility-bot and an adaptive review from Copilot December 3, 2026 14:42

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.

🟡 Changes recommended

Critical supervision gaps can leave detached descendants running or crash the supervisor on asynchronous fork errors, while end-to-end lifecycle tests are missing and per-URL plugin installation adds overhead.

4 open issues
What changed in this PR

Introduces configurable per-URL timeouts for the Find action, with isolated scan workers and process cleanup. Failed scans stop the run without publishing partial findings.

Changes:

  • Adds and documents timeout_per_url.
  • Supervises worker and browser processes, and propagates scan failures.
  • Adds cleanup, timeout, and fail-closed tests.
File Description
README.md Documents the timeout input.
action.yml Exposes and forwards the timeout.
.github/​scanner-plugins/​reflow-scan/​index.ts Propagates reflow errors.
.github/​actions/​find/​tests/​processSupervisor.test.ts Tests supervisor outcomes and cleanup.
.github/​actions/​find/​tests/​processSupervisor.integration.test.ts Tests real process-group termination.
.github/​actions/​find/​tests/​pluginManager.test.ts Expects plugin-loading failures to propagate.
.github/​actions/​find/​tests/​index.test.ts Tests timeout configuration and fail-closed behavior.
.github/​actions/​find/​tests/​fixtures/​persistentProcessGroup.mjs Provides persistent processes for cleanup tests.
.github/​actions/​find/​tests/​findForUrl.test.ts Tests browser connections and error propagation.
.github/​actions/​find/​src/​processSupervisor.ts Adds worker supervision and bounded cleanup.
.github/​actions/​find/​src/​pluginManager/​index.ts Rethrows plugin-loading errors.
.github/​actions/​find/​src/​index.ts Dispatches workers and withholds incomplete results.
.github/​actions/​find/​src/​generateScreenshots.ts Propagates screenshot failures.
.github/​actions/​find/​src/​findForUrl.ts Supports supervised browsers and propagates failures.
.github/​actions/​find/​README.md Documents timeout and failure behavior.
.github/​actions/​find/​action.yml Declares the Find action timeout input.

Review effort: Balanced (adaptive)

clearTimeout(scanTimeoutTimer)

const browserClosed = browserServer.kill()
const processGroupPids = [scanProcess.pid, browserPid]
)
let findingsForUrl
try {
findingsForUrl = await runScanInChildProcess(
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

2 participants