[GH-ISSUE #1490] fix(web): isolate case-distinct script paths only for a colliding destination #504

Closed
opened 2026-10-15 18:25:39 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @cursor[bot] on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/1490

TL;DR: Exporting captured web scripts isolates every case-distinct URL path, even when the destination filesystem can store both spellings.

Archive extraction was split so a case collision fails only when the destination directory cannot keep both names (#1470). Web script export still applies a case-insensitive layout rule up front.

Area

Evidence, artifacts, or reconstruction

Observed behavior

planWebScriptExport builds a candidate relative path from the URL, then conflictingPaths folds every prefix with toLowerCase(). Any two spellings that fold together, or a file and a directory that fold together, are conflicts. Each conflict is written under isolated/source-N-<hash>.js with layout reason "Captured paths collide by content version, case, or file/directory prefix."

The fold is JavaScript's Unicode toLowerCase(), not a filesystem case table, and not the English (en-US) fold the archive inventory uses when it describes a destination collision. The plan never reads the destination directory. A case-sensitive volume could store origins/<hash>/Main.js and origins/<hash>/main.js side by side; both are isolated instead.

Isolation is recorded on the export record, so the bytes are not dropped. The URL layout the analyst asked to preserve is.

Expected behavior

Case-distinct URL paths should keep the URL layout when the destination can store both. Isolation should be reserved for an observed destination collision, an exact path collision, or a file/directory prefix collision on the same spelling. The fold used in the limitation should be the same one named for archive destinations, and it should say it is not a filesystem observation.

Where

  • src/domain/webScriptExportPlan.ts — planWebScriptExport, conflictingPaths
Originally created by @cursor[bot] on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/1490 **TL;DR:** Exporting captured web scripts isolates every case-distinct URL path, even when the destination filesystem can store both spellings. Archive extraction was split so a case collision fails only when the destination directory cannot keep both names (#1470). Web script export still applies a case-insensitive layout rule up front. ### Area Evidence, artifacts, or reconstruction ### Observed behavior `planWebScriptExport` builds a candidate relative path from the URL, then `conflictingPaths` folds every prefix with `toLowerCase()`. Any two spellings that fold together, or a file and a directory that fold together, are conflicts. Each conflict is written under `isolated/source-N-<hash>.js` with layout reason "Captured paths collide by content version, case, or file/directory prefix." The fold is JavaScript's Unicode `toLowerCase()`, not a filesystem case table, and not the English (`en-US`) fold the archive inventory uses when it describes a destination collision. The plan never reads the destination directory. A case-sensitive volume could store `origins/<hash>/Main.js` and `origins/<hash>/main.js` side by side; both are isolated instead. Isolation is recorded on the export record, so the bytes are not dropped. The URL layout the analyst asked to preserve is. ### Expected behavior Case-distinct URL paths should keep the URL layout when the destination can store both. Isolation should be reserved for an observed destination collision, an exact path collision, or a file/directory prefix collision on the same spelling. The fold used in the limitation should be the same one named for archive destinations, and it should say it is not a filesystem observation. ### Where - `src/domain/webScriptExportPlan.ts` — `planWebScriptExport`, `conflictingPaths`
bsakaguchi 2026-10-15 18:25:39 +00:00
Author
Owner

@morluto commented on GitHub (Oct 10, 2026):

Thanks for reporting this. Closing as resolved on main. Web script planning preserves exact case-distinct URL paths. Publication isolates a path only when the destination reports a collision, with that collision recorded in the output.

Merged fix. I checked the current source against this report; no tests or real-provider workflows were run for this closure pass.

<!-- gh-comment-id:6099804304 --> @morluto commented on GitHub (Oct 10, 2026): Thanks for reporting this. Closing as resolved on main. Web script planning preserves exact case-distinct URL paths. Publication isolates a path only when the destination reports a collision, with that collision recorded in the output. [Merged fix](https://github.com/morluto/rea/commit/b4db35f092d7166aebdf4387b48f7652b1d1c3b6). I checked the current source against this report; no tests or real-provider workflows were run for this closure pass.
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#504
No description provided.