[PR #1273] [MERGED] fix(files): reject nonregular capture and JSON inputs #2755

Closed
opened 2026-10-17 21:09:53 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1273
Author: @Y0UW1SH
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/regular-capture-inputs


📝 Commits (4)

  • 87eb471 fix(files): reject nonregular capture and JSON inputs
  • a11a087 chore: integrate main for regular input review
  • 72ee980 test(files): verify FIFO diagnostics through current MCP delivery
  • 4077ef3 chore: refresh release checkpoint for file input review

📊 Changes

11 files changed (+442 additions, -14 deletions)

View changed files

📝 docs/javascript-application-workflows.md (+4 -0)
📝 docs/website-script-export.md (+4 -0)
➕ src/application/RegularFileRead.ts (+42 -0)
📝 src/application/WebScriptExportService.ts (+14 -6)
📝 src/application/android/AndroidAnalysisService.ts (+4 -3)
📝 src/cliJsonInput.ts (+10 -4)
➕ tests/boundary/cli/webScriptSelectionCli.test.ts (+46 -0)
📝 tests/boundary/filesystem/cliJsonInput.test.ts (+79 -1)
📝 tests/boundary/filesystem/webScriptExport.test.ts (+125 -0)
➕ tests/boundary/mcp/webScriptSelectionMcp.test.ts (+78 -0)
➕ tests/fixtures/fifoInput.ts (+36 -0)

📄 Description

Reject selected capture and CLI JSON inputs that cannot provide regular-file bytes. The shared reader opens nonblocking, verifies the opened handle, and reads that same handle, so FIFO selection returns an actionable input diagnostic instead of waiting for a writer. Symlinks to regular files retain the selected path and accepted behavior.

The branch includes current main (including the 6.2 release checkpoint). The MCP regression uses the production Evidence delivery path and validates the complete typed error in text content. No export directory is created after rejected selection.

Validation:

  • npm run test:focused -- tests/boundary/filesystem/cliJsonInput.test.ts tests/boundary/filesystem/webScriptExport.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts tests/boundary/mcp/webScriptSelectionMcp.test.ts — 28 tests pass, including the real CLI and pinned SDK consumer.
  • Covers directories, writer-free FIFO and FIFO symlinks, character devices, regular-file symlinks, malformed JSON/UTF-8, permissions, and pre-aborted capture selection.
  • No real Hopper/Ghidra verification: this change concerns local filesystem selection, independent of those providers.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1273 **Author:** [@Y0UW1SH](https://github.com/Y0UW1SH) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/regular-capture-inputs` --- ### 📝 Commits (4) - [`87eb471`](https://github.com/morluto/rea/commit/87eb4717a46718facaaac35910deb7ef7cc55651) fix(files): reject nonregular capture and JSON inputs - [`a11a087`](https://github.com/morluto/rea/commit/a11a087075c893a69a3ca3a7f75021f4ae0badcb) chore: integrate main for regular input review - [`72ee980`](https://github.com/morluto/rea/commit/72ee9802e370deabbd7bd2ad08cc92d7ea2d5fdd) test(files): verify FIFO diagnostics through current MCP delivery - [`4077ef3`](https://github.com/morluto/rea/commit/4077ef39c6dfd373164225cc0deb42e532452334) chore: refresh release checkpoint for file input review ### 📊 Changes **11 files changed** (+442 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `docs/javascript-application-workflows.md` (+4 -0) 📝 `docs/website-script-export.md` (+4 -0) ➕ `src/application/RegularFileRead.ts` (+42 -0) 📝 `src/application/WebScriptExportService.ts` (+14 -6) 📝 `src/application/android/AndroidAnalysisService.ts` (+4 -3) 📝 `src/cliJsonInput.ts` (+10 -4) ➕ `tests/boundary/cli/webScriptSelectionCli.test.ts` (+46 -0) 📝 `tests/boundary/filesystem/cliJsonInput.test.ts` (+79 -1) 📝 `tests/boundary/filesystem/webScriptExport.test.ts` (+125 -0) ➕ `tests/boundary/mcp/webScriptSelectionMcp.test.ts` (+78 -0) ➕ `tests/fixtures/fifoInput.ts` (+36 -0) </details> ### 📄 Description Reject selected capture and CLI JSON inputs that cannot provide regular-file bytes. The shared reader opens nonblocking, verifies the opened handle, and reads that same handle, so FIFO selection returns an actionable input diagnostic instead of waiting for a writer. Symlinks to regular files retain the selected path and accepted behavior. The branch includes current main (including the 6.2 release checkpoint). The MCP regression uses the production Evidence delivery path and validates the complete typed error in text content. No export directory is created after rejected selection. Validation: - `npm run test:focused -- tests/boundary/filesystem/cliJsonInput.test.ts tests/boundary/filesystem/webScriptExport.test.ts tests/boundary/cli/webScriptSelectionCli.test.ts tests/boundary/mcp/webScriptSelectionMcp.test.ts` — 28 tests pass, including the real CLI and pinned SDK consumer. - Covers directories, writer-free FIFO and FIFO symlinks, character devices, regular-file symlinks, malformed JSON/UTF-8, permissions, and pre-aborted capture selection. - No real Hopper/Ghidra verification: this change concerns local filesystem selection, independent of those providers. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:09:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2755
No description provided.