Repository navigation
fix(shared): a device that handed its place to another key of its own is still in - #4605
Conversation
… is still in In a list that carries an account in, a device comes in by its sign-in key and then hands its place to its account key with one entry that adds that key and ends its own signer. The follower read a device's standing at the key it came in by, so the device read as out from its own hand-over on. It is read now at the key that stands in its place (standsFor): itself, or the last key it handed its place on to. What a pin asks for is still read at the key the member came in by, which the save keeps. The words on the migrated pin follow how a PC comes to it now: its admitted keys are entry 0's signer and every key the list carries in, checked for it before the pin. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
Merged through One line in the follower: a device's standing is read at the key that stands in its place now (after a hand-over to its account key), not at the key it came in by; the pin's own condition and the save keep the key it came in by. It only matters for a list born by migration, which no account has (a service switch, empty). The failing test came from the migration design's own review and is now in the follower's suite; a PC's standing and |
What
A device that handed its place to another key of its own is still in, by the follower's reading (
standinginshared/account-list-follower.ts).In a list that carries an account in, a device comes in by its sign-in key (entry 0's signer, or a key that was carried in) and then hands its place to its account key with one
deviceentry that adds that key and ends its own signer. The follower keeps the key a member came in by (me.key) and read a device's standing at that key, so the device read asoutfrom its own hand-over on, showed no PC and read no more.standingreads whether a device is in at the key that stands in its place now (standsForinshared/account-list-migrate.ts, on main since feat(shared): moving an account that was in use onto its signed list, the pure part #4596): the key itself, or the last key it handed its place on to. A device removed after its hand-over isout, whichever key the removal named, and a key that was only removed handed its place to nobody.genesis: entry 0 is signed by its key;carried: its key was carried in) is still read at the key the member came in by, which the save keeps. Nothing in the save changes.admitsSessionare untouched: a PC admits whatever key the list holds as a device, so it already lets the new key in and refuses the old one.migratedpin follow how a PC comes to it now: itsadmittedkeys are entry 0's signer and every key the list carries in, checked for it before the pin.Why
The case is the migration's (P14): every device of an account that was in use before it had a list goes through this hand-over. The test is the one the migration lane wrote for it, taken into the follower's suite.
Validation
bun run check fast: green (unit 26431 pass / 0 fail, typecheck, build).bun test shared/account-list-follower.test.ts: 96 tests; the new one failed before the change (both devices readout).Known limits
🤖 Generated with Claude Code