GeezerVison is showing github.com — fix(id/backup): prevent binding devices during pending restore by dezren39 · Pull Request #9020 · developing-today/code
Conversation
dezren39
commented
Nov 12, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #9005.
Problem
BackupStore::download_for_restore snapshots the bound-device notification list. A later bind_device could add another device before the old receipt was confirmed, allowing confirmation to clear the pending state without notifying that device.
Solution
- Make
bind_device return Result and refuse new devices while restore notifications are pending.
- Keep re-binding an already-listed device idempotent.
- Add a regression for refusal, preserved pending state, confirmation, and subsequent ordered delivery to both devices.
Verification
rustfmt --edition 2024 --check pkgs/id/src/backup.rs — passed
git diff --check — passed
- Focused
backup::tests::binding_device_is_refused_until_restore_notifications_are_confirmed cargo test — running under fleet-build-lock; result to follow.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 31 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
293a6c98-2d68-4dc1-ac6c-0c37d1f9152f
Commits
-
Reviewing files that changed from the base of the PR and between fdbabb3 and b0c9f87.
Files selected for processing: 1
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
❌ Failed 2026-11-14T20:05:16.714295Z We couldn’t complete this review. Comment @codex review to try again. |
b0c9f87 |
New commits |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Verification update:
- Focused regression:
cargo test --manifest-path pkgs/id/Cargo.toml --lib backup::tests::binding_device_is_refused_until_restore_notifications_are_confirmed — PASS (1/1).
- Existing restore tests:
cargo test --manifest-path pkgs/id/Cargo.toml --lib backup::tests::restore_ — PASS (2/2).
rustfmt --edition 2024 --check pkgs/id/src/backup.rs and git diff --check — PASS.
- The ID build/guard, fleet-search parity, production-line, scripts, proxy, and other completed basic checks are green. The PR's
mcpx test unit job and E2E shards 0, 3, 4, and 5 fail; shard 2 is still pending.
This matches the existing main-CI breakage tracked by OPEN #8900 / blocked task 15117. Fresh main run 43300092345 on 6a7843cae59878e10071f27440b93489053dbc68 independently failed the mcpx test unit job and E2E shards 0, 3, and 4 (with the workflow aggregate failing); #8900 already tracks the same affected unit/E2E families and recurring shard 5. The current-base main run 43302223752 is still queued on unit/E2E legs.
Leaving this PR OPEN and unmerged until the shared CI blockers are resolved and the full basic-check set is green; no failing check is in the changed ID code.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
agent-note:v1
state: picked-up
task: 17189
lane: code-a
worker: repo-worker-code
What: Shepherding PR #9020 to a terminal outcome (90-day review open-PR pass). Verified fresh: PR #9020 OPEN, head bf8c37c, no held / user/owned / do-not-merge / do-not-auto-edit labels; issue #9005 OPEN with no hard stops; the fix is NOT on current main (regression test name absent from origin/main); Codex review completed with no findings; bind_device has no callers outside pkgs/id/src/backup.rs (definition + 3 test call sites, all updated by this PR). The PR verification note (comment 6835766391) records the focused regression PASS 1/1, restore tests PASS 2/2, rustfmt + diff-check PASS, and that the mcpx-test failures match pre-existing main-CI breakage tracked by #8900.
Next: merge current main into the PR branch in a dedicated worktree, re-run the targeted backup tests, push, recheck, and merge on its merits.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
agent-note:v1
state: merge-ready
task: 17189
lane: code-a
worker: repo-worker-code
What: Merging PR #9020 on its merits. Current main merged into the PR branch (merge commit b0c9f87, clean, no conflicts); the PR diff against current main is exactly pkgs/id/src/backup.rs (+64/-8). Targeted verification on the merged tree this shift: cargo test --manifest-path pkgs/id/Cargo.toml --lib backup::tests:: — 15/15 PASS, including the new regression binding_device_is_refused_until_restore_notifications_are_confirmed. Codex review: completed, no findings. The mcpx-test CI failures on the previous head are the pre-existing main breakage tracked by #8900 (independently failed on fresh main runs; see comment 6835766391) and are unrelated to this single-file id/backup change.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
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.
|