feat(bridge): read the whole permission store (perm.inventory), and sync group parents #19

Merged
whitlocktech merged 1 commits from feat/perm-inventory into edge 2026-09-28 11:38:58 -05:00
Member

What & why

The bridge half of the permission manager (docs/modules/rust/PLAN_REDESIGNS.md §1, D160). Spec: PROTOCOL.md §19.9 (docs PR). Tracking: Module-Rust#21.

  • perm.inventory returns:

    • every registered permission with the plugin that registered it (PermissionExists(name, plugin), public API on both frameworks);
    • every group with its title (verbatim), rank, parent and permissions;
    • every holder's direct permissions and groups (not default);
    • the pairs event leases hold.

    It is built 25 sources per tick, sent in ≤700 KiB pages from one snapshot, and abandoned past 8 s (too-large). rg.inventory runs it from the console and logs it.

  • perm.sync:

    • sets parent, and writes an existing group's title and rank when they differ;
    • treats an absent title or rank as "leave it" (the adopt policy's hold), and an empty title as a title;
    • reports groupsUpdated.
  • Removed: the managed list and the foreign scan. The site reads the store and decides.

How it was tested

scripts/checkPlugin.js passes (protocol 13, 35 hooks, all void and listed). Compiled and walked on both rigs:

  • Oxide: 85 permissions, all owned, in 148 ms.
  • Carbon: 104, with the 30 adminmodule.* unowned, in 204 ms.
  • On both, zonemanager.ignoreflag.nokits belongs to ZoneManager.

Then the full site walk ran through it: imports, auto-adopt, splits, and all three policies (Module-Rust PR).

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The bridge half of the permission manager (`docs/modules/rust/PLAN_REDESIGNS.md` §1, D160). Spec: PROTOCOL.md §19.9 (docs PR). Tracking: Module-Rust#21. - **`perm.inventory`** returns: - every registered permission with the plugin that **registered** it (`PermissionExists(name, plugin)`, public API on both frameworks); - every group with its title (verbatim), rank, parent and permissions; - every holder's direct permissions and groups (not `default`); - the pairs event leases hold. It is built 25 sources per tick, sent in ≤700 KiB pages from one snapshot, and abandoned past 8 s (`too-large`). `rg.inventory` runs it from the console and logs it. - **`perm.sync`**: - sets `parent`, and writes an existing group's title and rank when they differ; - treats an absent title or rank as "leave it" (the `adopt` policy's hold), and an empty title as a title; - reports `groupsUpdated`. - **Removed:** the `managed` list and the foreign scan. The site reads the store and decides. ## How it was tested `scripts/checkPlugin.js` passes (protocol 13, 35 hooks, all void and listed). **Compiled and walked on both rigs:** - Oxide: 85 permissions, all owned, in 148 ms. - Carbon: 104, with the 30 `adminmodule.*` unowned, in 204 ms. - On both, `zonemanager.ignoreflag.nokits` belongs to ZoneManager. Then the full site walk ran through it: imports, auto-adopt, splits, and all three policies (Module-Rust PR). ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-09-28 11:26:59 -05:00
feat(bridge): read the whole permission store (perm.inventory), and sync group parents
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 9s
8b4b65249f
The permission manager (PLAN_REDESIGNS section 1, D160): the site owns every
permission and group on the server, so the bridge now reads all of it.

- perm.inventory: every registered permission with the plugin that
  registered it (PermissionExists(name, plugin), public on both
  frameworks), every group with title, rank, parent and permissions,
  every holder's direct permissions and groups (not default), and the
  pairs event leases hold. Built a slice per tick, sent in pages under
  the 1 MiB line cap, paged from one snapshot. rg.inventory logs it.
- perm.sync sets an existing group's title and rank and every group's
  parent; an absent title or rank means "leave it" (the adopt policy's
  hold). The managed list and the foreign scan are gone: the site reads
  the store and decides.

Walked on both rigs: Oxide 85 permissions all owned, Carbon 104 with its
30 adminmodule.* unowned; ZoneManager owns ignoreflag.nokits.

Refs RunicGateway/Module-Rust#21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 3f44d78944 into edge 2026-09-28 11:38:58 -05:00
whitlocktech deleted branch feat/perm-inventory 2026-09-28 11:38:58 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Rust-Plugins#19
No description provided.