Skip to content

Store: members CLI, audited membership, reassign memberships, enum filters; declared targets in validate/capabilities (#866, #867) - #876

Merged
jimhoyd merged 3 commits into
mainfrom
claude/membership-cli-and-targets
Sep 29, 2026
Merged

jimhoyd merged 3 commits into
mainfrom
claude/membership-cli-and-targets

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #866 and #867.

Store (#866)

  • urlcode-store members add|remove|list --database --project --collection [--principal] prints JSON and is safe beside the running server. --project is required, because the declared collection (key field, audit, limits) comes from it, as it does for reassign.
  • Audited membership (decision for 866.2). A membership: true collection may declare audit: true.
    • Every grant and revocation writes store.membership.added or store.membership.removed in the same transaction as the change. That covers the CLI, the library functions, StoreExports and reassign.
    • Operator changes use the actor operator.
    • I chose this over audit events from the CLI only, because every path that changes membership already goes through the audited-write step, and events from extension code would otherwise be missed.
    • Breaking: changing a membership record's key is now 400. Remove the member and add the new one, so each change is its own event.
  • reassign moves membership entries with the records. If the target is already a member, the source entry is deleted. The report adds memberships.
  • Enum filters: a value outside a field's enum is 400 invalid_query on owner and readers mounts. Breaking: it used to return an empty page.
  • Requester visibility (decision for 866.5): the opt-in readers.showOwner: true adds the owner's opaque principal id as _owner on the readers mount only. It is hidden everywhere else. The privacy trade-off is documented in the store's SECURITY.md.

Core (#867)

  • urlcode validate --target <t> (default self-hosted), run without --host-file, refuses an extension whose installed descriptor doesn't declare that target.
  • In a project, urlcode capabilities answers the extension rows from the installed descriptors, falling back to the release catalog.

Fix found during rebase

My first showOwner implementation built the readers list response by hand and dropped #872's per-record etags. It now goes through listView, and a test asserts etags on readers lists with showOwner.

Evidence (macOS, Node 26)

Remaining gaps are in #875.

🤖 Generated with Claude Code

jimhoyd and others added 3 commits September 28, 2026 18:53
…ips, enum filters, declared targets in validate (#866, #867)

- urlcode-store members add|remove|list, beside the live server.
- Membership collections may declare audit: true; every grant and revocation
  (CLI, library, StoreExports, reassign) writes its event in the same
  transaction. Changing a membership key is refused.
- reassign moves membership entries with the records it moves.
- A filter value outside a field's enum is 400 invalid_query.
- readers.showOwner: true exposes the owner's opaque id to members only.
- urlcode validate (--target) and urlcode capabilities use installed
  descriptors' declared targets without a host file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Owner

The readers mount built its list answer by hand to keep _owner, which dropped
the etags map #872 adds to every list response. It now goes through listView
with the readers projection, and the showOwner test asserts the etags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Membership follow-ups: members CLI, audited membership changes, reassign, enum filter validation, requester visibility

1 participant