Registry Mirror
Skip to content

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

🧩 gh-#401 PR-3 — the break plan is a value; BreakPlanner decides the break (STORY-454, STORY-455)

Part of #401 (Orchestrator split) and #772. Behaviour-preserving: the Story452 characterisation replay stays frozen and green, and the dev-station histogram matches main.

What

  • 📦 T520 — plan types in GenWave.Orchestration/Plan (one type per file): BreakPlan, PlannedSlot, BreakContext, the closed SlotSource hierarchy (Render / Verbatim / Ready), Reservation, the DropPolicy hierarchy, SlotOutcome; BreakPlan.ToTrace() renders one line per slot (SPEC F187).
  • 🧠 T521 — BreakPlanner.PlanAsync(BreakContext): today's cadence steps and drain order moved verbatim out of the Orchestrator; named reservations for claimed slots; no tts / verbatim-renderer / copy-writer dependency (SPEC F188). Budgets read once per plan; side effects keep their order.
  • 🎬 T522 — the Orchestrator rides the plan: PlanAndRenderAsync builds the context, asks the planner, hands the plan to IBreakPlanObserver (NoOp by default), arms the handoff, then RenderPlanAsync (Orchestrator.Render.cs) kicks every slot and awaits in ordinal order against the plan's render budget — drop policies, WARN text and HandoffPieceDropped unchanged (SPEC F186.3/F186.4, F191.4). EnqueuePatterAsync and every Build*Request method are deleted (SPEC F188.5, proven by reflection). Orchestrator.cs 2687 → 1641 lines.
  • 🧊 Story452 replay gains a pinned Traces table (O1–O9) through a capturing observer; every other assertion is byte-identical to PR-1.
  • 🧾 SEAMS.md regenerated (122 seams).

Proof

kind main hour branch hour
track-started 42 43
patter-aired 29 30
↳ BackAnnounce / LeadIn / StationId 13 / 13 / 3 13 / 12 / 3

Same kind set on both; the count gap is one track boundary, the same gap PR-1 measured. Branch window 2026-09-18 23:17–00:17Z; api log clean (no drops, no WARNs beyond the usual boot lines). The station stays on the branch image.

Interim, removed later in the epic

  • The render loop lives on the Orchestrator until PR-6 (SPEC F190). Every kick now starts after the handoff arm rather than before it — a real TTS render loses the arm's schedule-resolve latency off its render-ahead window; no fake-clock spec effect.
  • BreakPlan.UnitOrdinal duplicates Context.UnitOrdinal (T527 candidate). WarnDrop carrying its own text is deferred to T534.

Not in this PR

No speaker snapshot (#772, PR-4). No IBreakRenderer / IBreakDeliverer seams yet (PR-5/PR-6).

…nedSlot, sources, outcomes, drop policies (gh-#401)

SPEC F187 / STORY-454. Public sealed records under Plan/ in the
GenWave.Orchestration namespace: BreakContext, BreakPlan (ToTrace: one
line per slot, "(empty)" for none), PlannedSlot, Reservation +
ReservationKind, and three closed hierarchies with private protected
bases — SlotSource (Render, Verbatim, Ready), SlotOutcome (Rendered,
TimedOut, Failed, Abandoned), DropPolicy (Silent, Warn, WarnAndEvent).
Nothing consumes them yet; the Orchestrator is untouched (T521/T522).

Interim until PR-4's speaker work (T524/T527): a Render or Verbatim
slot's speaker is the request's PersonaName or "station", Verbatim
carries the SegmentCopy, WarnAndEvent is parameterless because the
handoff drop is the only event today. Story454's 14 facts are green.
…n from today's steps (gh-#401)

BreakPlanner performs EnqueuePatterAsync's steps 1 → 1.5 → 1.75 → 2 →
2.25 → drain → 3 verbatim, minus rendering and minus the handoff arm
(SPEC F188.1), keeping every side effect in today's order (F188.2) and
reading the render + time/date budgets once per plan (F188.3). Claimed,
vended, dequeued and pooled slots carry one named Reservation (F187.3);
VerbatimSource gains AllowFlavor so the render phase keeps F191.4's
flavored-then-plain law without the planner calling the copy writer.
BreakContext gains UnitOrdinal (the Orchestrator's unitCount lives in
GetNextAsync, so the planner never increments it).

The Orchestrator is untouched — T522 wires the plan in and deletes the
old path; the step logic is duplicated for exactly one commit.

Story455 AC1–AC4 green through the new BreakPlannerBuilder; AC5/AC6
retagged pending T522. Full solution green, Release build 0 warnings.
…uePatterAsync and Build*Request deleted (gh-#401)

PlanAndRenderAsync builds a BreakContext, asks BreakPlanner.PlanAsync for
the plan, hands it to IBreakPlanObserver (NoOp by default), arms the handoff
ceremony, then RenderPlanAsync (Orchestrator.Render.cs) kicks every slot and
awaits in ordinal order against the plan's render budget — drop policies,
WARN text, and HandoffPieceDropped unchanged (SPEC F186.3/F186.4, F191.4).

EnqueuePatterAsync and every Build*Request method are gone (SPEC F188.5,
STORY-455 AC6 un-skipped, proven by reflection). Orchestrator.cs drops from
2687 to 1641 lines; dead stationClock/contextSettings/StationLocalNow removed
from the Orchestrator (still fed to BreakPlanner).

Story452 replay gains a Traces table (O1–O9) via CapturingBreakPlanObserver;
assertions otherwise frozen. ForwardingLogger<T> (test-only) keeps planner
log lines visible to CapturingLogger<Orchestrator> specs. SEAMS.md
regenerated (122 seams).
@genwave-radio
genwave-radio merged commit 2437a01 into main Sep 19, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 19, 2026
@genwave-radio
genwave-radio deleted the orchestration/break-plan-454 branch September 19, 2026 03:55
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