Skip to content

id-caps: role definitions as first-class versioned world config (#8299) - #14044

Merged
developing-today-fleet[bot] merged 2 commits into
mainfrom
lane-any-n-8299-port
Nov 24, 2026
Merged

developing-today-fleet[bot] merged 2 commits into
mainfrom
lane-any-n-8299-port

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Successor port of #13234 (DIRTY/conflicting) rebased as c2cc491 + clippy allow (af216ad).

Closes #8299 (phase-14 v2 step 1; parent #6301).

What:

  • New id-caps module role_config: RoleDefinition (validated, versioned via RoleRegistry upsert), QuotaClass/Replenishment/ReviewPolicy, RoleGrant + RoleConfigEvent audit (role.create/edit/grant/revoke, refusals included), starter_roles() = observer/participant/archivist-editor.
  • Additive PolicySession::refresh_ceiling (lowered ceiling refuses next frame); Deserialize derives on WorldScopes/Quota so definitions embed in world config.

Verification (any-n, 2026-11-24, worktree at af216ad):

  • cargo test -p id-caps --lib: 257 passed (incl. 4 role_config tests)
  • cargo test -p id-worlds --lib: 969 passed
  • cargo fmt -p id-caps --check: clean

Supersedes #13234 (original gate PR, mergeState DIRTY).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T03:20:42Z",
    "session_id": "ses_e5df4a59a42ffeXKJ6PUo45ayY",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "queue/21628-12215-program-run-history-decision",
      "sha": "145013c3c695f2b74341692685eaedb51a2c755a"
    },
    "auth_subject": "any-n",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

dezren39 and others added 2 commits November 23, 2026 16:42
Ports the #13234 implementation onto the reconciled policy point
(#13202 deleted agent_policy.rs into mcp_policy.rs after the PR
branched): RoleDefinition/QuotaClass/Replenishment/ReviewPolicy as
serde world config, versioned RoleRegistry upsert, explicit
grant/list/revoke with every mutation (refusals included) recorded
as RoleConfigEvent, observer/participant/archivist-editor as plain
editable starter definitions, and PolicySession::refresh_ceiling so
a lowered ceiling refuses the newly out-of-ceiling action on the
next act() frame check. WorldScopes gains the serde round-trip the
role ceiling embeds in.

Verified: id-caps lib suite 257 passed (incl. 4 role_config tests),
id-worlds lib suite 969 passed, cargo fmt clean.
PolicyRefusal carries the full park event; refresh runs at owner-operation cadence, never in a hot path. Precedent: id-groups scheme.rs.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 460642ff-3f54-4c85-b217-b6b68abe7bbc
Commits

Reviewing files that changed from the base of the PR and between 95156cc and af216ad.

Files selected for processing: 4

  • pkgs/id/crates/id-caps/src/lib.rs
  • pkgs/id/crates/id-caps/src/mcp_policy.rs
  • pkgs/id/crates/id-caps/src/role_config.rs
  • pkgs/id/crates/id-caps/src/world_scopes.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

id(phase-14) v2 step 1: role configuration — roles as first-class world config (#6301)

1 participant