Skip to content

docs(specs): add spec 85 for truthful health and hold-then-swap cuts - #416

Draft
hyperb1iss wants to merge 6 commits into
mainfrom
nova/spec-zone-cues
Draft

hyperb1iss wants to merge 6 commits into
mainfrom
nova/spec-zone-cues

Conversation

@hyperb1iss

Copy link
Copy Markdown
Owner

Draft for review. Spec only; no code. Phase 1 is ready to implement once accepted; Phase 2 has open decisions listed in §9.1.

Every effect change today replaces a zone's layer stack and lets the new producer warm up in public. HTML effects flash a placeholder frame, the layer reports Active before it shows a real pixel, a page that fails to load stays Active forever with the placeholder on the LEDs, and nothing reports when a cut actually reached the devices. A scripted rehearsal of the demo film against the owner's rig measured each of these, and they make a beat-synced cut impossible. Spec 85 defines how the engine fixes them without lowering any performance baseline.

What this changes

The spec adds docs/specs/85-show-grade-cuts.md:

  • Phase 1, truthful health. Every runtime producer gets an incarnation id. Every layer source declares its readiness (required, no default), placeholders are deleted in every build, a failed load is Failed exactly once, Degraded and Stalled are emitted honestly, deadlines survive session sleep, and GET /scene/runtime lets a reconnecting client recover the current truth. SDK pages get a minimal init and origin-frame handshake so readiness means real pixels.
  • Phase 2, hold-then-swap. A zone keeps presenting its current graph, live, until every incoming producer has real output or has failed; geometry changes and interrupted scene transitions hold an immutable still instead of going empty; activation blends per physical target; and every cut ends with a terminal delivery outcome for every target it was routed to, with monotonic latency from the request's arrival.
  • Follow-up, zone cues. Preparing an effect before the beat is the only way a cut to an HTML effect can land on it. That needs capacity admission measured from Phase 2, so it is deferred to its own spec, with every requirement the reviews surfaced recorded in §10.

Why

The film's cuts have to land on the music on real hardware, and the rehearsal showed the engine cannot do that or even report honestly whether it did. The evidence (raw runner reports and the daemon's audit log for the rehearsal windows) is committed on nova/demo-video under demo/evidence/.

