8000 fix(minimal-client): skip entries vanishing during the workspace upload walk by gominimal-aw-bot[bot] · Pull Request #2316 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script type="application/json" data-target="react-partial.embeddedData">{"props":{"contextRegion":{"crumbs":[{"crumb_type":"organization","label":"gominimal","is_root":false,"href":"/gominimal"},{"crumb_type":"repository","label":"minimal","is_root":false,"href":"/gominimal/minimal"}],"localNavigation":[{"id":"code","icon":"code","label":"Code","href":"/gominimal/minimal","selectedLinks":["repo_source","repo_downloads","repo_commits","repo_releases","repo_tags","repo_branches","repo_packages","repo_deployments","repo_attestations"],"popoverTarget":false,"commandId":"repositories:go-to-code","reactNav":{"appTarget":"code-view","anchor":"code-view-repo-link"},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"issues","icon":"issue-opened","label":"Issues","href":"/gominimal/minimal/issues","selectedLinks":["repo_issues","repo_labels","repo_milestones"],"count":240,"popoverTarget":false,"commandId":"repositories:go-to-issues","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"pull-requests","icon":"git-pull-request","label":"Pull requests","href":"/gominimal/minimal/pulls","selectedLinks":["repo_pulls","checks"],"count":30,"popoverTarget":false,"commandId":"repositories:go-to-pull-requests","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"discussions","icon":"comment-discussion","label":"Discussions","href":"/gominimal/minimal/discussions","selectedLinks":["repo_discussions"],"popoverTarget":false,"commandId":"repositories:go-to-discussions","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"actions","icon":"play","label":"Actions","href":"/gominimal/minimal/actions","selectedLinks":["repo_actions"],"popoverTarget":false,"commandId":"repositories:go-to-actions","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"security-and-quality","icon":"shield","label":"Security and quality","href":"/gominimal/minimal/security","selectedLinks":["security","overview","alerts","policy","token_scanning","code_scanning"],"count":0,"popoverTarget":false,"commandId":"repositories:go-to-security","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"insights","icon":"graph","label":"Insights","href":"/gominimal/minimal/pulse","selectedLinks":["repo_graphs","repo_contributors","dependency_graph","dependabot_updates","pulse","people","community"],"popoverTarget":false,"commandId":"repositories:go-to-insights","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}}],"localNavigationUpdateChannel":null,"selectedLink":"repo_pulls"},"owner":null,"headerLogo":{"href":"/","aria-label":"Homepage "},"notifications":{"indicatorMode":"disabled","websocketChannel":null,"fetchIndicatorSrc":"/notifications/indicator","fetchIndicatorEnabled":false},"issues":{"href":"/issues"},"pulls":{"href":"/pulls"},"contributedRepos":{"href":"/repos"},"copilot":{"show":false,"showAgentsButton":false,"showRelaunchAnnouncement":false,"copilotChatUrl":null,"copilotApiUrl":"https://api.githubcopilot.com"},"search":{"show":true,"showCommandPalette":false,"isSearchPage":false,"isJumpToSearch":false,"searchContext":{"scope":"repo:gominimal/minimal","current_repo_name":"minimal","current_repo_nwo":"gominimal/minimal","current_repo_org":"gominimal","user_id":"gominimal"}},"commandPalette":null,"enterpriseBar":{"show":false},"globalTransactionalMessage":[],"payloadsUrl":"/_global-navigation/payloads.json?can_toggle_site_admin_and_employee_status=0\u0026is_admin_mode_on=0\u0026is_ui_opted_out=0\u0026show_ui_opt_out=0\u0026v=8","contextRegionUrl":"/_global-navigation/context-region.json"}}

fix(minimal-client): skip entries vanishing during the workspace upload walk - #2316

Merged
norrietaylor merged 2 commits into
mainfrom
inbox-patch/skip-vanished-entries-in-upload-walk-d2f56424b5cda8e0
Oct 18, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
inbox-patch/skip-vanished-entries-in-upload-walk-d2f56424b5cda8e0

Conversation

@gominimal-aw-bot
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABX3vYDQ

The workspace upload walk (stream_tar_zstd / add_dir_entries_inner in
minimal-client) aborted the entire upload when any file or directory
vanished between the readdir that listed it and the walk reaching it —
with "workspace upload failed: reading directory ...: No such file or
directory". A concurrent git gc pruning .git/objects/xx/ or a build
cache cleaned mid-upload reliably killed uploads of active workspaces.

The walk already skipped PermissionDenied entries; this extends the
same tolerance to io::ErrorKind::NotFound at every walk site
(read_dir, next_entry, both file_type calls, read_link, File::open):
skip the vanished entry and log at debug. The read_link site had no
skip handling at all and gains a PermissionDenied arm too. The upload
root itself (empty archive prefix) remains a hard error — a missing
root is the caller's mistake, not a race.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml — clean
  • cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — clean
  • cargo test --locked --manifest-path target/Cargo.toml -p minimal-client — 107 passed, 0 failed
  • added stream_skips_entries_vanishing_mid_walk: stages the readdir-vs-open race deterministically (deletion fires from the first poll_write of a bounded-pipe writer mid-walk); fails on the pre-fix tree, passes after
  • added stream_errors_on_missing_upload_root: pins that a missing upload root stays a hard error
  • live-session: native-daemon-e2e (.github/workflows/ci-linux-native.yml) — runs on this PR; not runnable in the fixer sandbox

…ad walk

The directory-walk uploader aborted the whole workspace upload
with 'reading directory ...: No such file or directory' when a
file or subdirectory vanished between the readdir that listed it
and the walk's own read_dir, file_type, read_link, or File::open
— for example a concurrent git gc pruning .git/objects/xx/ or a
build cache being cleaned mid-upload.

Treat io::ErrorKind::NotFound like PermissionDenied at every walk
site: skip the vanished entry and log at debug. The upload root
itself (empty archive prefix) stays a hard error, since a missing
root is the caller's mistake, not a race.

Adds a regression test that stages the race deterministically —
deletion fires from the first poll_write of a bounded-pipe writer
while the walk is mid-stream — plus a boundary test pinning that a
missing root is still an error.
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 18, 2026 03:21
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 18, 2026
@coderabbitai
coderabbitai Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

Or wait 34 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 58 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a6bffd1b-09a8-4016-acb8-c194e61f8d35
📥 Commits

Reviewing files that changed from the base of the PR and between 11b0b44 and d3a8e92.

📒 Files selected for processing: 1
  • crates/minimal-client/src/file_upload.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 18, 2026
@norrietaylor norrietaylor changed the title fix: skip entries vanishing during the workspace upload walk fix(minimal-client): skip entries vanishing during the workspace upload walk Oct 18, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at d3a8e92e2f4d.

Nothing to do.

Clobber: none: git log on the file shows no recent fix reverted; the read_link site keeps its original error message in the fallthrough arm.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — No findings.

Panel: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 18, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on ARCH PASS at d3a8e92.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 48a6259 Oct 18, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/skip-vanished-entries-in-upload-walk-d2f56424b5cda8e0 branch October 18, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0