feat(char): centralize default playback content to .env (CHAR_CONTENT)#846
Merged
Conversation
Root-cause fix for the dead-clip bug: the default content was hardcoded
in ~25 places, one of them an invalid name (insane_new_p200_h264, 404)
that silently fell back to bucks_bunny on-device. There was no single
source of truth.
Now there is one: CHAR_CONTENT in .env (the Makefile already
-includes + exports it). All consumers resolve through
sweep.ContentOrDefault: an explicit spec content: wins, else
CHAR_CONTENT, else a valid built-in default (insane_newer_p200_h264) so
an unset value can never 404.
- sweep/seed.go: SeedContent const → ContentOrDefault("") (env-driven).
- cmd/harness/char.go: both matrix clip-resolution sites use
ContentOrDefault(e.Content).
- qe-offhours.sh: QE_CONTENT → CHAR_CONTENT → valid default.
- .env.example: document CHAR_CONTENT as the single source.
- matrices: drop the hardcoded content: from all 24 specs (they used
the default clip) so they inherit; pin content: only to override.
- TEST-PLAN.md: content is now optional (inherit from CHAR_CONTENT).
Verified: harness builds, sweep + charmatrix tests pass, stripped
matrices dry-run clean and resolve to the built-in default.
Follow-up (separate, app-side): make the player LOUD when a requested
clip 404s instead of silently substituting the first catalogue entry —
that silent fallback is what hid the typo (HomeScreen.swift:211).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Make the default characterization/sweep playback clip come from one place —
CHAR_CONTENTin.env— instead of being hardcoded in ~25 spots.Why
insane_new_p200_h264was hardcoded across ~12 matrices, the sweep seed constant, andqe-offhours.sh— and it's a dead clip (404). The iOS app silently substitutes the first catalogue entry (bucks_bunny) for an unknown clip, so the typo never errored; runs just measured the wrong content. Root cause: no single source of truth for the default.How
All consumers resolve through
sweep.ContentOrDefault: explicit speccontent:→CHAR_CONTENT(.env, already-included +exported by the Makefile) → a valid built-in default (insane_newer_p200_h264), so an unset value can never 404.sweep/seed.go:SeedContentconst → env-drivenContentOrDefault("").cmd/harness/char.go: both matrix clip-resolution sites use it.qe-offhours.sh:QE_CONTENT → CHAR_CONTENT → default..env.example: documentsCHAR_CONTENTas the single source.content:from all 24 specs (they all used the default clip) so they inherit; pincontent:only to override.TEST-PLAN.md:contentis now optional.Verified
make harness-clibuilds;go test ./internal/sweep ./internal/charmatrixpass; stripped matrices dry-run clean and resolve to the built-in default (no "no content" error).Follow-up (separate PR)
The deeper bug is the silent app substitution (
HomeScreen.swift:211) — making the player loud about a 404'd clip is an iOS change worth its own issue.🤖 Generated with Claude Code