Repository navigation
fix(monitor): ignore stale layers above the job total - #19
Merged
Merged
Conversation
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.
monitor --snapshot-at-layer 2could consume its one-shot snapshot during startup whenRUNNINGstill carried the previous job's layer count, such as 319 layers out of a reported total of 75. Require the layer to fit within the reported total before capturing. Joining an active print still captures at the first valid layer at or above the target.Adds command-level regressions for stale startup, an unknown total, joining mid-print, the final layer, and a run with no valid layer. The stale-layer regression captured layer 319 before the fix and layer 2 after it.
Snapshots now require a positive reported total; they wait while the total is unknown. This bounds check cannot distinguish a stale layer that already fits within the new job's total.
Validation:
GOTOOLCHAIN=go1.26.10 make cipassed formatting, lint, vet, race tests, and build. The built executable also passed read-only status and monitor checks against a printer. Startup behavior is verified with simulated status reports and ffmpeg; no new print was started.Review gate: approve with nits. The requirement for a known total is documented; the test connection deliberately advances once per status read.