[PR #589] [MERGED] fix(javascript): respect HTML base URL components #2092

Closed
opened 2026-10-16 21:14:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/589
Author: @rudycelekli
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: campaign/rea-html-base-20261005


📝 Commits (3)

  • 9e3cca2 fix(javascript): respect HTML base URL components
  • 4d6d1f0 fix(javascript): resolve HTML base href dot segments and gate base syntax
  • 657a602 style: apply Prettier to the HTML base resolution changes

📊 Changes

2 files changed (+154 additions, -8 deletions)

View changed files

📝 src/application/JavaScriptArtifactPathResolution.ts (+43 -8)
➕ src/application/JavaScriptHtmlBaseResolution.test.ts (+111 -0)

📄 Description

Summary

Ignore query and fragment components before computing the document base directory. Honor external and protocol-relative bases for root-relative HTML references; preserve existing artifact confinement and container identity.

No tracking issue: this is a focused correctness regression found through production-seam reproduction.

Problem and expected behavior

Local relationship resolution follows the HTML base URL pathname and origin; artifact containment and container identity remain enforced.

Change and scope

The change stays in the owning adapter/application stage and corrects existing behavior without adding tools or broadening provider coverage.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Application HTML-reference path resolution, before local-artifact relationship selection.
  • CLI and MCP/tool-catalog contract: existing schemas and tool inventory remain intact; corrected results flow through the owning operation.
  • Provider, bridge, target-format, or platform compatibility: Source-owned filesystem and native URL controls ran; browser navigation was not used to claim runtime execution of references.
  • Evidence, artifact, provenance, or reconstruction contract: Local relationship resolution follows the HTML base URL pathname and origin; artifact containment and container identity remain enforced.
  • Process execution, authorization, cleanup, or containment impact: Existing execution authority, cleanup and containment remain preserved.
  • Generated metadata, package, or installation impact: no metadata or dependency changes.

Evidence and regression coverage

Five base-revision failures; 53 focused path-resolution tests pass. Native Node URL controls cover query/fragment and external/protocol-relative bases.

Tests exercise production parsing, filesystem, HTTP, or browser seams, without module mocks. Evidence above is executed; unverified platform/provider coverage is stated explicitly.

Validation performed

All required local gates passed on the signed commit:

  • npm run check:pr
  • npm run check:ci
  • npm run verify:package
  • npm pack --dry-run

Development runtime: Node.js 24.18.0 and npm 11.16.0. Upstream CI is separate from these local results.

Compatibility, safety, and release

No migration or package dependency changes. Real Hopper/Ghidra verification was not run; this patch does not change those providers. Remaining proof limits are stated above. The final diff contains source and tests only.

Prepared with AI 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/589 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `campaign/rea-html-base-20261005` --- ### 📝 Commits (3) - [`9e3cca2`](https://github.com/morluto/rea/commit/9e3cca2e5e48fdec6b4cf4e1bc7876a9256ed7cb) fix(javascript): respect HTML base URL components - [`4d6d1f0`](https://github.com/morluto/rea/commit/4d6d1f02931b8f8d018ca8f93e68cc4cf76f48dc) fix(javascript): resolve HTML base href dot segments and gate base syntax - [`657a602`](https://github.com/morluto/rea/commit/657a60249f78a5c32ca2fed348f3fab255967929) style: apply Prettier to the HTML base resolution changes ### 📊 Changes **2 files changed** (+154 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/application/JavaScriptArtifactPathResolution.ts` (+43 -8) ➕ `src/application/JavaScriptHtmlBaseResolution.test.ts` (+111 -0) </details> ### 📄 Description ## Summary Ignore query and fragment components before computing the document base directory. Honor external and protocol-relative bases for root-relative HTML references; preserve existing artifact confinement and container identity. No tracking issue: this is a focused correctness regression found through production-seam reproduction. ## Problem and expected behavior Local relationship resolution follows the HTML base URL pathname and origin; artifact containment and container identity remain enforced. ## Change and scope The change stays in the owning adapter/application stage and corrects existing behavior without adding tools or broadening provider coverage. ## Contract and boundary impact - Semantic owner and earliest changed stage: Application HTML-reference path resolution, before local-artifact relationship selection. - CLI and MCP/tool-catalog contract: existing schemas and tool inventory remain intact; corrected results flow through the owning operation. - Provider, bridge, target-format, or platform compatibility: Source-owned filesystem and native URL controls ran; browser navigation was not used to claim runtime execution of references. - Evidence, artifact, provenance, or reconstruction contract: Local relationship resolution follows the HTML base URL pathname and origin; artifact containment and container identity remain enforced. - Process execution, authorization, cleanup, or containment impact: Existing execution authority, cleanup and containment remain preserved. - Generated metadata, package, or installation impact: no metadata or dependency changes. ## Evidence and regression coverage Five base-revision failures; 53 focused path-resolution tests pass. Native Node URL controls cover query/fragment and external/protocol-relative bases. Tests exercise production parsing, filesystem, HTTP, or browser seams, without module mocks. Evidence above is executed; unverified platform/provider coverage is stated explicitly. ## Validation performed All required local gates passed on the signed commit: - `npm run check:pr` - `npm run check:ci` - `npm run verify:package` - `npm pack --dry-run` Development runtime: Node.js 24.18.0 and npm 11.16.0. Upstream CI is separate from these local results. ## Compatibility, safety, and release No migration or package dependency changes. Real Hopper/Ghidra verification was not run; this patch does not change those providers. Remaining proof limits are stated above. The final diff contains source and tests only. Prepared with AI assistance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:07 +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#2092
No description provided.