GeezerVison is showing github.com — id(phase-14): wire quota ledger into PolicySession (#8301, slice 2) by dezren39 · Pull Request #14474 · developing-today/code
Conversation
dezren39
commented
Nov 24, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Slice 2 of #8301 (per-agent quota ledger). Slice 1 landed as #14329.
What
PolicySession charges through AgentQuotaLedger (per-(agent, world)) instead of a per-session spend counter.
RoleGrant carries the role name and the role's QuotaClass (budget + replenishment) in place of a bare quota.
PolicySession::new opens the ledger at a given now.
- Exhaustion parks the agent;
ParkEvent now names the replenishment time (replenishes_at), and the refusal detail carries it.
spend(now) and owner_summary(now) read spend after replenishment (AgentQuotaLedger::spend_at).
Tests
cargo test -p id-caps --lib: 287 passed (adds replenishing_quota_parks_naming_the_next_tick).
cargo fmt -p id-caps -- --check: clean.
cargo test -p id --test mcp_spike_e2e cannot build in this worktree: pre-existing id-store compile errors unrelated to this change (E0514/E0308 in id-store, untouched here). The e2e test was updated for the new RoleGrant/spend(now)/owner_summary(now) shapes but is unverified here.
Remaining for #8301
Refs #8301 (not closing).
{
"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-24T16:28:51Z",
"session_id": "ses_e5df1b6e95fffeua7o6DHULZtH",
"lane": null,
"host": "amd",
"worktree": "/home/user/git/code-i-8301",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/code-i-8301",
"repo": "developing-today/code",
"branch": "code-i/id-quota-ledger-8301",
"sha": "8916bdb8709173164ce8dd4c19dbd3587f785ed0"
},
"auth_subject": "oc-code-08",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…#8301)
Slice 2 of #8301. PolicySession charges through AgentQuotaLedger instead
of a per-session spend counter. RoleGrant carries the role name and its
QuotaClass; the ledger is opened at session start. Exhaustion parks the
agent and the ParkEvent names the replenishment time. spend and
owner_summary read spend as of a given time.
Not in this slice: world-store persistence across leave/rejoin, the
F12.10 (#1067) event-shape test, and the per-agent owner view.
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 30 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:
536cc28f-130c-486a-8fcc-9f6085181830
Commits
-
Reviewing files that changed from the base of the PR and between 26795ce and 8916bdb.
Files selected for processing: 4
-
pkgs/id/crates/id-caps/src/agent_quota_ledger.rs
pkgs/id/crates/id-caps/src/mcp_policy.rs
pkgs/id/crates/id-caps/src/role_config.rs
pkgs/id/tests/mcp_spike_e2e.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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|