Repository navigation
Add sequence control, scrubbing, and stepping endpoints - #9
Merged
Merged
Conversation
- Add POST /sequence/* endpoints for seekable playback. - Fix thread on sequence start & debounce abort idle checks. - Update tests and fire.yaml for sequence runs.
MasterUser43
marked this pull request as draft
September 8, 2026 21:53
MasterUser43
marked this pull request as ready for review
September 15, 2026 20:09
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements sequence control endpoints (
/sequence/*[view below]) to give operators control over test sequences. This enables pausing, resuming, timeline scrubbing, and stepping thro' predefined phases offire.yamlw/o triggering intermediate hardware actions during jumps.Endpoints Added
GET/sequencePOST/sequence/startPOST/sequence/stopPOST/sequence/timePOST/sequence/stepResponse Schema (
start,stop,time,step){ "step": "<string | null>", "server_time_ms": 1717000000000, "sequence_time_ms": 12500 }Errors relevant to issue
409 Conflict: Returned by/sequence/timeand/sequence/stepfor a backward seek while the sequence is actively running (forward seeks while running are allowed), or iffire.yamlcannot be loaded/driven.422 Unprocessable Entity: Returned by/sequence/stepif an invalid or unknown step name is passed.Operational & Safety Behavior
The following is based upon implementation and relevant action for Front-end folks:
POST /fireorPOST /sequence/start, & freezes onPOST /sequence/stop./sequence/timeor/sequence/stepwhile stopped only repositions the timeline pointer. While running, a forward/sequence/time//sequence/stepcall fires every actuator action between the current position and the target, then keeps ticking live from there; a backward seek while running is refused (409) since "unfiring" isn't safe.POST /firealways resets execution toPOST /sequence/startresumes execution from the current cursor offset (i.e., where/sequence/stoppaused).POST /sequence/stop& on natural completion (after the last scripted action, the clock keeps counting),instead of freezing or resetting to 0.POST /sequence/startis refused until a freshPOST /fireruns, which is what actually resets the cursor toSuggestions for Dashboard Integration
Keep the
FireandResume / Startactions separate in the UI. Do not combine them.Fire->POST /fire(Resets toResume->POST /sequence/start(Starts from current cursor)Pause->POST /sequence/stop(Preserves cursor)UI Timer: The client-side sequence clock should not tick unless actively started, but note it keeps counting after natural completion (not reset/frozen). Must poll
GET /sequencestatus or/status'ssequence_step/timing fields rather than gating the display onsequence_activeonly.For more friendly implementation, I've included step names in
fire.yamlto be mapped s.t. functionality is more on the DAQ-side.purge_openignition_onignition_offpurge_closemain_valves_openmain_valves_closepurge_reopenpress_vent_closepurge_final_closeFuture Considerations
/stream):sequence_stepis omitted from SSE/streamto avoid breaking existing downstream consumers/tests pinning the exact key set (active,name,elapsed_s). This obviously can change; however, the benefit of doing that, from initial consideration, would just be time synchron. which can be solved alternatively. Sincesequence_stepis available viaGET /statusandGET /snapshot, the running step can be found via the streamedelapsed_s+ static steps fromGET /sequence. Additionally, each/sequence/*command returns the current step synchronously in its response body.