Repository navigation
fix(javascript): project decoded file URL paths - #810
Conversation
Signed-off-by: Rudy Celekli <[email protected]>
Signed-off-by: Rudy Celekli <[email protected]>
|
Corrected the hosted shard regression in signed amendment I reproduced the failing suite locally (1 failed / 27 passed); all 110 related tests now pass, along with |
N0zoM1z0
left a comment
There was a problem hiding this comment.
Reviewed head2ff18c7b90. Known source-relative file URLs now use Node fileURLToPath with an inert, sufficiently deep POSIX anchor; decoded filenames, removed URL query/fragment, parent segments and established ./ spelling reach the existing confined artifact resolver. Plain filesystem punctuation stays literal; malformed/dynamic/remote/encoded-separator forms remain unknown. Existing syntactic callee recognition and target-platform limits are explicit. Production build and the focused filesystem/application/path suites passed, including native Node URL/read oracles. All19 exact-head hosted checks are green. No blocking findings.
|
Thanks, @rudycelekli, for your work on “fix(javascript): project decoded file URL paths.” I appreciate your contribution to REA. |
* fix(javascript): project decoded file URL paths Signed-off-by: Rudy Celekli <[email protected]> * fix: preserve explicit source-relative URL observation spelling Signed-off-by: Rudy Celekli <[email protected]> --------- Signed-off-by: Rudy Celekli <[email protected]>
Summary
Preserve the filesystem path produced by a known
fileURLToPath(new URL(..., import.meta.url))expression when discovering Electron entrypoints.Problem and expected behavior
For
fileURLToPath(new URL("./preload%20name.cjs", import.meta.url)), Node readspreload name.cjs. Static application analysis instead resolves an inventoriedpreload%20name.cjsdecoy. A query or fragment in the URL likewise remains in the inferred filesystem path even though Node discards it.This is a focused correction to an existing recognized expression; no separate issue was filed.
Change and scope
Decode known literal file URLs with Node's URL/file-path conversion and project their paths relative to an inert source-directory anchor. Preserve parent segments without consulting the host cwd. Keep dynamic, malformed, encoded dot/separator, remote and source-filename-only forms unknown. Plain filesystem strings retain their literal percent, question-mark and hash characters.
Recognition retains the existing syntactic callee-name heuristic; this does not add binding analysis or resolve shadowed functions. Similarly named
convertFileURLToPathis not recognized. Target JavaScript is not executed by analysis.Contract and boundary impact
windows: falseconversion; no Windows filesystem execution claim.docs/product-catalog.json), package, or installation impact: none.Evidence and regression coverage
Tests added or updated: public application analysis with real owned files and Node read/URL oracles, encoded space/Unicode/punctuation, query/fragment, parent-directory and ordinary controls; unsupported/dynamic syntax and literal filesystem punctuation controls.
Base reproduction or other evidence: new regressions on base
472b72aproduce 13 failures / 6 passing controls. Separate native Node/public application caller resolves the encoded-name decoy and misses the query-bearing URL; ordinary control succeeds. Afterward all four native caller cases, including plain filesystem punctuation, resolve the actual files.User-visible CLI/MCP output: the encoded-space preload observation changes
resolved_path: "preload%20name.cjs"toresolved_path: "preload name.cjs"; the query-bearing URL resolvespreload.cjs.Remaining proof gaps: no actual Electron process, target bootstrap execution, scope binding resolution or Windows runtime matrix was used.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
node node_modules/vitest/vitest.mjs run src/application/JavaScriptFileUrlPaths.test.ts src/domain/javascriptStaticPathResolution.test.ts src/application/JavaScriptApplicationService.test.ts— 82 passed.npm run check— all five tasks passed; 129 existing lint warnings, zero errors.npm run check:fast— both tasks passed.npm run build— passed.Compatibility, safety, and release
Review checklist
type(scope): outcome.AI assistance was used for investigation, implementation and test preparation. I reviewed the change and ran the reported native checks.
Hosted regression correction
Hosted shard 1 caught an existing inert-extraction assertion: the original patch decoded the target correctly but changed the explicit
./preload.mjsobservation spelling topreload.mjs. Signed amendment2ff18c7b905cb01a444e587582b58ce9ee4e7743preserves that established spelling after decoding. The existing assertion is unchanged.The actual failing suite reproduced locally (1 failure / 27 passes); afterward all 110 related tests pass, including the original suite and parent-directory / normalized-path URL controls. Exact-head
check(5 tasks),check:fast(2 tasks), build, and all four native Node/public application caller cases pass. Lint retains 129 existing warnings and zero errors. The failed coverage job was downstream of the failing shard. Hosted checks on the amended head are pending; no full matrix success is claimed.