Skip to content

desk-hub: an admin reads another member's pending devices (O8's H1) - #306

Merged
SSFSKIM merged 2 commits into
masterfrom
p5-o11-h1
Oct 28, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
p5-o11-h1

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

O8's H1 (docs/doperpowers/plans/2026-10-28-p5-o8-org-interface.md, M4's "H1, the shape the desk track builds" and Interfaces §I), so O8's M4 can have an admin enroll a member's first device.

GET /api/devices/pending?member=<member id>:

  • no member, or the caller's own id: the caller's entries, as today, through today's pendingDevices;
  • another member's id: the Registry's new pendingDevicesOf checks the caller with current(you, 'admin') (403 not-admin otherwise, checked before the id is looked up, so a member's refusal says nothing about who is listed), answers 404 no-member for an id the head's members table doesn't list (a removed member's entries, which stay stored until they expire, included), and otherwise returns that member's PendingDevices as stored, MAC unchecked;
  • posting stays the member's own; nothing else changes.

The deploy window. A Worker on this code can reach a Registry still on the old code for minutes after a deploy. An extra argument to pendingDevices would be dropped there, and the old Registry would answer the caller's own entries for another member's id. So the other-member read is a method of its own: an old Registry lacks it, and the Worker's existing failure() handling answers 503 hub-updating. An own-id read stays on pendingDevices and still answers during the window.

Tests (written first; all four new cases failed on the old code, where the admin's read of another member came back as the admin's own []):

  • test/org-members.test.ts, the pairing exchange: a member with no device posts an entry, and an admin reads it as the member does; with no id the admin still gets only its own entries; own id, for an admin and for a non-admin, answers as no id does; a non-admin asking for another member, or for an unknown id, gets 403 not-admin; an admin asking for an unknown id gets 404 no-member, and for a removed member whose entry is still stored, also 404 no-member.
  • test/org-boundaries.test.ts: pendingDevicesOf joins the admin-only calls a member resolved before a demotion or a removal is refused (not-admin, not-a-member); and under "a route this code added", a Registry lacking pendingDevicesOf answers another member's id 503 hub-updating while the own-id read answers 200.
  • test/support/worker-under-test.ts: the suites' Registry can be armed to lack pendingDevicesOf.

Review: doperpowers:reviewer-high on the range, no material findings.

Gate at 29847c5d4d1021c65aec9461b8e8810b9f1a1efc (--runner macos --class1a pool --lane hosted; the first run's warning added e2e:desk-web):

  • 40734774927: static, unit 1-4, probes and e2e:desk-web-hub green. e2e:desk-web was red on one case, apps/desk-web/e2e/phone.spec.ts:315 (the launch turn's .transcript-subagent row count was 0).
  • 40738573189: e2e:desk-web alone, green (198 passed, phone.spec.ts:315 included, no retry).
  • No flaky: line in any run.
  • Why phone.spec.ts:315 is a flake and not this change: desk-web's built dist/ is byte-identical to master's (checked locally). The specs reach only a comment in identity.ts. Master passed the group on the pool in 40736930383.
  • The first full run, 40731902045, was red on that case too. It was also red on the known src/engine-host/ipc.test.ts artifactScope flake (docs/tech-debt-tracker.md, the "Unit flakes" row), which passed on the next run.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)

GET /api/devices/pending?member=<member id>. No id, or the caller's own,
answers as today. Another member's id is an admin's: the Registry checks
the caller with current(you, 'admin') (403 not-admin otherwise, before
the id is looked up), answers 404 no-member for an id the head doesn't
list, and otherwise returns that member's entries as stored, MAC
unchecked, for the admin's app to judge. Posting stays the member's own.

The other-member read is its own Registry method, pendingDevicesOf, not
an argument of pendingDevices: a Registry still on the code before it
(a deploy's first minutes) would drop the argument and answer the
caller's own entries for another member's id. Lacking the method, it
throws, and the Worker answers 503 hub-updating.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T17:05:49.674512Z 29847c5 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.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 4099201 into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…ending devices); O11's route table; the desk-web phone flake row

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
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