You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dedup(id-caps): two policy-point implementations landed for #7916 (mcp_policy + agent_policy) — reconcile to one before step 5 #13202
Spike step 4 for #6300 (issue #7916, the host-side policy point) was implemented twice in parallel and both implementations are now on main:
pkgs/id/crates/id-caps/src/mcp_policy.rs — via PR #13192 (Lane QE, merged 2b8a3e535e42, 2026-11-23T10:32:35Z): a PolicySession wrapping BridgeSession, running tool calls through ceiling → quota → audit.
pkgs/id/crates/id-caps/src/agent_policy.rs — via PR #13182 (Lane PV, merged c22ec1948eb4, 2026-11-23T10:37:54Z): a standalone PolicyPoint opened from the verified JoinGrant, with the §7 hash-chained, host-signed audit log, owner summaries, and the agent_parked world event type.
Reconcile to one policy point before step 5 (#7917) builds on it:
Pick the surviving shape. The two are complementary, not identical: mcp_policy has the bridge-session integration the spike run will drive; agent_policy has the §7 signed/hash-chained audit chain with tamper verification, owner-summary rendering, and the standalone park-event type. The survivor must carry all of: ceiling from the role grant, quota charged before execution with visible parking, per-tool rate limits, stale-decision rejection, one audit event per action (refusals included), signed/hash-chained log with end-to-end verification, owner summary.
Port any missing pieces from the other module, delete the losing module and its tests, and keep the full cargo test -p id-caps suite green.
Both modules are additive and independently tested; nothing else references either yet, so the reconciliation is contained to id-caps.
Process follow-up worth folding into lane briefs: a claim comment is a hard stop for later lanes, and a lane about to merge should re-read the issue's newest comments first (PV's miss here).
Claim — Lane RY (archer) taking this reconciliation now.
Plan: read both modules on current main, pick the surviving shape, port the missing pieces so the survivor carries the full union (ceiling from role grant, quota charged before execution with visible parking, per-tool rate limits, stale-decision rejection, one audit event per action incl. refusals, signed/hash-chained audit log with end-to-end verification, owner summary, bridge-session integration), delete the losing module + its tests, keep cargo test -p id-caps green, and record the survivor's name on #7917.
Done — Lane RY (archer). Reconciliation landed in PR #13220, merged ec65b1f095ca (head SHA-guarded at 576950cd81a).
Survivor: id_caps::mcp_policy::PolicySession — the bridge-integrated shape. Deleted: agent_policy.rs (standalone PolicyPoint) and tests/agent_policy_point.rs; repo-wide grep confirms no remaining references.
Ported from the deleted module so the survivor carries the union:
Per-tool rate limits (§6.3) — RoleGrant.rate_limits, a sliding admitted-call window per tool, AuditOutcome::RefusedRateLimit, RefusalKind::RateLimited. PolicySession::act now takes host time (now, unix seconds) to drive the windows.
Structured park event (§6.2) — PolicyRefusal.park_event is now a serializable ParkEvent (kind agent_parked, reason, message, agent key, world, at, quota spent, budget) instead of the bare message string.
Owner-summary refusal breakdown — OwnerSummary.refusals_by_code, keyed by the new AuditOutcome::refusal_code().
Deliberately not ported: delegation expiry (not in this issue's union list, and RoleGrant carries no expiry field) and the join-granted opening audit event (here the bridge session's world.join call is the audited join).
Verification (laptop, nix develop in pkgs/id — the verifying route):
cargo test -p id-caps: 251 lib passed / 0 failed (incl. 11 mcp_policy tests: the 9 pre-existing plus new rate-limit window-slide and summary-breakdown tests; park-event fields asserted in the updated parking test), integration suites 3 + 1 passed, doc-tests 0.
cargo fmt -p id-caps clean; clippy on the changed file shows no new findings (the one remaining clippy::panic hit in the parking test is byte-identical on main — pre-existing).
Activity
developing-today commentedon Nov 23, 2026
CODE-4818
dezren39 commentedon Nov 23, 2026
Claim — Lane RY (archer) taking this reconciliation now.
Plan: read both modules on current main, pick the surviving shape, port the missing pieces so the survivor carries the full union (ceiling from role grant, quota charged before execution with visible parking, per-tool rate limits, stale-decision rejection, one audit event per action incl. refusals, signed/hash-chained audit log with end-to-end verification, owner summary, bridge-session integration), delete the losing module + its tests, keep
cargo test -p id-capsgreen, and record the survivor's name on #7917.dezren39 commentedon Nov 23, 2026
Done — Lane RY (archer). Reconciliation landed in PR #13220, merged
ec65b1f095ca(head SHA-guarded at576950cd81a).Survivor:
id_caps::mcp_policy::PolicySession— the bridge-integrated shape. Deleted:agent_policy.rs(standalonePolicyPoint) andtests/agent_policy_point.rs; repo-wide grep confirms no remaining references.Ported from the deleted module so the survivor carries the union:
RoleGrant.rate_limits, a sliding admitted-call window per tool,AuditOutcome::RefusedRateLimit,RefusalKind::RateLimited.PolicySession::actnow takes host time (now, unix seconds) to drive the windows.PolicyRefusal.park_eventis now a serializableParkEvent(kindagent_parked, reason, message, agent key, world, at, quota spent, budget) instead of the bare message string.OwnerSummary.refusals_by_code, keyed by the newAuditOutcome::refusal_code().Deliberately not ported: delegation expiry (not in this issue's union list, and
RoleGrantcarries no expiry field) and the join-granted opening audit event (here the bridge session'sworld.joincall is the audited join).Verification (laptop,
nix developin pkgs/id — the verifying route):cargo test -p id-caps: 251 lib passed / 0 failed (incl. 11 mcp_policy tests: the 9 pre-existing plus new rate-limit window-slide and summary-breakdown tests; park-event fields asserted in the updated parking test), integration suites 3 + 1 passed, doc-tests 0.cargo fmt -p id-capsclean; clippy on the changed file shows no new findings (the one remainingclippy::panichit in the parking test is byte-identical on main — pre-existing).fp_128de6ec7c1619b26ddb828735338eec): failed in the "Execute target command" step — the fleet-build container cannot runnix developtoday, the fix(fleet-dispatch): nix develop commands fail in the fleet-command container (nix config shaped for a daemon that is not there) #13198 shape (three identical environment failures recorded there this morning). Not a code result; main-branch CI is the remaining gate per repo policy.Survivor name also recorded on #7917 for step 5.