Skip to content

fix(coordinator): don't make a Project move wait for a device without an Ed25519 key - #3078

Merged
kunickiaj merged 1 commit into
mainfrom
fix/project-move-unkeyable-members
Nov 29, 2026
Merged

kunickiaj merged 1 commit into
mainfrom
fix/project-move-unkeyable-members

Conversation

@kunickiaj

@kunickiaj kunickiaj commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

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_missing and 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.ts on Node, request-verifier.ts in the Worker), so it can't sign a request, and both stores' scope authorization already leave it out. The move now does the same:

  • It leaves such a member out of the copy and the version gate, and lists it in the log row's excluded_devices.
  • An asking device with such a key is refused as device_not_enrolled.
  • A member whose key ID is still null keeps the move waiting, as before, because the automatic fill reaches it. Signed revocation checks fill up to 200 at a time on both coordinators, and a SQLite coordinator fills them all when it starts.

device_keys_missing now 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

  • 🚀 Feature (new functionality)
  • 🐛 Bug fix (fixes an issue)
  • 📚 Documentation (docs-only change)
  • 🔧 Maintenance (refactor, chore, CI, etc.)
  • 🧪 Testing (test-only changes)

Testing

  • New contract tests run on SQLite, emulated D1 and native D1, and fail on main:

    • a member without an Ed25519 key, whose device never advertised the move feature, is left out. The move commits with the other member and logs it as excluded.
    • such a member that the request also excludes is logged once.
    • a move whose only members have no Ed25519 key is refused with source_has_no_members.
    • an asking device without an Ed25519 key is refused as not enrolled.
  • 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 tsc and 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

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation updated (if needed)
  • No new warnings introduced

… 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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T05:41:05.392132Z d1c7b95 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kunickiaj
kunickiaj merged commit 224bd29 into main Nov 29, 2026
23 checks passed
@kunickiaj
kunickiaj deleted the fix/project-move-unkeyable-members branch November 29, 2026 05:56
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