Fix code review findings, node loss on device delete, and Run tab timer - #183
Merged
Merged
Conversation
The Run page hid its header timer while live, expecting the run banner to carry it, but RunnerShell hides the banner on the Run tab, so no timer showed there at all.
…LE teardown Declarative GPIO/PWM outputs go low on shutdown; serial and Harp ports get write timeouts and cancel in-flight reads; I2C closes under its lock; Mega analog pins map to the right channel; e-stop iterates snapshots; stepper and BLE setup release what they claimed; BLE retries only after a real drop.
…nfigured Hardware stops first on e-stop; .glider, config, device library, project and adopt files are written atomically; recorder start failures abort the start and roll back; device teardown is parallel and bounded; flow load failures block start, and nodes with a missing device are kept; a node error stops the run safely; paused exec propagation replays on resume; plugin load, reload and install fixes; a stalled camera now reaches the operator.
…rames Recorders finalize from PAUSED and ERROR; tracking logger recovers after a write error; multi-camera callbacks re-register after a preview restart; CV hand-off is bounded to the latest frame; stale tracks are no longer logged; writer size follows real frames; stalls raise an error; fps correction uses capture timestamps; circle zones are tested in pixel space; cancelled tracking is reported as cancelled.
Changes reported numbers; see CHANGELOG. Mirrored copies share zone ids; background is scored in CV; durations use frame numbers and stride; dropout re-seeds no longer bias speed thresholds; fps mismatches warn; mirroring uses a fixed pivot; streamed runs match batch freeze labels; CV macro-F1 uses the evaluation support floor; annotation saves are atomic.
Scope moves save the new store first; saves merge with other writers; a changed time zero opens read-only; pose/arena fixes reload one session in place; failed video opens stay local; empty ethograms, share read errors and duplicate session ids no longer crash; timeline edge and trim fixes.
…saved work Deleting a device used to delete every node bound to it from the session (the fix is in ExperimentSession.remove_device, committed with core), so reassigning showed no PWM row, the assignment was not kept, and the nodes were gone on reopen. Also: a failed or cancelled save no longer lets New/Open/close discard work; New/Open are refused mid-run; undo is cleared on New/Open and node undo restores type, state and connections; zone config propagates on New; running QThreads are never destroyed (new qthreads helper); annotator persists its trim on close and aborts merges on failed saves.
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.
Fixes about 80 findings from a repo-wide code review, plus two user-reported bugs. The full suite passes locally (5813 passed, 4 skipped); ruff and black are clean.
User-reported bugs
ExperimentSession.remove_device/remove_boarddeleted every node bound to the device. The editor kept drawing them, but reassigning showed no PWM row, the assignment was not kept, and the nodes were missing from the saved file. Removing a device now only unbinds it (_unbind_nodes). A regression test deletes the device, reassigns PWM, saves and reloads.RunnerShellhides the banner on the Run tab, so no timer was visible. The header timer now always shows.By area
hal/, harp):.glider, config, device library, project and adopt files are written atomically (core/fileio.py).--no-plugins, and installer validation.gui/qthreads.py).Behavior changes on the rig
Deliberately left open
.gliderhas no schema version.Some intermediate commits are not green on their own: the vision commit uses
gui/qthreads.py, which lands in the GUI commit.