Skip to content

Vanguard: Accept short codec names - #2

Merged
zpl-zak merged 1 commit into
mainfrom
vanguard/short-codec-names
Oct 30, 2026
Merged

zpl-zak merged 1 commit into
mainfrom
vanguard/short-codec-names

Conversation

@zpl-zak

@zpl-zak zpl-zak commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

nexrender job submit and batch submit rejected any settings.codec without a video_ or image_ prefix: codec "png" is missing its output prefix. The API does not need the prefix:

  • resolveCodec matches codecs by suffix, so png, h264_vbr_5mbps, prores_4444 and gif are all valid.
  • The OpenAPI spec embedded in the CLI uses short names in its own example: 'h264_vbr_15mbps', 'prores_422', 'png', 'jpeg'.
  • In a sample of production job requests, 142 of 284 codec values were short names (png 96, h264_vbr_5mbps 46).

The prefix rule in internal/validate is removed. Codec validation is left to the API, which rejects unknown codecs with the list of supported ones. The agent skill reference now says both forms work.

This repository only has main, so the PR targets it.

Found by Vanguard, the new end-to-end suite.

Testing

  • go test ./..., go vet ./..., go build ./cmd/nexrender, gofmt -l (clean), bash -n scripts/install.sh.
  • The old "short codec must fail" case is replaced by a test that accepts png, jpeg, h264_vbr_5mbps, prores_4444, gif, image_png and video_h264_vbr_15mbps.

The CLI rejected any codec without a video_ or image_ prefix, but the
API matches codecs by suffix and the OpenAPI spec itself gives short
examples (h264_vbr_15mbps, prores_422, png, jpeg). Production traffic
uses short names such as png and h264_vbr_5mbps, so those payloads could
not be submitted through the CLI.

The client-side prefix rule is gone. The API still rejects unknown
codecs and returns the supported list. The agent skill now documents
both forms.

Found by Vanguard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zpl-zak
zpl-zak merged commit d396755 into main Oct 30, 2026
2 checks passed
@zpl-zak
zpl-zak deleted the vanguard/short-codec-names branch October 30, 2026 07: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