Skip to content

fix: make Claude Store takeover self-healing#9

Open
damonleelcx wants to merge 1 commit into
develop-v1.0.4from
codex/claude-store-takeover
Open

fix: make Claude Store takeover self-healing#9
damonleelcx wants to merge 1 commit into
develop-v1.0.4from
codex/claude-store-takeover

Conversation

@damonleelcx

Copy link
Copy Markdown

Summary

  • detect Microsoft Store/MSIX Claude via its per-user package-family directory in addition to the standalone installer marker
  • register the AiKey profile in configLibrary/_meta.json.entries, preserve foreign entries, deduplicate stale AiKey entries, and remove only AiKey metadata on restore
  • make an existing alpha.5 appliedId-only configuration self-heal on the next takeover instead of being treated as unchanged
  • report every installation path checked by aikey desktop status and the not-installed error

Root-cause evidence

The Windows 10 Store install (Claude_pzs8sxrjxfjjc, Claude 1.24012.9.0) has no standalone %LOCALAPPDATA%\AnthropicClaude directory. Alpha.5 therefore refused takeover unless an empty marker directory was created manually. Alpha.5 also wrote only appliedId; current Claude expects a matching {id,name} entry in _meta.json.entries.

The observed /api/hello 404 is not the blocking bug: in one fresh Claude Code 2.1.219 session it was followed by two successful /v1/messages calls (HTTP 200, model claude-sonnet-5, 766 and 54,291 tokens). The OAuth identity was kelton_quibusdammu@technologist.com, and both requests used mihomo egress. No proxy endpoint shim is included.

Verification

  • cargo test claude_desktop --lib: 28 passed
  • cargo test --lib: 1140 passed, 5 ignored
  • cargo clippy --lib -- -D warnings
  • Windows release cross-build: x86_64-pc-windows-gnu
  • us-west-1 Windows 10 VM candidate test:
    • removed the empty standalone-marker workaround during the test
    • Store package marker alone produced installed: true, state: aikey, gateway_probe: ok
    • downgraded _meta.json to alpha.5 appliedId-only form; aikey desktop install restored exactly one AiKey entry and exited 0
    • restarted Store Claude; logs reported 3P mode active, provider: gateway, healthy config, and apiHost=http://127.0.0.1:27200/anthropic
    • Store-bundled Claude Code 2.1.219 exited 0 through the OAuth pool; WAL recorded successful usage and mihomo attribution

@damonleelcx

Copy link
Copy Markdown
Author

CI baseline note: both this PR and the latest develop-v1.0.4 commit (1df62d8, run 30166441692) fail the same pre-existing 25 standalone-repository tests. The primary failures are the fish shell-detection environment test and the missing monorepo fixture ../pkg/providerroutes/testdata/registry_golden.json; the remaining local-server failures are cascading poisoned-lock errors.

This change’s focused suite is green (28/28), the monorepo-local full library suite is green (1140 passed, 5 ignored), Clippy is green, and the Windows release cross-build plus us-west-1 Store/Claude Code E2E passed.

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.

1 participant