Skip to content

feat: add streaming rehydrator flush() for clean shutdown #24

Description

@byapparov

Context

PR #23 review flagged that createStreamingRehydrator() holds incomplete lines in SSE mode but doesn't expose a flush() mechanism — could orphan buffered data on stream close.

Location: src/vault/token-vault.ts:140-146

Proposal

Add explicit finalize() or flush() method to the streaming rehydrator closure that releases any buffered content on stream end.

Priority

Low — current code works correctly for normal stream termination since data: [DONE] is always on its own line. Only affects abnormal disconnects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions