Repository navigation
Conversation
…a PC numbers the device apart (F6, red) A device presses Not me on a PC's notice for the account's fourth device, in an account with no list on the migrate switch. The PC numbers its own admissions (admit_no), so its notice says 5; the block claims target_no 5 and the account service refuses it 403 unknown_target, while the PC takes it. Red: the page shows the account's refusal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cks (F6) A PC's admit notice carries the PC's own admission number (admit_no), which counts every device that PC ever let in. The account service holds a block's target_no to its own number of the key and refused the block (403 unknown_target) whenever the two ran apart, so a PC that was off never got the block and the device's sign-in stayed. The press now asks the account service for the target's number (GET /v1/devices, five seconds) and signs that. Who may sign is unchanged (canBlockAdmission), the PCs still judge by their own order, and a lookup that fails or names nothing signs as before, with the notice's number. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… good A final refusal of a Not me block was not logged at all, so the staging QA saw a bare 403. The device's log now names the refusal's code (unknown_target, signer_not_older, ...). Co-Authored-By: Claude Opus 5.5 <[email protected]>
… list (F6) Pins what the staging QA asked: a block the account service refused for good stays in unsent_blocks marked refused and its target in own_blocks, the birth goes at once and leaves the blocked key out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Review standing in for CodeRabbit (it skipped this PR)This PR touches a safety action (the block a device signs for "Not me"), so it gets a read before the merge. I read the whole diff at 966f381. What I checked
Left for a follow-up (not in this PR)
No finding that blocks the merge. The staging QA re-runs the same sequence after the merge. |
|
Closed in favour of #4723, which merges this branch together with the other fixes the signed-list staging QA asked for. Nothing of this pull request was dropped: #4723 is The description, the tests and the review of this change stay here; #4723's table links back to it. |
Summary
Staging QA (F6): "Not me" on a new device's notice blocked it on the PC that showed the notice, but the
account service refused the same signed block with a 403. The block never reached the account, so a PC
that was off never got it and the device's sign-in stayed.
Cause. A PC's admit notice carries the PC's own admission number (
row.origin.admit_no,server/account/account-devices.ts), which counts every device that PC ever let in, across pairingsand readmissions.
notMeBlockssigned that number as the block'starget_no. The account service holdstarget_noto its own number of the key and answers403 unknown_targetwhen they differ. The PCs readthe numbers only as claims and judge by their own order, which is why the PC took the block.
The QA lane confirmed it on staging: the PC's journal admitted the new device as number 5, while the
account's number for it is 4.
This is old, not part of the 0.5.10 list work: v0.5.9 has the same
notMeBlocksand the same noticenumber. It shows wherever the account's safety route is open and a PC's count runs apart from the
account's numbers.
Fix (client only). The press asks the account service for the target's number
(
AccountService.deviceNo,GET /v1/devices, five-second timeout) and signs that astarget_no.canBlockAdmissionstill decides, before the lookup, and the account'snumber never widens it (test).
number as before. A slow or missing account service never holds a block back from the PCs.
order,
server/devices.tscommitBlock) expects the account's numbers, which it now gets.device leaves the blocked key out and starts the move at once.
Not in this PR
canBlockAdmission) still compares this device's account number with the PC'sadmission number. It is left alone because changing it changes who is offered Not me. A PC could put the
account's number in its notice, but that is a wire change.
A block kept by one sign-in and resent by a later one passes the fake and is refused by the service.
cannot work. New wording is proposed to the lead; it needs four i18n files.
Validation
bun run check fastwas not run locally: the PC's heavy queue did not open for over an hour (load above 150); ran the typecheck, the convention tests and the touched test files; CI's Fast checks run the unit suite.bun run typecheck: passes.bun test --timeout 60000onsrc/components/AccountDeviceNotices.test.tsx,src/components/AccountDeviceNotices.list.test.tsx,src/lib/account/fleet-block.test.ts,src/lib/account/account.test.ts,src/lib/account/unsentBlocks.test.ts,src/lib/account/listMigrate.review.test.ts,src/lib/account/listMigrate.service.test.ts,scripts/conventions.test.ts,src/conventions.test.ts,server/conventions.test.ts: 256 pass,0 fail.
src/components/AccountDeviceNotices.test.tsx"F6: Not me claims the account's number ofthe device ..." fails on main (commit 6e83d0c alone): the page shows the account's refusal. The test
drives the page's own press against the fake account service, with an account that has no list and is on
the migrate switch, four registered keys, and a PC notice that numbers the fourth as 5. It passes with
the fix.
target_nowith403
unknown_target, as the service does.check integrationand the browser batteries (lead's decision; no server, shared orlayout change).
🤖 Generated with Claude Code