Skip to content

Connection Foundation and Parser Refactoring #9452

@tobiu

Description

@tobiu

Goal

Establish the Neo.data.connection.Base hierarchy and fix the abstraction leak in Neo.data.parser.Stream by extracting its network transport logic.

Context

A Parser should strictly focus on deserialization and shaping data (e.g., converting a text stream into JSON records). Currently, Neo.data.parser.Stream has fetch() and AbortController logic hardcoded into its read() method. This makes it a Connection in disguise and violates the single responsibility principle.

Acceptance Criteria

  • Create src/data/connection/Base.mjs.
  • Refactor Neo.data.connection.Fetch and Xhr to extend this new Base class.
  • Create a new Connection (e.g., connection.Stream or enhance connection.Fetch) that handles the fetch() request and returns the ReadableStream.
  • Refactor Neo.data.parser.Stream: Remove the fetch() call. The parser should now accept the ReadableStream provided by the Connection, process the NDJSON/JSONL chunks, and yield records.
  • Ensure the Pipeline class correctly routes the output of the Connection into the Parser.

Metadata

Metadata

Assignees

Labels

aiarchitectureArchitecture related issuescoreCore framework functionalityenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions