Repository navigation
fix(account): the fake ties a block's signer to its sign-in, and a refused Not me says what works - #4715
fix(account): the fake ties a block's signer to its sign-in, and a refused Not me says what works#4715devswha wants to merge 3 commits into
Conversation
…e account; the service only from the one that registered its key (red) A block kept by one sign-in and sent by a later sign-in of the same account (S32-1) is refused 403 signer_not_member by the account service (ownSigner: the key's row must be this sign-in's). The fake took it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ign-in that registered its key As the service's ownSigner does, and before the freeze check, as there: a key another sign-in registered (registerSessionKey) signs nothing on this one, a record kept already included. A key registerDevice made, which no sign-in registered, stands for the posting sign-in's, so the tests that need no sign-in of their own keep working. One contract test posted its block with a fresh token; it now posts with the sign-in that registered the phone's key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…not to block again from this device The account service's refusal of a block is final: the same device signs the same claims again. The line now says a PC that was off may still let that device in, and to block it from an older device or use Sign out every device. English, Korean, Japanese and Chinese; both places it is shown. 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 5 minutes. 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 (its review was rate limited on this PR)No CodeRabbit review ran here. I read the diff (the fake's
No finding. Product behaviour is unchanged apart from the sentence. |
|
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
Two follow-ups from the staging QA of the signed member list (F6, #4693), as the lead queued them.
1. The fake account service ties a block's signer to the caller's sign-in, as the service does.
The account service takes a block or a lift only from the sign-in that registered the signer's key
(the key's row must name this sign-in's session, and nothing else counts). The fake took a signer from
any sign-in of the account. So the fake let one case through: a block kept by one sign-in and sent by a
later sign-in of the same account. That is the S32-1 resend ("a later sign-in to the account sends
them"), and the service refuses it 403
signer_not_member.shared/account-service-fake.tschecks the signer first, as the service does, and refuses a keyanother sign-in registered (
registerSessionKey), including a record that is already kept.registerDevicewas registered by no sign-in. It still stands for one the postingsign-in registered, so the many tests that use it keep working.
server/account/one-press.contract.test.ts) posted its block with a fresh token.It now posts with the sign-in that registered the phone's key.
shared/account-service-fake.test.ts), andthe S32-1 resend from a later sign-in ending as a final refusal (
src/lib/account/unsentBlocks.test.ts).What the device should do then: send a kept block before its sign-in ends, which the sign-out prompt
already offers ("Send it now"). Once that sign-in is gone, resending cannot work; the honest line is the
one below.
2. The refusal line says what still holds and what works. "The block was refused. Block it again
from this device." asked for something that cannot work: a refusal is final, and the same device signs
the same claims again. It now reads:
The new line is in English, Korean, Japanese and Chinese. It shows under the notice (
BlockOutcomes.tsx)and in the sign-out prompt (
AccountSection.tsx, one line).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 60000on every file that posts safety records to the fake:src/App.deviceNotices.test.tsxsrc/lib/account/{unsentBlocks,account}.test.tssrc/components/{AccountDeviceNotices,AccountSection.deleteAccount,AccountSection,BlockOutcomes}.test.tsxshared/account-records.test.tsshared/account-service-fake{,.list}.test.tsserver/account/{catch-up-frozen,step2-upgrade-denial,step2-upgrade-policy,listed-lift-authority,snapshot-interval,one-press,snapshot-wiring}.contract.test.tsPlus
src/lib/i18n.test.ts,scripts/changelog-fold.test.tsand the three conventions files: all pass.The 20 files, without the changelog test, are 589 pass, 0 fail.
Red first: commit 4d3d614's two tests fail on main's fake and pass with 54390f1.
Skipped:
check integrationand the browser batteries (lead's decision).🤖 Generated with Claude Code