Skip to content

feat(acquisition): a restored run can be carried on - #204

Merged
pskeshu merged 1 commit into
developmentfrom
feat/timelapse-continue
Sep 26, 2026
Merged

pskeshu merged 1 commit into
developmentfrom
feat/timelapse-continue

Conversation

@pskeshu

@pskeshu pskeshu commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

there is no way to resume a timelapse.

Follows #203. That PR put the run's state back after a restart — every embryo's ending, interval and count — but the loop that images them is gone with the old process, and start() begins a new run. So the run view showed the restored embryos as "running · next now" with a Stop each, over nothing, and offered no way on.

Orchestrator. can_continue() (idle, with embryos still going) and continue_run(): every embryo still going is due now (the interruption was of unknown length), numbering carries on from the checkpoint so the volumes on disk are never written over, the DIC channel keeps its clock, the run keeps its started_at, and a new perception run is opened. Paused → plain resume(); nothing restored → says so.

Routes. The status carries resumable. POST /api/devices/timelapse/resume carries a restored run on ({continued: true}) and still resumes a paused one; it also wakes the session's standing_timelapse tactic from done back to active and re-adopts it, so a later Stop marks it done again (the ids the orchestrator kept for it do not survive a restart).

Run view. A restored run says "interrupted — press Resume run to carry on"; its rows say waiting with no next-time and no per-embryo Stop; the actions show one button, Resume run. Rows of a live run are unchanged.

Tests: an orchestrator that imaged a few rounds, whose task is cancelled (not stopped) with the checkpoint on disk; a fresh orchestrator loads it, can_continue(), continues, and every embryo's count goes up from where it was, never from t1 again. Plus paused→resume, nothing-to-continue, completed embryos excluded, the two routes, and the view's wiring. 9 tests in tests/test_timelapse_continue.py.

🤖 Generated with Claude Code

"there is no way to resume a timelapse."

After a restart the checkpoint puts every embryo back where it was —
its ending, its interval, its count — but the loop that images them is
gone, and start() would begin a new run. The run view drew the restored
embryos as "running · next now" with a Stop each, over nothing.

Now the orchestrator can continue a restored run. Every embryo still
going is due now (the interruption was of unknown length), numbering
carries on from the checkpoint so the volumes on disk are never written
over, the DIC channel keeps its clock, and the run keeps its started_at.
The Resume route carries a restored run on, and still resumes a paused
one; it wakes the session's standing_timelapse tactic back to active and
re-adopts it, so a later Stop marks it done again.

In the run view a restored run says "interrupted — press Resume run to
carry on", its rows say "waiting" with no next-time and no Stop, and the
actions show one button: Resume run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pskeshu
pskeshu merged commit 3b49837 into development Sep 26, 2026
2 checks passed
@pskeshu
pskeshu deleted the feat/timelapse-continue branch September 26, 2026 06:27
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