LearnNewsExamplesConnect
Frontmatter
assigneessloemo01
createdAtOct 6, 2026, 7:28 PM
updatedAtOct 10, 2026, 2:20 AM
githubUrlhttps://github.com/neomjs/neo/issues/19436
authorneo-gpt-euclid
commentsCount1
parentIssue19430
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 10, 2026, 2:20 AM

Fetch string-form request metadata is circular

neo-gpt-euclid
neo-gpt-euclid commented on Oct 6, 2026, 7:28 PM

Context

A string-form Fetch request produces circular request metadata. It was captured while implementing #19430 and independently triaged for promotion in the #19435 review. The URL-base fix is already approved; this ticket keeps the metadata repair separate.

The Problem

At 14907a2bf3, Fetch.request(url, config) assigns config.url = config. The returned response.request is that object, so response.request.url === response.request and JSON serialization throws. Object-form input for the same endpoint returns a string URL and serializes normally. A real Fetch instance with only native fetch stubbed confirmed identical dispatch and retained unrelated config keys in both forms. Native dispatch succeeds; the observed failure is metadata serialization.

The Architectural Reality

Design authority: Fetch.request supports Object|String URL forms in its owning JSDoc and exposes the supplied request config through response.request. The current object-form path retains config.url as a string; the string-form branch contradicts that shape.

Prescription checked: src/data/connection/Fetch.mjs#request owns both input normalization and the returned metadata. No worker, Store, Pipeline or URL-base selector is needed.

The Fix

Retain the original string URL in the supplied request config. Pin string/object-form metadata equivalence through the real Fetch API and its returned response; preserve native dispatch and the scoped URL resolver.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Fetch.request string input and response.request.url Owning JSDoc and existing object-form path The request URL remains the original string; request metadata serializes for ordinary serializable config Preserve unrelated supplied config fields, object-form input and native response fields; do not rewrite metadata to the resolved/redirected response URL Method JSDoc Real connection tests with native fetch stub

Acceptance Criteria

  • String-form metadata contains the original URL string and serializes without a cycle introduced by Fetch.
  • Equivalent object-form input retains its URL and unrelated config fields.
  • Native URL dispatch and returned response data/status behavior remain unchanged; a workspace-relative case retains #19430's resolver behavior.

Out of Scope

Caller-supplied circular objects; header/body support; Stream/Xhr metadata; bare-relative URL expansion; document-base selection.

Related

#19430 · #19435

Live latest-open sweep: latest 20 open Engine issues read immediately before creation; no equivalent. A2A all-state latest30 contains the observation/review triage, no competing claim. MC symptom sweep3 results found no prior decision. Own-assignment sweep3 open; only19430 touches connections, and its ledger is URL dispatch rather than metadata.

Decision Record impact: none. Structure map: N/A, localized Body connection repair with no new production file.

Origin Session ID: 01a110db-3db8-7c30-933e-883d691417d2 Retrieval Hint: "Fetch string-form response.request.url self-reference metadata JSON serialization"

unowned-rationale: queued after the approved workspace URL fix; no implementation is part of this capture/polish turn.

sloemo01
sloemo01 Oct 7, 2026, 6:05 PM

Claiming this. Read the code and the prescription holds: the string-form branch at Fetch.mjs:113 assigns the config to its own url (config.url = config), while the object-form branch keeps a string. I will write the metadata-equivalence arm red first, then fix the assignment.

tobiu assigned to @sloemo01 on Oct 7, 2026, 6:10 PM
sloemo01 cross-referenced by PR #19454 on Oct 7, 2026, 6:10 PM
sloemo01 referenced in commit 56e9ffd - "docs(data): state the request metadata contract in the method JSDoc (#19436)" on Oct 10, 2026, 1:45 AM
sloemo01 referenced in commit 0b28669 - "docs(data): state the request metadata contract in the method JSDoc (#19436) on Oct 10, 2026, 1:46 AM
tobiu referenced in commit 6acb770 - "fix(data): the Fetch string form keeps its original URL in the request metadata (#19436) (#19454) on Oct 10, 2026, 2:20 AM
tobiu closed this issue on Oct 10, 2026, 2:20 AM