Skip to content

F112 + F113: MusicSelectionPolicy extraction, db/33, air-time segment_kind (PR 1 of 4) - #416

Merged
genwave-radio merged 4 commits into
mainfrom
feat/f112-extraction
Aug 9, 2026
Merged

F112 + F113: MusicSelectionPolicy extraction, db/33, air-time segment_kind (PR 1 of 4)#416
genwave-radio merged 4 commits into
mainfrom
feat/f112-extraction

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

📻 A station, not a playlist — PR 1 of the ruled four (T218–T220 + the epic's spec scaffold)

Epic: project #3, explored/designed/planned 2026-08-08 (SPEC F107–F114). This PR is the pre-churn foundation: the extraction ruled at the 08-07 governance session (gh-#401), the db/33 schema, and the demo-hour instrument (F113).

Commits

  • Spec scaffold — 68 pending [Fact(Skip)] facts (STORIES 295–304) across 13 files; new tests/GenWave.Context.Tests project ships ref-less until T222.
  • T218 MusicSelectionPolicy (closes the build half of gh-orchestration: extract MusicSelectionPolicy — the pick pipeline leaves the Orchestrator before project #3's cycle opens #401) — the pick ladder moves verbatim out of the 1,570-line Orchestrator; BuildBoundaryFit stays Orchestrator-side, BoundaryFitPlan passed in. Zero behavior change: 203/0 Orchestration specs, construction-site edits only.
    • ⚠️ Loki note (review F1): eight moved log lines change SourceContext OrchestratorMusicSelectionPolicy (request-fulfilment INFO, 4 ladder WARNs, trust-but-verify WARN, 2 rung-fault WARNs, per-pick DEBUG). Templates/levels/properties unchanged — only a query pinned to the old SourceContext would miss lines.
  • T219 db/33 — station.show (dormant until the F114 slice), segment_schedule.show_id, booth_log.segment_kind; fresh-init and upgrade paths pg_dump-byte-identical; Story242 drift detector extended, still reds on every drift direction.
  • T220 air-time stamp — MediaItem.SegmentKind?TrackAiredbooth_log.segment_kind; dropped renders never count; tools/demo_hour_gate.sql is the F113.2 gate, executed + mutation-proven by specs.

Review gate

Each task passed builder→reviewer (opus) with re-review on findings; T219/T220 failed round one and were fixed (order-dependent specs, a run command that resolved container-side, a grep-theater fact — all now proven by execution). Carry-forwards recorded: logging delegate → named interface at T234; IBoothLogAppender parameter object; booth-log spec-harness dedup.

Evidence

Full sln 0W/0E; 7 test projects green (660 MediaLibrary / 1563 Host / 203 Orchestration / 414 Tts / 140 Core / 81 Architecture; Context all-skipped by design). /health smoke green on the production binary (degraded boot). SEAMS.md byte-stable.

🤖 Built via /build-loop (builder sonnet / reviewer opus), specs-first.

68 pending facts across 13 files scaffolding T218-T237 (SPEC F107-F113).
New tests/GenWave.Context.Tests project (7th) ships ref-less until T222
births src/GenWave.Context; every spec is [Fact(Skip)] + comment body so
the solution builds green (0/0) before any implementation exists.
…ves the Orchestrator (T218, STORY-295)

The pick ladder (request rung, persona rung, trust-but-verify, degradation
ladder, boundary resample) moves verbatim to MusicSelectionPolicy;
BuildBoundaryFit stays Orchestrator-side, BoundaryFitPlan passed in.
Boundary-fit-outcome logging threads back via delegate so the shared
Information sink is byte-identical (review F2: convert to a named
interface as T234's first move). Eight moved log lines change
SourceContext Orchestrator→MusicSelectionPolicy; templates, levels, and
properties unchanged. Zero behavior change: 203/0 Orchestration specs,
construction-site edits only; full sln 0W/0E; /health smoke green on the
production binary.
…egment_kind (T219, STORY-304)

The F113 air-time-stamp column plus the F114 show schema (ruled at
/design; station.show stays dormant until the dayparting slice).
Idempotent in-place upgrade + db/06 fresh-init mirrors; pg_dump proves
both paths byte-identical. Story304 pins fresh-init AND in-place db/33
DDL (Story030's two-scenario shape); Story242's drift detector chains
db/33 after db/27 and still reds on every drift direction.
…le (T220, STORY-304)

MediaItem.SegmentKind? (null = music) rides TrackAired's observed-advance
publish into booth_log.segment_kind; patter-aired keeps its render-time
meaning, so a budget-dropped render never counts. Music rows NULL by
construction (ToMediaItem never sets kind). tools/demo_hour_gate.sql is
the F113.2 close-out instrument — executed (not grepped) by three specs,
mutation-proven against the kind predicate, the ContextSegment conjunct,
and the music/kinded partition. Read path/API/UI untouched (F113.3).

Carry-forwards (review): IBoothLogAppender 8-param positional call wants
a Core-side parameter object; Story215/Story304 booth-log spec harness
duplication wants a shared Support helper.
@genwave-radio
genwave-radio merged commit 868a619 into main Aug 9, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the feat/f112-extraction branch August 9, 2026 14:22
@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