Repository navigation
fix(windows host): a deleted agent's empty root is not an installed agent - #9
Merged
Merged
Conversation
…gent Rig finding (2026-09-03, first look at "Agents on this PC" after real deletions): when inventory reconciliation deletes an agent's last v3 revision it removed `<agent>/revisions/<rev>` and left `<agent>/revisions/` behind, and `_installed_agent_ids` counted any directory under the agents root — so two long-deleted agents were listed as installed, offline agents named by their ids. A root now counts as installed only while it holds a legacy bundle or at least one revision, and the delete decision prunes the empty shell and root. Pinned in test_local_agents_077 and the reconciliation delete test; ledger digests rebound. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnCh2F8vbpctZUdYzdViB1
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.
What
First look at Agents on this PC after real deletions (rig, 2026-09-03): when inventory reconciliation deletes an agent's last v3 revision it removes
<agent>/revisions/<rev>and leaves<agent>/revisions/behind, andByoAgentHost._installed_agent_idscounted any directory under the agents root — so two long-deleted agents were listed as installed, offline agents named by their ids._root_has_bundle).deletedecision prunes the emptyrevisions/shell and the agent root (_prune_empty_agent_root).Evidence
%LOCALAPPDATA%\AstralDeep\agentsheld two empty shells (21c00397-…,e4b0276c-…) and the just-deleted1e538e7c-…; after one reconnect on this branch the server decidedagent_deletedfor the tombstoned revision and the directory holds only the pre-existing legacy bundle,.stagingand.host-identity.json.tests/test_local_agents_077.py::test_inventory_skips_and_prunes_a_root_whose_revisions_are_gone(new) and the extendedtest_invalid_inventory_is_all_or_nothing_and_valid_delete_removes_revisionfail onmainand pass here; Windows-client suite 1050 passed offscreen.tests/test_protocol.pygreen).No new dependencies; no wire change; no AstralDeep composition change needed (the Deep pin can move whenever the next repin happens).
🤖 Generated with Claude Code
https://claude.ai/code/session_01AnCh2F8vbpctZUdYzdViB1