[PR #1045] [MERGED] fix(javascript): recognize digits in artifact URI schemes #2604

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1045
Author: @ac1982
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/artifact-uri-scheme-digits


📝 Commits (1)

  • 0a010be fix(javascript): recognize digits in artifact URI schemes

📊 Changes

4 files changed (+47 additions, -1 deletions)

View changed files

📝 docs/javascript-artifact-reconstruction.md (+5 -0)
📝 src/application/javascript/JavaScriptArtifactPathResolution.test.ts (+36 -0)
📝 src/domain/artifactPathSyntax.test.ts (+5 -0)
📝 src/domain/artifactPathSyntax.ts (+1 -1)

📄 Description

Summary

Fixes #1038. Recognize digits after the first character of URI schemes, so web3:app.js is classified as external rather than resolved to a same-named local artifact.

Problem and expected behavior

The scheme expression omitted digits, although RFC 3986 §3.1 permits them after the initial letter. HTML and URL references could therefore resolve to local inventory entries; a digit-bearing external HTML base had the same problem.

Change and scope

Add 0-9 to the existing scheme character class. Add domain and resolver regressions for HTML, module, URL, and base-href contexts, including matching local files. Document the classification; explicit relative paths remain local.

Contract and boundary impact

  • Semantic owner and earliest changed stage: domain artifact URI classification, consumed by JavaScript path resolution.
  • CLI and MCP/tool-catalog contract: no schema or tool changes.
  • Provider, bridge, target-format, or platform compatibility: no provider changes.
  • Evidence, artifact, provenance, or reconstruction contract: scheme-qualified references no longer acquire erroneous local resolutions; original paths and inventory remain preserved.
  • Process execution, authorization, cleanup, or containment impact: none.
  • Generated metadata, package, or installation impact: none.

Evidence and regression coverage

  • Tests updated: existing domain syntax and application path-resolution suites.

  • Base reproduction: 4 failed / 33 passed with the original expression; 37 passed after the fix. Module classification is a passing control.

  • Built CLI smoke: analyze-javascript-application <temporary-directory> --json with <script src="web3:app.js"></script> and a same-named local file exited 0; the local file remained inventoried, without a script-reference edge to it.

  • Remaining proof gaps: no live browser, Hopper/Ghidra, or non-Linux execution; this is static path classification.

  • 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 24.18.0 / npm 11.16.0, Linux arm64.

  • npm run test:focused -- src/domain/artifactPathSyntax.test.ts src/application/javascript/JavaScriptArtifactPathResolution.test.ts — 37 passed.
  • npm run check — all six tasks passed.
  • npm run build:cached — passed.
  • Built CLI smoke described above — exit 0.

Compatibility, safety, and release

No migrations, release metadata, process, or authentication changes. Real provider workflows were not run because provider behavior is unchanged. Reviewed the original reference and local-file distinction.

Review checklist

  • One focused outcome; conventional title.
  • Related issue linked.
  • Tests cover observable behavior and meaningful non-scheme controls.
  • Owning documentation updated; generated contracts unchanged.
  • Representative CLI behavior reported above.
  • Final diff checked for secrets, unrelated cleanup, and unsupported claims.

Prepared with OpenAI Codex assistance.


🔄 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/1045 **Author:** [@ac1982](https://github.com/ac1982) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/artifact-uri-scheme-digits` --- ### 📝 Commits (1) - [`0a010be`](https://github.com/morluto/rea/commit/0a010becb9a649b8f385631a53db1695c62bc032) fix(javascript): recognize digits in artifact URI schemes ### 📊 Changes **4 files changed** (+47 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/javascript-artifact-reconstruction.md` (+5 -0) 📝 `src/application/javascript/JavaScriptArtifactPathResolution.test.ts` (+36 -0) 📝 `src/domain/artifactPathSyntax.test.ts` (+5 -0) 📝 `src/domain/artifactPathSyntax.ts` (+1 -1) </details> ### 📄 Description ## Summary Fixes #1038. Recognize digits after the first character of URI schemes, so `web3:app.js` is classified as external rather than resolved to a same-named local artifact. ## Problem and expected behavior The scheme expression omitted digits, although [RFC 3986 §3.1](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) permits them after the initial letter. HTML and URL references could therefore resolve to local inventory entries; a digit-bearing external HTML base had the same problem. ## Change and scope Add `0-9` to the existing scheme character class. Add domain and resolver regressions for HTML, module, URL, and base-href contexts, including matching local files. Document the classification; explicit relative paths remain local. ## Contract and boundary impact - Semantic owner and earliest changed stage: domain artifact URI classification, consumed by JavaScript path resolution. - CLI and MCP/tool-catalog contract: no schema or tool changes. - Provider, bridge, target-format, or platform compatibility: no provider changes. - Evidence, artifact, provenance, or reconstruction contract: scheme-qualified references no longer acquire erroneous local resolutions; original paths and inventory remain preserved. - Process execution, authorization, cleanup, or containment impact: none. - Generated metadata, package, or installation impact: none. ## Evidence and regression coverage - Tests updated: existing domain syntax and application path-resolution suites. - Base reproduction: 4 failed / 33 passed with the original expression; 37 passed after the fix. Module classification is a passing control. - Built CLI smoke: `analyze-javascript-application <temporary-directory> --json` with `<script src="web3:app.js"></script>` and a same-named local file exited 0; the local file remained inventoried, without a script-reference edge to it. - Remaining proof gaps: no live browser, Hopper/Ghidra, or non-Linux execution; this is static path classification. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Node 24.18.0 / npm 11.16.0, Linux arm64. - `npm run test:focused -- src/domain/artifactPathSyntax.test.ts src/application/javascript/JavaScriptArtifactPathResolution.test.ts` — 37 passed. - `npm run check` — all six tasks passed. - `npm run build:cached` — passed. - Built CLI smoke described above — exit 0. ## Compatibility, safety, and release No migrations, release metadata, process, or authentication changes. Real provider workflows were not run because provider behavior is unchanged. Reviewed the original reference and local-file distinction. ## Review checklist - [x] One focused outcome; conventional title. - [x] Related issue linked. - [x] Tests cover observable behavior and meaningful non-scheme controls. - [x] Owning documentation updated; generated contracts unchanged. - [x] Representative CLI behavior reported above. - [x] Final diff checked for secrets, unrelated cleanup, and unsupported claims. Prepared with OpenAI Codex assistance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:08:06 +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#2604
No description provided.