fix(cli): report installed binary version to readiness - #1809
ScriptedAlchemy wants to merge 4 commits into
Conversation
The GitHub upgrade reported the release tag as the identity the restarted daemon must match. Readiness compares that string to build_version and keeps opening a handshake against the live daemon until they match, so the tag made every poll a mismatch. Ask the installed binary, the same way the package-manager path already does. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
|
Overlaps #1799 ( Prefer landing via #1799. If this PR’s |
Master landed #1797's 5e03dfa, which fixes the same daemon_version_skew storm from the comparison side: `versions_name_same_build` classifies a daemon advertising `0.1.0-beta.47+<sha>` as Ready against a bare `0.1.0-beta.47`. This branch fixes the reporter side instead, so the two compose rather than compete. Conflict in crates/tracedecay-daemon-control/src/service/probe.rs, both sides added `identity_classification_tests`. Kept master's module whole: its `a_release_tag_is_not_the_build_the_daemon_advertises` asserted IdentityMismatch for exactly the pair master now classifies Ready, so that test is dropped. Kept this branch's `the_advertised_build_is_ready_against_itself`, which pins the exact-match path the upgrade.rs change makes production take. crates/tracedecay-cli/src/upgrade.rs merged clean; master did not touch it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The restored_service_matches case this branch added named a build and the bare release tag it ships. 5e03dfa landed on master and classifies that pair as one identity, so the comment ("the expected identity is the release tag and the answer is the build") now describes a state readiness no longer produces, even though the hand-constructed IdentityMismatch still made the assertion pass. Names a genuinely stale release instead, which is still a mismatch under `versions_name_same_build`, so the case keeps testing what it claims: a live daemon that answered initialize is not a restored service while its identity differs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Review lane result: MERGE-AFTER-FIX on its own, but this PR, #1799 and #1809 implement the same one-line producer fix in run_versioned_upgrade (probe the installed binary's --version instead of reporting the release tag). Exactly one can land; #1822 is being taken because it also removes the duplicated probe in run_delegated_upgrade. This PR will be closed as superseded once #1822 merges via integration batch #1848. Thanks for the fix; the reasoning in the body was correct. |
|
Superseded: update-identity / partial-gen work already on master via #1797 (Session Miner handoff). Closing as duplicate; do not revive. |
|
Closing per Session Miner: already on master via #1797. |
Summary
--versionas the daemon identity, not the release tag.Motivation
tracedecay updateon the GitHub path stored the release tag (0.1.0-beta.47) asexpected_version. The daemon advertisesbuild_version()(0.1.0-beta.47+<sha>). Readiness compares those strings exactly and, on mismatch, opens another authenticated handshake against the live daemon every 500ms until the maintenance window expires. The probe also sendsexpected_versionasclient_version, so each of those connections is a version-skew handshake.The package-manager path already asks the linked binary. The comparison in #1797 loosens identity so a missing commit matches any build of that release, which hides the skew two checkout builds of one release are supposed to catch. This removes the asymmetric reporter instead. #1797 also carries unrelated session, clone-scan, and retention fixes and is still moving, so this is the isolated probe/handshake slice rather than a rewrite of that branch.
Changes
crates/tracedecay-cli/src/upgrade.rs:release_install_identityreads--versionafter a GitHub install. A probe that cannot run is an unknown version, never the tag.crates/tracedecay-daemon-control: tests pin that a release tag is not Ready against the daemon's build, and that identity mismatch does not count as a restored service.Does not restore
pull_requestin.github/workflows/ci.yml. Dispatch CI on047746ae5eaf8df1ac33b8d4dc70a69fb22f67f4.Test plan
cargo test -p tracedecay-daemon-control --lib -- service::probe::identity_classification_tests service::tests::strict_restoration_requires_readiness_only_for_running_state(3 passed)cargo test -p tracedecay-cli --bin tracedecay -- a_github_install_reports_the_binary_identity_not_the_release_tag an_unreadable_install_is_unknown_rather_than_the_release_tag(2 passed)cargo nextest run --workspace --no-fail-fast(not run; focused tests cover the behavior)cargo clippyhas no new warnings (not run)Checklist
.envfiles includedCHANGELOG.mdleft alone (release-please generates it from commits; there is no[Unreleased]section)