NotASithLord / NotASithLord/peerd

page_exec: host loss hides unknown outcome after dispatch

Open
#460 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
410
Forks
45
Avg merge
11d 5h
Merged PRs (30d)
1

Description

Problem

debuggerPool.evaluate() returns plain errors when its deadline expires or when the tab or debugger closes after it sends Runtime.evaluate. The page script can still complete later, or it can already have sent an external effect.

page_exec then reports debugger_threw or debugger_detached. The agent can treat this as a normal failure and repeat the script. This can duplicate a submission, click, or authenticated write.

Reproduction

A test sends a Runtime.evaluate command that never settles. The deadline error has no outcomeKind.

A second test closes the debugger after dispatch. That error also has no outcomeKind.

Fix

Classify both results as host-lost. The existing page_exec_outcome_unknown path then tells the agent to verify page state before it retries.

Tests

  • Assert that the debugger-pool deadline returns outcomeKind: host-lost.
  • Assert that debugger loss after dispatch returns outcomeKind: host-lost.
  • Assert that page_exec maps this result to page_exec_outcome_unknown.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with debuggerPool.evaluate() and the page_exec outcome-mapping path, then run the existing tests for deadline expiry and debugger loss after dispatch. Done means both post-dispatch host-loss cases return outcomeKind: host-lost and page_exec maps them to page_exec_outcome_unknown.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.