Skip to content

feat(cli): zod-validate JSONL rows in colony import#35

Merged
NagyVikt merged 1 commit intomainfrom
agent/claude/export-import-validate-2026-04-24-10-58
Apr 24, 2026
Merged

feat(cli): zod-validate JSONL rows in colony import#35
NagyVikt merged 1 commit intomainfrom
agent/claude/export-import-validate-2026-04-24-10-58

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

The import command used to JSON.parse each line and feed the fields
through String() / Number() into Storage. Malformed exports became
silent corruption: sessions with string timestamps were stored as NaN,
missing fields became the literal "undefined" string, and an
unrecognized row type was silently skipped.

Parse each row with a discriminated-union zod schema and fail with
`<file>:<line>: <field>: <message>` on any mismatch. Export schema is
now exported from the command module for direct testing.
@NagyVikt NagyVikt merged commit 74b2a7c into main Apr 24, 2026
@NagyVikt NagyVikt deleted the agent/claude/export-import-validate-2026-04-24-10-58 branch April 24, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant