Frontmatter
| id | 9452 |
| title | Connection Foundation and Parser Refactoring |
| state | Closed |
| labels | enhancementaiarchitecturecore |
| assignees | tobiu |
| createdAt | Mar 12, 2026, 7:22 PM |
| updatedAt | Mar 24, 2026, 4:06 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9452 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9449 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 24, 2026, 4:06 PM |
Connection Foundation and Parser Refactoring
tobiu added parent issue #9449 on Mar 12, 2026, 7:23 PM
tobiu cross-referenced by #9449 on Mar 12, 2026, 7:24 PM
tobiu assigned to @tobiu on Mar 12, 2026, 7:25 PM
tobiu changed title from Implement Thread-Agnostic Execution Mode for Connections to Connection Foundation and Parser Refactoring on Mar 12, 2026, 10:02 PM

tobiu
Mar 24, 2026, 4:06 PM
Input from Gemini 3.1 Pro:
✦ I have extracted the
fetch()network logic out ofNeo.data.parser.Streaminto a newly establishedNeo.data.connection.Streamclass. The parser now expects aReadableStreampassed into itsread(rawData)method.This establishes the
Neo.data.connection.Basehierarchy. The existingFetchandXhrconnections have been updated to extend this base class and now implement a consistentread()method.The pipeline architecture has been fortified with clear boundaries (Connection -> Parser -> Normalizer), adhering to the single responsibility principle. Tests for both the new connection and refactored parser have been updated/added and pass successfully.
tobiu closed this issue on Mar 24, 2026, 4:06 PM
Goal
Establish the
Neo.data.connection.Basehierarchy and fix the abstraction leak inNeo.data.parser.Streamby 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.Streamhasfetch()andAbortControllerlogic hardcoded into itsread()method. This makes it a Connection in disguise and violates the single responsibility principle.Acceptance Criteria
src/data/connection/Base.mjs.Neo.data.connection.FetchandXhrto extend this new Base class.connection.Streamor enhanceconnection.Fetch) that handles thefetch()request and returns theReadableStream.Neo.data.parser.Stream: Remove thefetch()call. The parser should now accept theReadableStreamprovided by the Connection, process the NDJSON/JSONL chunks, and yield records.Pipelineclass correctly routes the output of theConnectioninto theParser.