You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Account: a tombstone cleared in one state dir can come back from the sibling merge #2863
Follow-up from #2843 (account linking). Not reproduced end to end; found in review.
Where two state dirs share one device registry (server/state-merge.ts), mergeAccountTombstones writes the union of both dirs' account-tombstones.json. A local pairing that clears a key's tombstone in one dir does not clear it in the other, so the next merge brings it back. The start-up repair then keeps the newly paired row (it is newer than the tombstone), but a later signed add for that key is refused as tombstoned.
Expected: a cleared tombstone stays cleared across the merge, for example by recording the clear (key and time) and letting the later of removal and clear win.
I couldn't reproduce this on the account branch, so I'm closing it as not a bug.
When two state dirs share one device registry, the merge does bring the other dir's tombstone back. But the merged registry also carries the row paired again in the first dir. At start, the PC drops a tombstone whose key has a row paired after the removal (finishInterruptedWrites in server/devices.ts). So the key stays paired, with no tombstone, whichever dir starts next.
The refused add from the description can't happen either: an add for a key that already has a row changes nothing.
The scenario is now a regression test, "a key paired again in one of two state dirs stays paired, without its tombstone, when the other starts", in the PR for #2865.
Activity
devswha commentedon Nov 5, 2026
I couldn't reproduce this on the account branch, so I'm closing it as not a bug.
When two state dirs share one device registry, the merge does bring the other dir's tombstone back. But the merged registry also carries the row paired again in the first dir. At start, the PC drops a tombstone whose key has a row paired after the removal (
finishInterruptedWritesinserver/devices.ts). So the key stays paired, with no tombstone, whichever dir starts next.The refused
addfrom the description can't happen either: anaddfor a key that already has a row changes nothing.The scenario is now a regression test, "a key paired again in one of two state dirs stays paired, without its tombstone, when the other starts", in the PR for #2865.
fix(account): keep no tombstones on a PC in no account (#2928)