Repository navigation
Conversation
…nstall (item 627) verify_installed/digest moved from dev_install::run into the shared update::swap module so agentflare update's self-upgrade path calls the same byte-level check dev-install already runs after replace_binary (item 624) instead of trusting SwapOutcome::Installed on its own. Agentflare-Agent: claude-code Agentflare-Branch: task/627-agentflare-update-never-verifies-the-swa Agentflare-Item: 627 Agentflare-Session: f0fc45e8-94ad-4f09-b663-89b425da180d
Owner
Author
|
Tracking this PR for automated review ( |
|
Warning Review limit reachedNext included review available in 39 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 60 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: getappz/agentflare/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
Comment |
Owner
Author
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.
Summary
dev-installa byte-levelverify_installedcheck afterswap::replace_binary, so a swap that reports success but doesn't actually land the right bytes gets caught.agentflare update— the ordinary user-facing self-upgrade path — called the samereplace_binary/SwapOutcomehandling but never verified the result, so the same class of "installed successfully" lie item 624 was filed for was still possible viaupdate.verify_installed/digestout ofdev_install/mod.rsinto the sharedupdate::swapmodule (bothdev_install::runandupdate::runalready depend onupdate::swapforreplace_binary), and madeupdate::runcallswap::verify_installedonOk(SwapOutcome::Installed), exactly likedev_install::rundoes.SwapOutcomematch blocks indev_install::run/update::runas-is: their surrounding error messages differ enough (dev-install's includesdescribe_holders()) that unifying them wasn't worth the risk for this fix — noted here per the task's own framing of that as a nice-to-have, not the actual bug.Test plan
cargo fmt --checkcargo clippy --locked --workspace --all-targets --all-features -- -D warnings -A unsafe_code -A clippy::pedanticcargo test --bin agentflare update::(18 passed, incl. the movedverify_installed_accepts_identical_and_rejects_any_differenceand the newupdate_swap_path_rejects_an_installed_file_that_ends_up_different_from_the_build)cargo test --bin agentflare dev_install::(6 passed)Related: item 624 (dev-install's own fix for this bug class, PR 791 / commit c5c965f).
🤖 Generated with Claude Code