CI: canonical codec enum + normalization + placeholder-sentinel lint (#180) - #182
Open
ch-bas wants to merge 1 commit into
Open
CI: canonical codec enum + normalization + placeholder-sentinel lint (#180)#182ch-bas wants to merge 1 commit into
ch-bas wants to merge 1 commit into
Conversation
#180) Schema: - add a codec `enum` to both `video.codecs[]` and `video.streams[].codec`: H.264, H.264+, H.265, H.265+, MJPEG, JPEG, AV1, Ultra265, MPEG-4. Ajv now rejects any drift on new cameras automatically. Data (one-time normalization, 114 files): - h264 / H264 / H.264H / H.264B / "Smart H.264" -> H.264 - "Smart H.264+" -> H.264+; "Smart H.265"/"Smart 265" -> H.265; "Smart H.265+" -> H.265+ - M-JPEG -> MJPEG; per-stream "H.264/H.265" -> H.265 (primary) - dedupe codecs[] after folding build.js: - placeholder/sentinel guard: fail validation on min_lux/min_lux_color/weight_g === 0 (the "0 lux, IR on" trap that once required stripping 15 entries by hand).
This was referenced Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #180.
Makes
codeca validated, canonical field and adds a guard against semantically-invalid placeholder values.Schema
enumto bothvideo.codecs[]andvideo.streams[].codec:H.264, H.264+, H.265, H.265+, MJPEG, JPEG, AV1, Ultra265, MPEG-4.Data normalization (114 files, one-time)
The
codecs[]list had drifted across brands. Folded to the enum:h264,H264,H.264H,H.264B,Smart H.264H.264Smart H.264+H.264+Smart H.265,Smart 265H.265Smart H.265+H.265+M-JPEGMJPEGH.264/H.265H.265(primary)codecs[]is de-duplicated after folding. Kept as genuinely-distinct real codecs:AV1,Ultra265(Uniview),MPEG-4,JPEG.Placeholder-sentinel lint (
build.js)Fails validation on known bad-data sentinels — extendable list, currently:
night_vision.min_lux === 0/min_lux_color === 0— the "0 lux, IR on" figure, which is not the ambient sensitivity the field represents (this once required stripping 15 entries by hand).weight_g === 0Verification
node scripts/build.js→ builds 2,618 cameras clean.h264/Smart 265on both fields; the sentinel lint fails the build onmin_lux: 0.