Repository navigation
test(store): a bundle import never lets a stale bare-account record hide a strand (T13378) - #1997
Merged
Merged
Conversation
…ide a strand (T13378) Regression test for the premise behind T13378: a project whose _exodus_recovery_bare_accounts record no longer matches its bare table is exported and imported, and the imported store still reports the strand and refuses sync enable. legacyStrands re-checks row count and key digest on every call, and import places cleo.db whole from one snapshot, so no runtime change is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjjTKbQXyCFdkLBSeuyKLt
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
This is a regression test only, with no runtime change. review-hotfix (on #1982) suggested that a portable bundle import could keep a stale
_exodus_recovery_bare_accountsrecord, which would then vouch for a stranded bare row and let sync enable. I probed it, and the premise is false:legacyStrandsre-checks each record's row count and key digest against the bare table on every call (isAccounted), andsetSyncFlagruns it before enabling. A stale record never suppresses a strand.cleo.dbwhole, from oneVACUUM INTOsnapshot. Its bare tables and its record always come from the same moment. Vault restore differs: its bare tables are local-only and carried in from this machine, which is whysettleRestoredBareAccounts(fix(vault): a restore settles the reconcile record against the restored bare tables (T13324) #1982) lives there. That settle keeps a matching record; it isn't a guard against suppression.The new test in
portable-bundle.test.tsdoes the following:task_labelsgained a row after the record was written);legacyStrandsreportstask_labels(missing 2) andsetSyncFlag(…, true)throwsLegacyOnlyStoreError.It doesn't depend on #1982, so it's based on main.
T13378's runtime ACs were dropped with this evidence (team-lead option 1), and the evidence is noted on T13324.
Verification
portable-bundle.test.tspasses (10).isAccountedthat trusts any record fails the new test.pnpm run typecheck(tsc -b), build, gate 39 and skill coverage--base origin/mainall pass.Closes T13378.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VjjTKbQXyCFdkLBSeuyKLt