[PR #2091] [MERGED] fix: honor empty URL query and fragment markers #5019

Closed
opened 2026-10-31 00:58:14 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2091
Author: @fisforfaheem
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @baron

Base: main ← Head: fix/empty-url-query-fragment


📝 Commits (1)

  • eda5e35 fix: honor empty URL query and fragment markers

📊 Changes

10 files changed (+62 additions, -14 deletions)

View changed files

📝 src/browser/CdpEndpoint.ts (+2 -2)
📝 src/domain/browserObservation.test.ts (+4 -0)
📝 src/domain/browserObservation.ts (+4 -4)
📝 src/domain/javascript/javascriptRuntimeReconciliationSchemas.ts (+2 -2)
➕ src/domain/urlComponents.test.ts (+22 -0)
➕ src/domain/urlComponents.ts (+7 -0)
📝 src/domain/webScriptExportPlan.ts (+2 -3)
📝 src/inspector/V8InspectorEndpoint.ts (+2 -2)
➕ src/jeb/JebMcpEndpoint.test.ts (+15 -0)
📝 src/jeb/JebMcpEndpoint.ts (+2 -1)

📄 Description

Summary

  • URL.search and URL.hash are empty both when a query or fragment is absent and when it is explicitly empty, so checks that used those fields accepted URLs such as http://127.0.0.1:9222/? and http://127.0.0.1:8425/mcp#.
  • Share one spelling check, urlDeclaresQueryOrFragment, and use it for browser origins and CDP endpoints, CDP and V8 inspector sockets, JEB MCP endpoints, runtime URL prefixes, and captured script export paths (the case fixed in #2074).

Test plan

  • npm run test:focused -- src/domain/urlComponents.test.ts src/domain/browserObservation.test.ts src/domain/webScriptExportPlan.test.ts src/jeb/JebMcpEndpoint.test.ts
  • oxlint, oxfmt --check, and scripts/verify-module-boundaries.mjs on the touched files
  • Confirm a CDP or V8 inspector report whose websocket URL ends in ? or # is rejected as an invalid endpoint

Made with Cursor


🔄 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/2091 **Author:** [@fisforfaheem](https://github.com/fisforfaheem) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@baron](https://github.com/baron) **Base:** `main` ← **Head:** `fix/empty-url-query-fragment` --- ### 📝 Commits (1) - [`eda5e35`](https://github.com/morluto/rea/commit/eda5e35291d55bce3c492284536a0667cc97fbfd) fix: honor empty URL query and fragment markers ### 📊 Changes **10 files changed** (+62 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/browser/CdpEndpoint.ts` (+2 -2) 📝 `src/domain/browserObservation.test.ts` (+4 -0) 📝 `src/domain/browserObservation.ts` (+4 -4) 📝 `src/domain/javascript/javascriptRuntimeReconciliationSchemas.ts` (+2 -2) ➕ `src/domain/urlComponents.test.ts` (+22 -0) ➕ `src/domain/urlComponents.ts` (+7 -0) 📝 `src/domain/webScriptExportPlan.ts` (+2 -3) 📝 `src/inspector/V8InspectorEndpoint.ts` (+2 -2) ➕ `src/jeb/JebMcpEndpoint.test.ts` (+15 -0) 📝 `src/jeb/JebMcpEndpoint.ts` (+2 -1) </details> ### 📄 Description ## Summary - `URL.search` and `URL.hash` are empty both when a query or fragment is absent and when it is explicitly empty, so checks that used those fields accepted URLs such as `http://127.0.0.1:9222/?` and `http://127.0.0.1:8425/mcp#`. - Share one spelling check, `urlDeclaresQueryOrFragment`, and use it for browser origins and CDP endpoints, CDP and V8 inspector sockets, JEB MCP endpoints, runtime URL prefixes, and captured script export paths (the case fixed in #2074). ## Test plan - [x] `npm run test:focused -- src/domain/urlComponents.test.ts src/domain/browserObservation.test.ts src/domain/webScriptExportPlan.test.ts src/jeb/JebMcpEndpoint.test.ts` - [x] `oxlint`, `oxfmt --check`, and `scripts/verify-module-boundaries.mjs` on the touched files - [ ] Confirm a CDP or V8 inspector report whose websocket URL ends in `?` or `#` is rejected as an invalid endpoint Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:58:14 +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#5019
No description provided.