Repository navigation
fix(browser): classify export-web-scripts capture selection failures by cause - #1240
Merged
Merged
Conversation
…by cause
export_web_scripts reported a missing capture, a directory selected as
the capture, and an unreadable capture as an artifact io failure ("Script
export failed for <capture> -> <output>: ENOENT ..."), unlike its sibling
inspect_web_network_capture, which already reports these as invalid
input or access_denied.
Read the selected capture in its own step: ENOENT, ENOTDIR and EISDIR
become an invalid capture_path issue, and EACCES or EPERM becomes
access_denied. Failures while writing the export keep their existing
classification.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
…pture-selection fix(browser): classify export-web-scripts capture selection failures by cause
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
export_web_scripts/rea export-web-scriptsreports every problem with the selected capture as an artifact I/O failure of the export:capture_pathmainresult (CLI and MCP)artifact_operation_failed/io: "Script export failed for → : ENOENT: no such file or directory, open …"iofailure (EISDIR)iofailure (EACCES)Its sibling
inspect_web_network_capturealready classifies the same selections correctly:invalid_requestwith an issue on the capture path for a missing or non-file selection, andaccess_deniedfor a permission denial (src/browser/history/CaptureFailures.ts). Withexport_web_scripts, a caller could not tell a wrong selection from a failed export write.Change
WebScriptExportServicereads the selected capture in its own step (readCapture):ENOENT,ENOTDIRinvalid_request; issue oncapture_path: "Selected capture could not be read (ENOENT): "EISDIRinvalid_request; issue oncapture_path: "Selected capture is a directory, not a file: "EACCES,EPERMaccess_deniedwithpathandsystem_codeCancellation still reports
cancelled. Failures while publishing the export (output directory, durable writes, rollback) keep theirWebScriptExportErrorclassification. Schemas are unchanged.Tests
tests/boundary/filesystem/webScriptExport.test.tsfor a directory and an unreadable capture. The unreadable case is skipped on Windows and as root. Neither creates the output directory.capture_pathissue message instead of in the I/OuserMessage.mainand pass here.webScriptExportandwebModuleArtifactssuites: 21 passed.npm run check:changed(typecheck, lint) passed.Real CLI and MCP on macOS:
No Hopper or Ghidra verification was needed; neither provider is involved.
🤖 Generated with Claude Code