Skip to content

fix(cli): report installed binary version to readiness - #1809

Closed
ScriptedAlchemy wants to merge 4 commits into
masterfrom
cursor/daemon-probe-identity-f6a5
Closed

ScriptedAlchemy wants to merge 4 commits into
masterfrom
cursor/daemon-probe-identity-f6a5

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • GitHub upgrades now report the installed binary's --version as the daemon identity, not the release tag.
  • Readiness still requires that exact string, so a tag-vs-build mismatch keeps failing closed instead of being treated as the same build.

Motivation

tracedecay update on the GitHub path stored the release tag (0.1.0-beta.47) as expected_version. The daemon advertises build_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 sends expected_version as client_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_identity reads --version after 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_request in .github/workflows/ci.yml. Dispatch CI on 047746ae5eaf8df1ac33b8d4dc70a69fb22f67f4.

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 clippy has no new warnings (not run)

Checklist

  • No secrets, credentials, or .env files included
  • CHANGELOG.md left alone (release-please generates it from commits; there is no [Unreleased] section)
  • No breaking changes
Open in Web Open in Cursor 

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>
@changeset-bot

changeset-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 06f8838

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Overlaps #1799 (fix(cli): align update protocol identity with the installed binary) on crates/tracedecay-cli/src/upgrade.rs (same root cause: GitHub path storing release tag instead of installed --version).

Prefer landing via #1799. If this PR’s probe.rs / tests.rs identity classification coverage is not in #1799, fold those tests into #1799 before closing this as duplicate.

ScriptedAlchemy and others added 3 commits September 19, 2026 08:40
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>
Master run 35431539771 failed Check formatting (projector.rs, query.rs) and
Clippy (items_after_test_module in query.rs) after #1844/#1845 merged
without CI.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

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.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Superseded: update-identity / partial-gen work already on master via #1797 (Session Miner handoff). Closing as duplicate; do not revive.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Closing per Session Miner: already on master via #1797.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants