Repository navigation
fix(coordinator): don't make a Project move wait for a device without an Ed25519 key - #3078
Merged
Merged
Conversation
… an Ed25519 key A key that isn't SSH Ed25519 is stored with an empty key ID, which no fill ever changes. The move treated that member as having an unfilled key ID, so it refused with device_keys_missing for good and the whole older scope waited. Such a device can't sign a request on either coordinator, and scope authorization already leaves it out, so the move now leaves it out of the copy and the version gate and lists it in the log's excluded devices. An asking device with such a key is refused as not enrolled. A member whose key ID is still null keeps the move waiting, because the automatic fill reaches it.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
A Project move no longer waits forever for a device whose key isn't SSH Ed25519.
The coordinator stores such a key with an empty key ID, and no key ID fill ever changes it. The move treated that member like one whose key ID hadn't been filled in yet, so it refused with
device_keys_missingand the whole older scope waited for good.Such a device can't sync today. Both verifiers reject a key that isn't SSH Ed25519 (
sync-auth.tson Node,request-verifier.tsin the Worker), so it can't sign a request, and both stores' scope authorization already leave it out. The move now does the same:excluded_devices.device_not_enrolled.device_keys_missingnow names only members the fill can still reach. A removal record doesn't change what the move copies. A removal deletes the device's enrollment in that group only, so an enrollment of the same device in another group survives with its key ID and is copied like any other member, keeping its current access. An unfilled key ID can't match a removal record, because a removal needs every key ID filled and the enrollment triggers then refuse an unfilled one. The contract doc says all of this.Type of Change
Testing
New contract tests run on SQLite, emulated D1 and native D1, and fail on
main:source_has_no_members.The existing test that a null key ID keeps the move waiting still passes.
Disabling each of the five rules in turn makes a test fail.
103 targeted tests pass, 40 of them on native D1. The D1 statement check,
pnpm run tscand the Biome ratchet pass. The full suite runs in CI.Relevant checks pass locally (
pnpm run tsc,pnpm run lint,pnpm run test)Added/updated tests for changes
Manually verified changes work as expected
Checklist
pnpm run lintpasses for touched files)