Skip to content

fix(check): allow missing caption overrides - #3716

Merged
miga-heygen merged 1 commit into
mainfrom
magi/fix-optional-caption-overrides
Sep 8, 2026
Merged

fix(check): allow missing caption overrides#3716
miga-heygen merged 1 commit into
mainfrom
magi/fix-optional-caption-overrides

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

Caption projects no longer fail check or deprecated validate when the optional root caption-overrides.json is absent. Only that exact resource's 404 and benign aborted fetch are ignored; a 500, another missing JSON file, or a malformed present sidecar remains an error.

The present-file contract is now explicit: the payload must be a JSON array whose entries are objects, and [] is the valid explicit no-op. Invalid JSON, a non-array root, or a non-object entry emits a runtime error that browser validation records instead of being silently ignored.

Related: #2263

Validation

  • Caption override runtime suite: 14/14 tests passed.
  • Validate and check-browser suites: 38/38 tests passed.
  • Core/runtime and CLI package typechecks passed.
  • Changed-file formatting, lint, and diff checks passed.

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: caption-overrides.json 404 correctly treated as silent no-op in both validate and checkBrowser. Payload validation added with proper error reporting. Tests cover missing sidecar, malformed JSON, non-array, and non-object entries. — Miga

@miga-heygen
miga-heygen enabled auto-merge (squash) September 8, 2026 18:09
@miga-heygen
miga-heygen merged commit 00c91d6 into main Sep 8, 2026
61 checks passed
@miga-heygen
miga-heygen deleted the magi/fix-optional-caption-overrides branch September 8, 2026 18:09
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.

2 participants