Skip to content

fix(account): the fake ties a block's signer to its sign-in, and a refused Not me says what works - #4715

Closed
devswha wants to merge 3 commits into
mainfrom
fix/not-me-refusal-followup
Closed

devswha wants to merge 3 commits into
mainfrom
fix/not-me-refusal-followup

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

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.ts checks the signer first, as the service does, and refuses a key
    another sign-in registered (registerSessionKey), including a record that is already kept.
  • A key made with registerDevice was registered by no sign-in. It still stands for one the posting
    sign-in registered, so the many tests that use it keep working.
  • One contract test (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.
  • New tests (red on main's fake): the fake's own rule (shared/account-service-fake.test.ts), and
    the 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 account service did not take this block, so a PC that was off may still let that device in.
Block it from an older device, or use Sign out every device.

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 fast was 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 60000 on every file that posts safety records to the fake:

    • src/App.deviceNotices.test.tsx
    • src/lib/account/{unsentBlocks,account}.test.ts
    • src/components/{AccountDeviceNotices,AccountSection.deleteAccount,AccountSection,BlockOutcomes}.test.tsx
    • shared/account-records.test.ts
    • shared/account-service-fake{,.list}.test.ts
    • server/account/{catch-up-frozen,step2-upgrade-denial,step2-upgrade-policy,listed-lift-authority,snapshot-interval,one-press,snapshot-wiring}.contract.test.ts

    Plus src/lib/i18n.test.ts, scripts/changelog-fold.test.ts and 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 integration and the browser batteries (lead's decision).

🤖 Generated with Claude Code

devswha and others added 3 commits November 25, 2026 16:50
…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]>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b0f20e7 and 99311a9.

Files selected for processing: 11

  • changelog.d/not-me-refusal-wording.md
  • server/account/one-press.contract.test.ts
  • shared/account-service-fake.test.ts
  • shared/account-service-fake.ts
  • src/components/AccountSection.deleteAccount.test.tsx
  • src/components/AccountSection.tsx
  • src/components/BlockOutcomes.tsx
  • src/lib/account/unsentBlocks.test.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

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 safetyRecord, the two places the sentence shows, the four language entries, the tests).

  • The fake follows the service: a block's signer must be the key the posting sign-in registered (the service's ownSigner), checked before anything else, a kept record included. A key made by registerDevice, which no sign-in registered, still stands for the posting sign-in's, so the tests that never sign in keep working; that gap is named in the code comment. Test infrastructure only: no product code path reads the fake.
  • The sentence: "The block was refused. Block it again from this device." asked for something that cannot help once the service refused for good. The new one says what is true (a PC that was off may still let that device in) and what does help (an older device, or Sign out every device), in four languages.

No finding. Product behaviour is unchanged apart from the sentence.

@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

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 main with these branches merged in. The reason is CI capacity: twelve separate runs and twelve merges, each waiting for Fast checks on a new base, had filled the self-hosted runners for every session.

The description, the tests and the review of this change stay here; #4723's table links back to it.

@devswha devswha closed this Nov 25, 2026
@devswha
devswha deleted the fix/not-me-refusal-followup branch November 25, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant