Skip to content

fix(typescript-zod): validate date and time formats - #3505

Open
schani wants to merge 3 commits into
masterfrom
agent/zod-date-time-validation-v2
Open

fix(typescript-zod): validate date and time formats#3505
schani wants to merge 3 commits into
masterfrom
agent/zod-date-time-validation-v2

Conversation

@schani

@schani schani commented Sep 7, 2026

Copy link
Copy Markdown
Member

Zod emitted plain strings for JSON Schema date and time, while its coercing date-time schema accepted invalid values. Validate calendar dates, time ranges, and date-time shape before conversion.

Each required codec is emitted once and reused. Unused codecs are omitted from generated output.

Introduces shared invalid date/time cases 5 and 6. The 26-production-line exception was explicitly approved.

Validation: build; lint; TypeScript Zod fixtures 145/145.

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch from cb5dca6 to 8ea1d93 Compare September 7, 2026 14:16
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
267 changed lines — +140 / −127

Open the generated-output report →

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch from 8ea1d93 to 8f1a07a Compare September 7, 2026 14:23
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
267 changed lines — +140 / −127

Open the generated-output report →

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
267 changed lines — +140 / −127

Open the generated-output report →

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch 2 times, most recently from 7876d0b to a8cf6b3 Compare September 7, 2026 15:20
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
267 changed lines — +140 / −127

Open the generated-output report →

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch from a8cf6b3 to 2399eed Compare September 7, 2026 15:25
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
267 changed lines — +140 / −127

Open the generated-output report →

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch from 2399eed to d328bcc Compare September 7, 2026 17:52
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
267 changed lines — +140 / −127

Open the generated-output report →

Base automatically changed from agent/zod-date-time-formats to master September 8, 2026 01:43
@schani

schani commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

This shouldn't repeat the whole long zod codec for every single instance in the file. Instead, if the codec is needed, it should be defined once and then used.

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch from d328bcc to 31267ac Compare September 8, 2026 02:44
@schani

schani commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Fixed in 31267ac. Each required codec is now emitted once and reused; unused codecs are omitted. The emission unit covers single definitions, multiple references, and absence.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
367 changed lines — +240 / −127

Open the generated-output report →

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Generated-output differences

67 files differ — 67 modified, 0 new, 0 deleted
367 changed lines — +240 / −127

Open the generated-output report →

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