fix: retain unrecorded legacy state roots - #689
Merged
Conversation
🦋 Changeset detectedLatest commit: 98a425d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ScriptedAlchemy
marked this pull request as ready for review
September 6, 2026 20:55
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
stateRootbefore it can authorize recursive purgeinstall.mjsAB7332plus English/Chinese lifecycle documentationReproduction
pnpm exec rstest --config rstest.config.ts packages/agent-bundle/tests/uninstall.test.ts -t 'never derives legacy receipt purge ownership'— failed before the fix: the currentXDG_STATE_HOMEsentinel root appeared indata.pathswithoutcome: purgedpnpm exec rstest --config rstest.config.ts packages/agent-bundle/tests/install-surface.test.ts -t 'emitted install.mjs never derives legacy purge ownership'— failed before the fix: generatedinstall.mjs --uninstall --planlisted the unrelated current-environment directory for removalpnpm exec rstest --config rstest.config.ts packages/agent-bundle/tests/doctor.test.ts -t 'reports a current-environment legacy state root'— Doctor reportedunrecorded, retainedwhile uninstall planned a purgeValidation
Branch includes current
origin/main(5fc8de37c9).pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit— passed; unit: 4,397 passed, 6 skipped (4,403 total)pnpm exec rstest --config rstest.config.ts packages/agent-bundle/tests/install.test.ts packages/agent-bundle/tests/uninstall.test.ts packages/agent-bundle/tests/doctor.test.ts packages/agent-bundle/tests/install-surface.test.ts— 170 passedpnpm docs:site:build— passed; locale drift 0, diagnostics coverage complete, 0 broken links / 28,305 anchorsDeslop
Deslop: GPT-5.6 Sol, 1 edit: removed the unreachable public-host
stateRootpurge branch.Self-review
Reviewer: Claude Fable 5.1 Thinking High.
Initial findings: the #642 recorded-
stateRootpositive branch lacked regression coverage; Doctor omitted a recorded historical root when the current environment resolved elsewhere; and the public-host positivestateRootbranch was unreachable.Disposition: fixed all three. CLI and generated-installer tests now prove recorded derived roots remain purgeable while a changed current-environment sentinel survives; Doctor lists both the current unrecorded root and recorded purgeable root and keys
AB7332recovery to the full purgeable set; public-host receipts without modern state metadata always retain current-derived roots. The final re-review at98a425d4dbfound no concrete merge risks and marked the branch safe to merge.Closes #685