Verification

  • Added or updated tests
  • Added or updated docs (README, AGENTS.md, relevant spec, or guide)
  • just verify passes locally (Rust fmt + lint + test)
  • just deny passes (required for dependency or license changes)
  • just ui-test and just ui-build pass (required for crates/hypercolor-ui/)
  • just sdk-lint, just sdk-check, and just sdk-build pass (required for sdk/)
  • just python-verify passes (required for python/)
  • just compat-check passes (required for data/drivers/vendors/*.toml)
  • just docs-build passes (required for docs or README changes)
  • cd docs && zola check passes (required for docs link/content changes)
  • Packaging scripts were syntax-checked (required for scripts/ or packaging/)
  • just e2e-build passes with the normal Servo stack (required for daemon/UI/effect integration changes)
  • just e2e-build-cpu passes when validating the CPU smoke fallback
  • just e2e passes against the Servo stack (required for end-to-end behavior changes; starts daemon/browser)
  • Tested on real hardware, simulator, or e2e harness (describe below)

The spec went through five rounds of independent review against the code, each citing file and line receipts. Findings fell from 20 (5 blocking) to 18, 14, 8, and finally 5 open Phase 2 decisions with no blocker; §12 records each round's dispositions. The last round judged Phase 1 fully specified. The spec lives under docs/specs/, outside the Zola site, so the docs gates do not apply.

Notes for reviewers

  • Start with §0 for the goals and the doctrine (no lowered baselines, no capacity refusal of live actions), then §2 and §3.
  • §9.1 lists the Phase 2 decisions still open and a pre-existing doctrine conflict the review found: live media admission caps video counts and downshifts the FPS tier from estimated cost.
  • The spec amends Spec 78's LayerHealth semantics and Appendix A (one route), and the effect-error fallback policy.

🤖 Generated with Claude Code

hyperb1iss and others added 6 commits October 12, 2026 16:21
The demo-film rehearsal showed that no effect change can land on a
beat: HTML effects warm up in public behind a placeholder, layers
report Active before a real pixel exists, a failed page load stays
Active forever, and the producer only starts loading when the cut is
requested. The draft makes every stack replacement hold the outgoing
stack live until the incoming one has real frames, makes LayerHealth
truthful (Active on the swap frame, Failed and Stalled emitted), and
adds runtime-only zone cues that prepare an effect early and go live
on a frame boundary. Apply becomes an implicit cue plus go, so there
is one staging path, and playlists prepare their next item through it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first review found the mechanics underspecified: retaining slots
cannot hold a live graph when layers are shared between stacks, default
readiness lied for asynchronous sources, Active could not prove a cut
reached the LEDs, cue consumption raced deletes and revision checks, and
the capacity budget cited an interface the daemon does not have.

Rev 2 introduces producer incarnations and three graphs per zone, makes
readiness a required per-source contract, defines an activation origin
with page suspension, adds presentation receipts carrying a cut
generation to the device hand-off, makes go one transaction with replay
before If-Match, gives cues their complete canonical source, scopes the
effect-error fallback, adds a runtime health snapshot, and replaces the
threshold budget with a measured admission ledger that never refuses a
live user action.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The second review closed nine of the first round's findings and raised
more, most of them about cues and their capacity admission: memory that
cannot be attributed per session, release that outlives destroy
acknowledgement, and worker bursts that steady-state occupancy hides.
Those cannot be designed honestly before hold-then-swap exists to
measure, so rev 3 narrows the spec to what can be: incarnations and
per-source readiness, truthful health with readiness exposed beside it,
hold-then-swap with geometry holding the last frame and the outgoing
graph living through scene transitions, an SDK preparation handshake
with honest behavior for pages without it, and cut receipts that report
per-target delivery outcomes with monotonic latency. The cue
requirements both reviews surfaced are recorded for the follow-up spec.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Round three accepted narrowing spec 85 and found two blockers: an
interrupted scene transition kept every contributing graph alive, so
repeated interruptions grew without bound, and a cut overtaken in a
slow target's queue never completed its receipt.

Rev 4 releases both graphs behind an immutable hold still when a
transition is interrupted, so a zone never holds more than one still
and one incoming graph, and gives every target routed at the swap a
terminal outcome, adding Superseded for host-side replacement and
Unverified for backends whose acknowledgements are untrue. It also
specifies immutable per-zone hold stills, per-target activation
blending, readiness tied to a preparation revision, deadline suspension
for every owner, source classes, timing asserted at each boundary, the
minimal handshake in phase one, and the complete cue requirements.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Round four closed the unbounded interruption chain and found receipts
could still strand: host-side dedupe and zero-brightness skips never
reach a backend, and a generation could be marked superseded while one
of its frames was still in flight.

Rev 5 adds operation ids minted at ingress and the swap frame number so
requests join to receipts, tracks each generation per target across
pending and in-flight attempts with a stated precedence, makes host
suppression a terminal outcome with its stage, carries contribution
metadata through physical aggregation, and has activation cuts own the
union of outgoing and incoming targets. It also fences re-preparation
with its own deadline, starts finite media at logical playback zero,
takes interruption stills before output policy, and splits dispatch
from transport completion in acceptance.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Round five found phase one fully specified and five phase two contracts
still open: operation completion for changes that create no cut,
blending complete display contributions, holds that survive geometry
changes on LEDs, preparation budgets per source class, and dispatch
eligibility when sampling defers or transport is busy. Those are better
decided with phase one built and measured, so the spec now records them
with the review's implementation notes instead of another prose round.
It also names a pre-existing conflict with the spec's doctrine: live
media admission caps video counts and downshifts the render tier from
estimated cost.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant