Repository navigation
Conversation
…ls for them A PC pinned to its account's signed list made its account rows for the list's devices with the placeholder label "Device" (listCommit, LIST_DEVICE_LABEL) and no system, so its Devices list showed each as "Device · Browser". The names are sealed in the list's entries under the epoch key, which a PC is given a wrap of when a member adds it (and which it already uses to seal names it writes). ListFollow now opens, once per entry and in its own turn, the name the list sealed for each of its devices with the epoch key it holds (epochKey, quietly: a service that does not answer leaves the rows unnamed and sets no error), and writes the rows again when one opened. listCommit takes those names; AccountDevices.commit replaces only the "Device" placeholder of a row, never a name a person gave it at the PC. An entry it cannot open keeps "Device". Names decide nothing: whom the PC lets in is still the list's alone, and no name leaves the PC that did not before. Co-Authored-By: Claude Opus <[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 44 seconds. 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. |
Independent review standing in for CodeRabbit (rate limited on this PR)A reviewer who was given the code and not the author's conclusions read this branch and tried to break it. One finding blocks the merge (narrow: a removal can be read late while names are being opened) and one should be fixed; the PR stays on hold until they are closed, and how each was closed is added here. D1. BLOCKS MERGE (narrow): naming holds the follower's queue across account-service calls, so a removal is not read Probe
So a removed key gets a session for as long as the naming holds the queue, against the pinned-PC rule at D2. SHOULD FIX: a name skipped once is never tried again. PROVED. Probe
Fix: only mark an entry tried when its open was decided (opened, or no sealed name, or no wrap the service has for NOTE D3. PROVED. A person who names a row NOTE D4. TRACED. The label replacement ( NOTE D5.
The client shows the same labels by the same rule ( Questions checked (#4714)
|
Review of #4714 (D1, D2). Opening the names the list sealed for its devices ran on the follower's turn, the queue a read takes, and asked the account service for a wrap once per entry. With a slow or failing wraps route a removal was not read before a session opened: a pinned PC's sign-in waits five seconds at most for a fresh read. The wraps calls and opens now run outside the turn; the turn is taken only to keep the names and write the rows again. A round asks the service once per epoch. An entry counts as tried only once its open was decided (opened, no name sealed, no wrap held for its epoch); one the service could not be asked about is asked again in a round a minute on. A new copy of the same list keeps the round's names: only another list drops them. settled() waits for the round too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review of #4714 (D4, D3). The replacement of a row still named "Device" sat in AccountDevices.commit, which a snapshot read takes too, so on a PC that follows no list such rows took the account service's label on each read. A ListCommit now says when its labels are the list's names (names: true, set by listCommit), and only such a commit renames rows. docs/account-list.md says how the names are asked for (outside the follower's turn, once per epoch, again a minute later), that a row a person named "Device" or cleared takes the list's name, and that a PC that follows no list keeps its rows' labels. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review fixes at
|
Closure check by the independent reviewer at 3396e93The reviewer re-ran its probes and the new tests on the two fix commits. D1 to D4 are closed (the removal probe now reads the removal in 30 ms; one wraps call per epoch per round), D5 stays a follow-up as ruled, and the fix reads no removal late by any other path. I read the two new commits (3fe5c7d, 3396e93) in a fresh detached worktree, since removed.
Per finding:
What the fix itself could break:
New notes (no BLOCKS MERGE or SHOULD FIX):
|
|
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. |
…to the list (#4741) ## Summary A PC added to its account's signed list after the list's epoch moved (after a removal) showed the devices let in before it came as `Device` in Settings › Devices and PCs, for good, also after a restart (signed-list staging QA, the pinned Mac). A newcomer to the list is given wraps of the epoch it comes in at and of later ones only. A name sealed in an earlier epoch is read through the links the list's `epoch` entries carry: each epoch key encrypts the one before (docs/account-list.md, "epoch_link"). Devices already read names that way (`src/lib/account/listNames.ts` `openEpochs`). The PC's naming (`server/account/list-follow.ts`, from #4714) used only a wrap of the exact epoch and never walked the links. `epochKeyOf` now handles an epoch before the PC's own wraps: - it opens the nearest later wrap the PC holds; - it walks back to that epoch with the shared `walkBack` (`shared/account-list-seal.ts`), checking each key against the commitment in the PC's verified copy; - it keeps every key the walk reaches. The devices' `openEpochs` lives in `src/`, which the server does not import, so the shared primitive is reused and nothing is moved. What the walk cannot reach (a link missing, or one that does not open) stays final, with no error and no further call, as before. Also in this PR: - the test helper `TestList` gains `nextEpoch()` (a good or a broken link) and seals under its current epoch; - docs/account-list.md corrects a sentence that said this would need the account service; - the names changelog fragment says it. ## Who can open a PC Nothing changes. This is names only: - The walked keys go into the cache the PC opens names with. - That cache's sealing callers seal and wrap only under the current epoch, whose key is still the PC's own opened wrap. - Nothing that decides admission or removal reads these keys. - No new call to the account service is made (the walk is local crypto, bounded by `LIST_EPOCH_WALK_MAX`), and nothing runs on the follower's turn. ## Review An agent's independent review stands in for the human review. It read this change at `9d250943f`, before the rebase onto main; the rebased commit is the same change (the diffs' added and removed lines are identical). All four questions were closed: 1. Names only. 2. Each walked key is checked against the PC's own verified copy. 3. A removed device is never named, and no removed member's label comes back. 4. No new call, loop or work in the follower's turn. ## Validation `bun run check fast` and the browser batteries did not run locally. On the rebased head (on main `e897294ac`): - `bun run typecheck` is clean. - Every test file under `server/account/` and `server/relay/` ran one file per process, three at a time, with a 900 s limit per file. The same run covered `scripts/conventions.test.ts`, `src/conventions.test.ts`, `server/conventions.test.ts` and `scripts/changelog-fold.test.ts`: 143 files. - 136 passed in that run. Seven failed only under the parallel load and each passed when run alone afterwards: - six with "herdr session.snapshot timed out after 10000ms": `step2-upgrade.contract`, `step2-upgrade-turnover.contract`, `step2-upgrade-v056.contract`, `unknown-key-signin.contract`, `waiting-block-list.contract`, `witness.contract`; - one timing test at 10.6 s: `server/relay/session-ws.contract.test.ts`, "drops a key not yet typed when the phone closes the socket". The two new tests in `server/account/list-pinned.contract.test.ts`: - "a PC added after the epoch moved names a device sealed in an earlier epoch" fails without the change; - "a link that does not open leaves the row Device for good" pins the final rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What
A PC pinned to its account's signed list made its account rows for the list's devices with the placeholder label
Device(listCommit,LIST_DEVICE_LABEL) and no system, so its Settings › Devices and PCs listed each as"Device · Browser · Through your account" (signed-list staging QA). The names are sealed in the list's entries
under the epoch key, which the PC is given a wrap of when a member adds it, and which it already uses to seal the
names it writes.
ListFollownow opens the name the list sealed for each of its devices with the epoch key it holds, and writes therows again when one opened.
listCommittakes those names (and says so:names: true), andAccountDevices.commitreplaces only the
Deviceplaceholder of a row, never a name a person gave it at the PC, and only on such a listcommit: a PC that follows no list keeps the labels its rows came in with. An entry it cannot open keeps
Device.The kind ("Phone", "Browser") follows from the name as it does for every row.
How the names are opened (after the review, D1 and D2):
is taken only to keep the names and write the rows again, so a read (a removal before a session opens) never
waits for them;
the service could not be asked about is asked again in a round a minute later; a new copy of the same list keeps
the round's names, only another list drops them.
Names decide nothing: whom the PC lets in is still the list's alone, and no name leaves the PC that did not before
(the rows are the PC's own, shown to the devices that may read them, which can open the same names themselves). A
row a person named
Deviceat the PC, or cleared, takes the list's name: the PC tells it from the placeholder bythe label alone (docs/account-list.md says so).
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.At
3396e93f0:bun run typecheck(clean), thenserver/account/account-devices.test.ts server/account/list-allow-review.contract.test.ts server/account/list-allow.contract.test.ts server/account/list-follow.test.ts server/account/list-join.contract.test.ts server/account/list-migrate.contract.test.ts server/account/list-notice-lifecycle.contract.test.ts server/account/list-pinned-review.contract.test.ts server/account/list-pinned.contract.test.ts server/account/list-shadow.contract.test.tswith the threeconventions.test.tsfiles andscripts/changelog-fold.test.ts(445 pass, 0 fail), and the other tests that use alist commit (
observed-use-session.contract,observed-use,join-hold,catch-up,account-rows-signin,account-rows-listed.contract: 62 pass). The three review tests (the removal read while the wraps route is held,a name asked for again, the placeholder kept off the list path) fail on the head before the fix. Not run: the unit
suite, the integration suite, the browser runs.
🤖 Generated with Claude Code