Skip to content

Lab: close the Slice 1 gaps (shot worker, transition source, state.json throttle) - #507

Merged
dayfine merged 3 commits into
lab/toolingfrom
lab/slice1-gaps
Nov 15, 2026
Merged

dayfine merged 3 commits into
lab/toolingfrom
lab/slice1-gaps

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Base: lab/tooling (diff shows only this change). Closes the three Slice 1 gaps the #131 review left.

ProgramSession::start_program()/stop_program() now take an ActionSource and the lab request id and keep the last transition (ProgramTransitionLatch, new CommonFramework/ProgramTransition.h), latching who stopped a run from STOPPING through STOPPED; the Start/Stop button and integrations pass ui, the lab channel lab with its request id, so the channel no longer guesses the source from state changes. A request made only of snapshot lines (what shot writes) now runs on a second pool worker beside the inbox worker, so it never waits behind a long request. Lab/state.json is rewritten at once on any logical change (new instance id, finished request, start/stop, video state) and otherwise at most once a second, always with the newest frame.

Contract notes for #131: the heartbeat is now ~1 s instead of 500 ms (pa_lab's 10 s limit is unaffected); snapshot-only requests may finish out of name order; JSON values are unchanged.

Tested with new unit tests (ProgramTransition latch, state.json throttle and transition filter, snapshot-request classification, inbox listing); touched files syntax-checked locally, full build and tests on Fork Draft CI. Not run on a console.

…on throttle)

- ProgramSession's start and stop take an ActionSource and the lab request
  id, and keep the last transition (ProgramTransitionLatch), latching who
  stopped the run through STOPPING to STOPPED. The Start/Stop button and
  integrations pass UI, the lab channel LAB with its request id; the
  channel no longer infers the source from state changes.
- A request of snapshot lines only runs on a second pool worker beside the
  inbox worker, so a shot never waits behind a long request.
- Lab/state.json is rewritten at once on a logical change and otherwise at
  most once a second (LabStateJsonThrottle).
…de the uuids, request_files replaces next_request_file)
@dayfine
dayfine marked this pull request as ready for review November 15, 2026 03:51
@dayfine
dayfine merged commit a5b451f into lab/tooling Nov 15, 2026
9 of 16 checks passed
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