Files
karaoke-gen/tests
Andrew Beveridge ☄️andClaude Opus 5.5 621077474e feat(tenant): track code prefixes every delivered file + CDG title shrinks unbreakable words (v0.273.1) (#1158)
## Summary
Follow-up to #1153 and #1157, found by running a real Vocal Star job
through the portal in prod (job `8dc6945f`, E2E with track code
`E2E1531717`, which passed).

1. **Track code on every file.** #1153 put the tenant's code on the
Dropbox **folder** (`VS6588 - Artist - Title/`), but the files inside
were still `Artist - Title (…)`. Matt's April 2025 ask was the VS code
at the start of **each file**, and Andrew had confirmed "all files
prefixed with the track code".
- Tenant jobs with their own code now get `VS6588 - Artist - Title (…)`
on every Dropbox file.
- The entries inside the CDG/TXT zips are renamed too, so each CDG+MP3
pair still matches.
- Nomad's own `keep_brand_code` flows (finalise-only, re-render) are
unchanged, because this requires `tenant_id`.
2. **CDG title card:** a single word wider than the screen can't wrap,
so the card now shrinks the font instead of clipping it. Seen on the
first real prod render, where the E2E title has a 24-character timestamp
token.

## Changes
- `dropbox_service.upload_folder(filename_prefix=…)`.
- `prefix_zip_entries()` streams entries and keeps their
timestamps/compression, so a repack is deterministic.
  - `skip_unchanged` also works for repacked zips.
- `tenant_track_code_prefix(job)` is set into
`OrchestratorConfig.output_filename_prefix`. Tenant-only, and the code
is sanitized again before use.
- cdgmaker composer: width check in the title-card shrink loop.
- Version 0.273.0 → 0.273.1.

## Testing
- Prefixed upload, including zip entries and subfolders.
- No-prefix path unchanged.
- Deterministic, streamed repack.
- Tenant-only prefix, with sanitization.
- Real-render test for the unbreakable word.
- Package unit tests: 2054 passed. Backend: 6066 passed (emulator tests
excluded locally).
- CodeRabbit: 3 cycles, all findings fixed.

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Gp5fBmsmWJxgkEHb4JfhXR

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:52:35 -04:00
..