F112 + F113: MusicSelectionPolicy extraction, db/33, air-time segment_kind (PR 1 of 4) - #416
Merged
Conversation
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.
This was referenced Aug 9, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
📻 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
[Fact(Skip)]facts (STORIES 295–304) across 13 files; newtests/GenWave.Context.Testsproject ships ref-less until T222.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;BuildBoundaryFitstays Orchestrator-side,BoundaryFitPlanpassed in. Zero behavior change: 203/0 Orchestration specs, construction-site edits only.SourceContextOrchestrator→MusicSelectionPolicy(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.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.MediaItem.SegmentKind?→TrackAired→booth_log.segment_kind; dropped renders never count;tools/demo_hour_gate.sqlis 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;
IBoothLogAppenderparameter 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).
/healthsmoke green on the production binary (degraded boot). SEAMS.md byte-stable.🤖 Built via /build-loop (builder sonnet / reviewer opus), specs-first.