Problem
When resuming from a checkpoint via --from-checkpoint, all steps up to and including the checkpoint step are skipped. This includes session setup steps like starting a headed browser (browser start --headed), which means the browser is never started and subsequent steps that use browser open fall back to headless mode.
Example from a real test file:
[[steps]]
instruction = "Start the browser in headed mode by running: browser start --headed"
[[steps]]
instruction = "Query the database to verify it is completely empty..."
[[steps]]
checkpoint = "after-oauth"
instruction = "After the redirect back to the app..."
Running bugatti test --from-checkpoint after-oauth skips steps 1-3, restores the checkpoint, then continues from step 4 — but the browser was never started.
Proposed solution
Add a session = true flag on steps. Session steps always execute, even when marked as skipped by --from-checkpoint.
[[steps]]
session = true
instruction = "Start the browser in headed mode by running: browser start --headed"
Implementation
test_file.rs — add #[serde(default)] pub session: bool to Step
expand.rs — propagate session field to ExpandedStep
executor.rs — change the skip guard from if step.skip to if step.skip && !step.session
- No changes needed to
--from-checkpoint logic or checkpoint restore logic
Execution order with --from-checkpoint after-oauth
- Checkpoint restore runs (restores DB state)
- Step 1 (
session = true) — executes browser start --headed
- Steps 2-3 — skipped normally
- Step 4+ — executes normally
Problem
When resuming from a checkpoint via
--from-checkpoint, all steps up to and including the checkpoint step are skipped. This includes session setup steps like starting a headed browser (browser start --headed), which means the browser is never started and subsequent steps that usebrowser openfall back to headless mode.Example from a real test file:
Running
bugatti test --from-checkpoint after-oauthskips steps 1-3, restores the checkpoint, then continues from step 4 — but the browser was never started.Proposed solution
Add a
session = trueflag on steps. Session steps always execute, even when marked as skipped by--from-checkpoint.Implementation
test_file.rs— add#[serde(default)] pub session: booltoStepexpand.rs— propagatesessionfield toExpandedStepexecutor.rs— change the skip guard fromif step.skiptoif step.skip && !step.session--from-checkpointlogic or checkpoint restore logicExecution order with
--from-checkpoint after-oauthsession = true) — executesbrowser start --headed