Skip to content

Reset demo recorder state after saving - #62

Open
eust-w wants to merge 1 commit into
NeuracoreAI:masterfrom
eust-w:upstream/demo-recorder-save-state
Open

Reset demo recorder state after saving#62
eust-w wants to merge 1 commit into
NeuracoreAI:masterfrom
eust-w:upstream/demo-recorder-save-state

Conversation

@eust-w

@eust-w eust-w commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • stop DemoRecorder after a successful save
  • return the actual path returned by Demo.save
  • keep the active demo and recording state unchanged when saving fails, so callers can retry
  • add lifecycle regression tests

Why

DemoRecorder.save_demo clears the active demo after a successful write but currently leaves is_recording set to true. A subsequent record call is then ignored, leaving the recorder in an inconsistent state with no active demo. The next timestep can fail because it is sent to None.

The recorder should become idle only after a successful save. A failed save should continue to propagate while retaining the active recording for retry.

Compatibility

The common record, stop, save sequence is unchanged. This only fixes the state of callers that save directly while recording and makes the returned path follow Demo.save.

Validation

  • successful save becomes idle and can immediately start another recording
  • failed save keeps the current demo and recording state for retry
  • Black 23.3.0, Ruff 0.0.272, Python compilation and git diff checks passed

Supersedes #57 after the source branch was renamed to remove the agent/ prefix.

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