Repository navigation
link sync store: fence when identify gives no capability list - #35799
Merged
Merged
Conversation
… is unknown Red: serves_fetch reads a missing or malformed capabilities field as Some(false), so the push skips the fence (#35652, item 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c76279e2406909277323
An identify answer whose capabilities are missing or not a list says nothing about blob-fetch-v2, so it is unknown (None) and the push takes fence_unknown, instead of Some(false), which skipped the fence and could let an older fetch job write over this push (#35652, item 1). Red at b2e3c83 (run 41878360641): left Some(false), right None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-c76279e2406909277323
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
Collaborator
Author
|
Owned by an agent session · session |
Collaborator
Author
|
Found 1 test failure on Blacksmith runners: Failure
|
teamleaderleo
temporarily deployed
to
sentry-dsyms
November 4, 2026 19:02 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
November 4, 2026 19:02 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
artifacts
November 4, 2026 19:06 — with
GitHub Actions
Inactive
lawrencecchen
added a commit
that referenced
this pull request
Nov 4, 2026
…5799 and #35341 (#35845) cmux-tui-rust-check.sh fmt is red on feat-cmux-next 78fcd7c (fleet step 95f2e1ad65b5194a3429b675): 9 diffs in link/sync_cli.rs, link/sync_cli/store.rs, cmux-tui-core lib.rs and apps/grants.rs. Every PR whose Rust check runs fmt inherits it (S3a e3538ce6 and a0d75c74 failed only on these files). Formatting only: rustfmt 1.95.0 with cmux-tui/rustfmt.toml, edition 2024.
This branch was previously deployed
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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Follow-up 1 of #35652, from the Codex review that gave SHIP on #34604.
What it fixes
When a machine's
identifyanswer succeeds but itscapabilitiesare missing or not a list,fetch_servedread it asSome(false): "this machine serves no blob fetch". The push then skipped the fence, so an olderblob.fetchjob still running there could commit files over what this push writes. A missing list says nothing about what the machine serves, so it is nowNone, and the push takesfence_unknown(the path already used whenidentifydoes not answer at all). A machine whose list is present and lacksblob-fetch-v2is stillSome(false), unchanged.The decision is pulled out of
fetch_servedintoserves_fetch(&Value)so it can be tested without a socket.Test
cargo test -p cmux-tui --lib an_identify_answer_without_capabilities(hosted,./scripts/verify-cmux-tui-hosted.sh --filter):left: Some(false),right: None.link::sync_cli::store(result in a comment below).Observed / Not run
link_sync_storeend-to-end test, which has no fixture for an identify answer without capabilities. This change only affects that case.risk: low (one branch of a capability check, toward the cautious path).
Changelog
none
Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fences a push when a machine's
identifysucceeds but itscapabilitiesare missing or not a list, closing a window where an olderblob.fetchjob could still commit files over the push's writes.Previously a missing or non-list
capabilitiesfield was read asSome(false)("serves no blob fetch") and the push skipped the fence. It now reads asNoneand the push takesfence_unknown, the same path used whenidentifydoes not answer at all. A present list that lacksblob-fetch-v2is stillSome(false), unchanged.The capability check is pulled out of
fetch_servedintoserves_fetch(&Value)so it can be tested without a socket, with a new unit test covering the missing, malformed, and present-list cases.Written for commit 05d95d5. Summary will update on new commits.