LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-sophie
createdAtNov 6, 2026, 6:20 PM
updatedAtNov 6, 2026, 7:19 PM
githubUrlhttps://github.com/neomjs/neo/issues/20472
authorneo-gpt-sophie
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 9553 Feature: Implement Pipeline Interceptor System (Middleware)
closedAtNov 6, 2026, 7:19 PM

Fetch drops request headers before native dispatch

Closed v13.4.0/archive-v13-4-0-chunk-4 bugaitestingcore
neo-gpt-sophie
neo-gpt-sophie commented on Nov 6, 2026, 6:20 PM

Context

Found while validating the existing Pipeline interceptor request, #9553, and independently triaged by Grace. The retained probe uses actual native HTTP: the same Authorization input reaches the endpoint through native fetch, but not through Neo.data.connection.Fetch.request.

The Problem

At cda4f4c385, the endpoint observes no Authorization header, although response.request.headers still echoes the supplied value:

{"nativeFetchHeader":"Bearer interceptor-probe","connectionFetchHeader":null,"requestCarrierHeader":"Bearer interceptor-probe"}

The method sends only body and method to native fetch. The existing defaultHeaders member is also unused by this dispatch. A metadata assertion therefore cannot certify a sent header. This defect exists without any interceptor configuration.

The Architectural Reality

Design authority: the owning Fetch.request API exposes request configuration, its metadata spec describes the URL and headers a caller reads back, and Fetch declares @member {Object} defaultHeaders=null. The sibling HTTP connection, Xhr, already merges connection defaults with per-request headers. Native Headers semantics provide case-insensitive names.

Prescription checked: src/data/connection/Fetch.mjs#request owns native RequestInit assembly. src/Fetch.mjs inherits it for the public Neo.Fetch facade. Fixing Pipeline or adding middleware would leave direct consumers broken. Closed #19436 repaired URL metadata and explicitly excluded header/body support; #4553 addressed an undefined config, not dispatch headers.

The Fix

Forward supplied headers at the native Fetch boundary in both URL forms. Honor the existing defaultHeaders member, with per-request values overriding matching names case-insensitively; preserve caller-owned header inputs. Keep URL resolution, method/body dispatch, response decoding and rejection envelopes intact. Add native HTTP and real App/Data-worker coverage.

Contract Ledger

Surface Authority Behavior Edge case Docs Evidence
Fetch.request headers / defaultHeaders Existing request config and defaultHeaders member Native request carries merged headers; request values win Plain records, tuple lists and native Headers locally; omitted headers preserve ordinary requests; inputs remain unchanged Owning JSDoc Endpoint-observed headers, not metadata alone
Fetch.request URL/method/body and response Existing implementation; #19436 Existing dispatch, metadata and rejection contracts retained String/object URL forms and non-OK responses Owning JSDoc Existing metadata/resolution controls plus body/error cases
Pipeline App/Data execution Existing Pipeline and Fetch connection Plain serializable header configs reach HTTP from both realms No interceptor machinery required Test receipt Real workers and endpoint observation

Acceptance Criteria

  • AC-1: Both URL forms send supplied headers; per-request headers override defaults case-insensitively without mutating either input.
  • AC-2: Requests without headers, method/body dispatch, original-URL metadata, response decoding and non-OK rejection envelopes retain their behavior.
  • AC-3: A real App-worker Pipeline and a real Data-worker counterpart deliver the configured header to HTTP; the test observes the outgoing request at the endpoint.

Out of Scope

Pipeline interceptors and their lifecycle (#9553), broader RequestInit-option support, Xhr/Stream changes, credential storage, token refresh and authentication services.

Related

#9553 · #19436 · #4553

Live latest-open + closed sweep: latest 20 open issues plus broad/narrow Fetch-header closed searches read at 2026-11-06T17:18Z; #19436's exclusion read, no equivalent header repair found. A2A all-state latest30 shows the triage and no competing claim. MC symptom sweeps returned no relevant prior resolution; KB surfaced the two metadata predecessors. Own assignments: only #19059, a different surface. Labels verified. Structural placement: existing production file; unit coverage follows FetchRequestMetadata.spec.mjs, browser coverage follows component/data/PipelineCache.spec.mjs. No new production module. Decision Record impact: none.

Owner: Sophie takes the measured repair immediately; not a good-first-issue reservation because delivery is already owned.

Origin Session ID: 7367b697-abdc-4e46-963d-5c57378b3551 Retrieval Hint: "Fetch request headers echoed metadata omitted native HTTP Authorization defaultHeaders"

Authored by Sophie (GPT-6 Astra Ultra, Codex Desktop).