Repository navigation
fix(scan): report a --max-duration timeout as partial, not complete - #81
Open
harshitgavita-07 wants to merge 3 commits into
Open
harshitgavita-07 wants to merge 3 commits into
harshitgavita-07 wants to merge 3 commits into
Conversation
A run stopped by --max-duration emitted status=complete with timed_out=true, so a receiver following docs/state-model.md would promote a truncated snapshot. Report it as partial. Exit code is unchanged. Fixes perplexityai#79.
Clarified the 'partial' state to include timeout conditions.
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.
bumblebee scan --max-duration <d>stops walking at the deadline and setstimed_out: true, but the trailingscan_summarystill saysstatus: "complete".docs/state-model.mdtells receivers to promote onlystatus=completeruns, so a truncated snapshot can replace a fuller one.Reported in #79 (suggested change 1).
What changed:
runScansetsstatustopartial(with anerrormessage) whenres.TimedOutis true and the status was otherwisecomplete.timed_outstays in the record.docs/transport.mdwidens thepartialdefinition to include a--max-durationstop, as the issue noted it must.Tests:
TestRunScanTimedOutIsPartialruns a real scan with--max-duration 1nsand checks the summary. It fails onmain(status=complete) and passes here.TestRunScanCompleteWhenNotTimedOutguards the normal path.go vet,gofmtandgo test ./...are clean.Not covered: the issue also asks whether
completewas meant to describe process end rather than coverage. If so, this PR is the wrong call and the docs-only option in the issue applies instead.