Skip to content

fix: fail the lifecycle sync on malformed deprecation entries - #325

Merged
guillaumegay13 merged 1 commit into
mainfrom
feat/lifecycle-sync-schema-validation
Aug 21, 2026
Merged

fix: fail the lifecycle sync on malformed deprecation entries#325
guillaumegay13 merged 1 commit into
mainfrom
feat/lifecycle-sync-schema-validation

Conversation

@guillaumegay13

Copy link
Copy Markdown
Collaborator

What

src/sync/run.ts currently swallows deprecation entries that fail the modeldeprecations.dev schema: toLifecycleRecord returns undefined on a failed parse, and indexDeprecations skips it. If the source drifts (a new status value, a renamed shutdown_on), the daily sync becomes a silent no-op and this catalog's lifecycle fields go stale with no failure.

Change

  • indexDeprecations now returns { index, rejected }, where each rejection carries its zod reason.
  • run.ts logs each rejected entry + reason and exits non-zero when any exist, so the scheduled sync-lifecycle workflow fails loudly instead of opening a "no changes" run.
  • Updated tests/sync-status.test.ts for the new return shape and added a status-drift rejection case.

No behavior change when the source is well-formed (verified against the current payload: 393 entries, 0 rejected).

The sync silently dropped entries that failed the deprecation schema, so
schema drift on modeldeprecations.dev (e.g. a new status value) went
unnoticed. Report each rejected entry with its zod reason and exit
non-zero instead.
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modelparams.dev Ready Ready Preview Aug 21, 2026 10:25am

Request Review

@github-actions github-actions Bot added the site Website code or tooling label Aug 21, 2026
@guillaumegay13
guillaumegay13 merged commit 60fd9af into main Aug 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

site Website code or tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant