[GH-ISSUE #787] [Bug] Windows historical-source import reports permission advice for unavailable no-follow support #341

Closed
opened 2026-10-15 18:24:05 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/787

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Evidence, artifacts, or reconstruction; CLI diagnostics.

Observed behavior

On Windows, importing a readable local historical source directory exits 1 with:

{"error":"Import failed","category":"execution_failure","message":"Reference source files could not be read. Check directory permissions and try again."}

The failure is an unavailable no-follow file-opening capability, not an observed directory permission denial. Running with an elevated token produces the same unsupported result, so the current advice cannot recover this workflow.

Reproduction

New-Item -ItemType Directory .\reference-fixture
Set-Content .\reference-fixture\main.js 'export const value = 1;'
rea import-reference-source .\reference-fixture --json

Use a directory the caller can already read. No permission or machine configuration changes are required.

Expected behavior

Preserve the unsupported-reader reason through application import and CLI projection. Identify missing safe no-follow support and point to the currently supported import workflow on Linux/macOS, including WSL where the chosen tree is accessible. Document the Windows limitation without asking users to change permissions or reinstall REA.

Impact and scope

Windows analysts receive incorrect recovery advice and cannot distinguish unsupported host behavior from I/O failure. This issue covers diagnostic preservation and documentation; implementing a Windows-native historical-source reader is separate work. Source mapping with a caller-supplied valid HistoricalSourceGraph is not proved broken by this import failure.

REA version

4.1.0, main e1ca412757.

Runtime and platform

Windows x64, Node 22.19.0. Reproduced through the isolated native Windows npm package.

Target and artifact context

Tiny readable JS source directory containing only owned fixtures.

Interface

CLI.

Earliest failure stage

Capture or observation; reader capability admission.

Relevant output or evidence

The exact public JSON result is quoted above. Source reader returns code unsupported and message Safe no-follow file opens are unavailable; importReferenceSource converts every non-cancelled reader error to io, and projectReferenceSourceImportError substitutes generic permission advice.

Typed outcome or recovery expected

A distinct unsupported classification with a usable workflow. CLI must retain exit 1 and error logging after the new classification; invalid roots, cancellation, genuine I/O and parser failures retain their existing behavior.

Analysis or suspected cause

Source-traced through ReferenceSourceReaderValidate.noFollowOpenSupported, ReferenceSourceReader, ReferenceSourceImport, ReferenceSourceImportTypes, and cli/referenceSourceImportStatus. No permission denial was observed in this fixture.

Additional context

Include regression coverage for the error mapping and command failure classifier, plus a real packaged Windows repro. Preserve safe file-opening admission; do not enable unchecked Windows reads as a diagnostic fix.

Originally created by @N0zoM1z0 on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/787 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Evidence, artifacts, or reconstruction; CLI diagnostics. ### Observed behavior On Windows, importing a readable local historical source directory exits 1 with: ```json {"error":"Import failed","category":"execution_failure","message":"Reference source files could not be read. Check directory permissions and try again."} ``` The failure is an unavailable no-follow file-opening capability, not an observed directory permission denial. Running with an elevated token produces the same unsupported result, so the current advice cannot recover this workflow. ### Reproduction ```powershell New-Item -ItemType Directory .\reference-fixture Set-Content .\reference-fixture\main.js 'export const value = 1;' rea import-reference-source .\reference-fixture --json ``` Use a directory the caller can already read. No permission or machine configuration changes are required. ### Expected behavior Preserve the unsupported-reader reason through application import and CLI projection. Identify missing safe no-follow support and point to the currently supported import workflow on Linux/macOS, including WSL where the chosen tree is accessible. Document the Windows limitation without asking users to change permissions or reinstall REA. ### Impact and scope Windows analysts receive incorrect recovery advice and cannot distinguish unsupported host behavior from I/O failure. This issue covers diagnostic preservation and documentation; implementing a Windows-native historical-source reader is separate work. Source mapping with a caller-supplied valid HistoricalSourceGraph is not proved broken by this import failure. ### REA version 4.1.0, main e1ca412757bb01be855a66bf72006e3becd497b6. ### Runtime and platform Windows x64, Node 22.19.0. Reproduced through the isolated native Windows npm package. ### Target and artifact context Tiny readable JS source directory containing only owned fixtures. ### Interface CLI. ### Earliest failure stage Capture or observation; reader capability admission. ### Relevant output or evidence The exact public JSON result is quoted above. Source reader returns code `unsupported` and message `Safe no-follow file opens are unavailable`; importReferenceSource converts every non-cancelled reader error to `io`, and projectReferenceSourceImportError substitutes generic permission advice. ### Typed outcome or recovery expected A distinct unsupported classification with a usable workflow. CLI must retain exit 1 and error logging after the new classification; invalid roots, cancellation, genuine I/O and parser failures retain their existing behavior. ### Analysis or suspected cause Source-traced through ReferenceSourceReaderValidate.noFollowOpenSupported, ReferenceSourceReader, ReferenceSourceImport, ReferenceSourceImportTypes, and cli/referenceSourceImportStatus. No permission denial was observed in this fixture. ### Additional context Include regression coverage for the error mapping and command failure classifier, plus a real packaged Windows repro. Preserve safe file-opening admission; do not enable unchecked Windows reads as a diagnostic fix.
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#341
No description provided.