NotASithLord / NotASithLord/peerd
page_exec: host loss hides unknown outcome after dispatch
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_execmaps this result topage_exec_outcome_unknown.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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