Repository navigation
[CI] validate retained video sweep evidence / [CI] 校验保留的视频扫描证据 #4274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
edwingao28
wants to merge
1
commit into
main
Choose a base branch
from
feat/video-sweep-reuse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+915
−24
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 (optional) On a slower link, video reuse or merge-with-reuse can fail even though each bundle is within the documented 256 MiB limit. Every
gh api .../zipdownload in download_files is killed after a fixedtimeout=60. That fixed limit was sized for small JSON artifacts. A 256 MiB bundle needs about 4.3 MiB/s to finish in time. A timeout raises TimeoutExpired, which validate_video_run re-raises as RuntimeError, so the run is rejected. Fix: scale the timeout withsize_in_bytes, or use a generous floor for non-JSON downloads, while keeping the short limit for the small JSON downloads through download_json that klaud relies on.Why this was flagged
Condition: a bundle whose download takes longer than 60 s, meaning a large bundle or a link slower than about 36 Mbit/s. This is most likely for merge_with_reuse, which maintainers run locally (
uv run ... merge_with_reuse <pr>). merge_with_reuse.find_eligible_run (merge_with_reuse.py:279) calls sweep_runs.validate_video_run, which calls download_files(..., token=token) for each selected artifact (sweep_runs.py:116). At github.py:69-73, subprocess.check_output runsgh apiwith timeout=60. subprocess.TimeoutExpired is a SubprocessError, so sweep_runs.py:121 catches it and raises RuntimeError "invalid native video artifacts". merge_with_reuse then aborts before posting the reuse comment, and reuse/stage paths reject the run. The size check at github.py:67 accepts up to 256 MiB, and the README says only larger bundles fail. On base, this 60 s limit applied only to klaud's small JSON artifacts, and video runs were never downloaded.Verification: In inferencex-e2e/infx/klaud/github.py, download_files accepts any archive with
0 < artifact["size_in_bytes"] <= limit, where limit is 256 MiB. It then runsgh api .../zipwith a fixed 60 s timeout that does not depend on size. validate_video_run re-raises TimeoutExpired as RuntimeError, and at merge_with_reuse.find_eligible_run (line 279) this aborts the whole selection.