Skip to content

Make the account-claim queue readable, findable, and visible to the ops bot - #272

Merged
codeforphilly-bot merged 10 commits into
developfrom
feat/claim-queue-clarity
Dec 1, 2026
Merged

codeforphilly-bot merged 10 commits into
developfrom
feat/claim-queue-clarity

Conversation

@codeforphilly-bot

Copy link
Copy Markdown
Collaborator

What

  • Each card on the staff claim queue now says, in one sentence, which GitHub user wants to sign in as which member. Both are linked.
  • Each card shows facts about the member: member since, imported from the old site or not, project count, and any existing GitHub link.
  • Each card shows one warning when approve is not possible: no member has this username, the member is already linked to GitHub, or it is an agent account.
  • Each card says in one line what approve will do, for a link and for a merge.
  • The staff note field says where the note goes. On approve it goes into the public commit log. On deny it is kept privately and not emailed.
  • The account menu has "Account claims" for staff, next to "Members roster", with the number of pending requests. The menu button shows the count too.
  • A new agent scope, account-claims:read, and a new endpoint, GET /api/agent/account-claims. It lists pending requests with only what an alert needs. It never includes the evidence, any email address, or anything from a private profile.
  • The agent-grants contract moves to v3 to add the scope.

Why

  • A volunteer could not sign in to her old account. Her first staff-review request sat for a month.
  • The queue did not say what approve does. Nothing linked to the queue. Nothing could alert staff that a request was waiting.

A spec correction

specs/api/account-claim.md said a denial reason is emailed to the requester. No code does that, and a pre-onboarding request stores no address to send to. The spec now says what deny does, and the denial email is listed in specs/deferred.md.

Before merge

  • codeforphilly-data adopts agent-grants/v3 on empty, fixture and legacy-import, and declares it on the agent-grants sheet. This PR then mirrors the new sources.toml entry.
  • At release, adopt v3 on published right before deploying. The site will not boot against a branch that still declares v2.

How to test

  • Run npm run -w packages/shared check-contracts, npm run type-check, npm run lint and npm test. Locally: API 856 tests, web 227, shared 120, all passing. check:sheet-configs was not run locally; it needs the data repo.
  • As staff, open the account menu. Check that "Account claims" shows the pending count.
  • Open /staff/account-claim. Check that each card names the GitHub user and the member, with links.
  • Find a request whose username matches no member. Check that it says so and that Approve is disabled.
  • With an agent grant that has account-claims:read, call GET /api/agent/account-claims. Check that no evidence and no email appear.
  • Call the same endpoint with a grant that lacks the scope, and with a staff session. Both should get 401.

Not in this PR

  • Emailing a denial. It is listed in specs/deferred.md.
  • Slack alerts. Those belong in the ops bot.

🤖 Generated with Claude Code

codeforphilly-bot and others added 10 commits December 1, 2026 04:26
…s bot see the queue

A staff-review claim request sat a month because the queue page named
neither side plainly, nothing linked to it, and nothing could alert
anyone. The staff queue response now carries the claimed member's facts
and the requester's current account; a screen spec says each card states
which GitHub user would sign in as which member and what approve does;
the account menu links the queue with a pending count; and an agent with
the new account-claims:read scope reads a reduced list (no evidence, no
address) to alert staff.

The deny note was specced as emailed but never was, and a pre-onboarding
request holds no address to send to: the spec now says so and the email
is listed as deferred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENT_SCOPES gains account-claims:read, which lets an agent read the
pending account-claim requests without their evidence. It has no
companion scopes. agent-grants/v3 is generated and vendored into the API
mirror (with gitsheets contracts adopt; provenance lands when the data
repo adopts from the published URL), and the sheet declares v3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-claims

The staff queue now says which member a request would act on, as it
stands now (name, created, imported, existing GitHub link, project
count, agent), and for a merge which account would be merged away. Both
feeds share one resolver, the same one approve's refusal follows.

The agent feed lists open requests for a grant with account-claims:read,
built field by field: request id, type, submitted time, the typed
username (withheld when it is not username-shaped, so a typed address
stays private), whether it resolves and to which slug, and the
requester's GitHub login. No evidence, note, address or person id.

The tests also pin where a staff note goes: an approve note lands in the
public commit's Reason trailer, a deny note never reaches the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the contract lockstep

The queue card shows what approve does only when approve is possible.
The plan's awaits and risks now say what the data repo must do and
when: the API opens agent-grants in declared mode, so v3 is adopted on
empty, fixture and legacy-import with this PR and on published at
release time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…menu with a count

Each queue card now reads as a sentence: GitHub user @login (linked to
GitHub) wants to sign in as Full Name (slug) (linked to the member page),
or, for a merge, which account would be merged away. Under it, the
member's facts (member since, imported or not, projects, GitHub link),
one warning when approve is not possible (no member has the username,
already linked, an agent account), and one line on what approve does.
The staff note field says where the note goes: into the public commit on
approve, kept privately and not emailed on deny.

The account menu's staff tools gain "Account claims" beside the members
roster, with the pending count, and the menu button carries the count
while any request waits. Members who are not staff never fetch the
queue; the queue page sends them to the 404 page like the roster does.

The mint form offers account-claims:read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…repo

Matches codeforphilly-data pull request 32 (empty).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The data repo prunes it when it adopts v3 (codeforphilly-data pull
requests 32 to 34), and the sheet-config check compares this folder
with the empty branch.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@codeforphilly-bot
codeforphilly-bot marked this pull request as ready for review December 1, 2026 16:24
@codeforphilly-bot
codeforphilly-bot merged commit 78758d9 into develop Dec 1, 2026
1 check passed
@codeforphilly-bot
codeforphilly-bot deleted the feat/claim-queue-clarity branch December 1, 2026 16:33
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