Skip to content

fix(db): one-time cue reset (db/34) — retire pre-v3.3.1 truncating cue points - #439

Merged
genwave-radio merged 1 commit into
mainfrom
fix/gh-424-cue-remeasure-migration
Aug 9, 2026
Merged

fix(db): one-time cue reset (db/34) — retire pre-v3.3.1 truncating cue points#439
genwave-radio merged 1 commit into
mainfrom
fix/gh-424-cue-remeasure-migration

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

The gh-#424 rollout gap, closed with zero operator action: persisted cue rows (music enrichment + authored imaging) measured before v3.3.1 can carry a mid-file cue_out — Dean heard 'Apologies - TriFace' clip at a pause today. Rather than every operator running a manual bulk cue re-enrich, db/34 does it once at deploy.

🔧 Mechanics

  • Nulls cue_in_sec/cue_out_sec/cue_analyzed_at on every already-analyzed library.media row. Instantly curative — NULL cue = full-file playback (blank.eat backstops untrimmed tails) — then the F13 backfill predicate re-measures everything with the fixed analyzer at the worker's 50/tick pace.
  • One-time, not merely idempotent: a bare UPDATE would re-null fresh measurements on every future deploy. New library.one_time_fix marker table (claim-CTE guards the UPDATE); reusable for later data-shaped fixes until the real migration runner (gh-P2.3: Migration runner adoption (DbUp/grate) with bash scripts as baseline #12).

✅ Verification (real postgres:16.4 + the real 01-library.sh schema)

  • Run 1: analyzed rows nulled, never-analyzed row untouched, marker claimed.
  • Simulated worker re-measure (cue_out=9.9) → run 2 is a proven no-op (9.9 survives).
  • Runs under migrate.sh semantics (env-guarded, ON_ERROR_STOP, idempotent DDL — the NOTICE on re-run is the IF NOT EXISTS skip).

Ride this into v3.3.2 — on merge I'll tag and run the release train.

…e points

Every cue measured before the gh-#424 analyzer fix can carry a mid-file
cue_out. Nulling cue columns is instantly curative (NULL = full-file
playback) and the F13 backfill predicate re-measures every row with the
fixed analyzer. Marker-guarded via library.one_time_fix so re-runs never
clobber fresh measurements — zero operator action needed (no manual bulk
re-enrich).
@genwave-radio
genwave-radio merged commit cbdb64d into main Aug 9, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the fix/gh-424-cue-remeasure-migration branch August 9, 2026 18:59
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant