GeezerVison is showing github.com — id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log · Issue #7916 · developing-today/code
id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916DescriptionSpike step 4 (of 5) for #6300: policy point — ceiling, session quota, audit log
Parent: #6300 · Core topic: #6280 · Design: doc/2026-11-09_design_id6300_agents_in_worlds_v1.md (PR #7911), §6, §7, §9.3.
Work
Host-side policy point, in order on every agent frame: (1) capability-ceiling check (tools, worlds, object classes, program allowlist) set at role grant; (2) per-session quota charge (frames, tool calls, program invocations) — exhaustion parks the agent with a visible "agent parked, quota exhausted" world event; (3) signed/hash-chained audit event per action including refusals and stale-input rejections, plus owner-readable periodic summaries. Quota is the local per-session budget of design §9.3 (same event shape F12.10 will consume), not a dependency on #1067 landing.
Acceptance criteria
- Out-of-ceiling action is refused, audited, and never executed; refusal events are never sampled away.
- Quota exhaustion parks the agent visibly; the owner summary shows actions, spend, and refusals.
- Audit chain verifies end-to-end for a spike session; the agent cannot mutate the log or its quota.
Activitydezren39 commented on Nov 17, 2026 🤖 Agent note · triaged
- Agent: queue worker (repo-worker-code), lane any-k
- Session / ID: task 18550
- Found via: queue claim
- Task: Inline triage of issue id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916 (it arrived with no comments and no task/effort labels). Verdict: live and unstarted — small-fix (implementation spike), priority/normal (already set), effort/m; routed as follow-on task 20046.
- Expectation: task 20046 implements the policy point when its sequencing gate clears; this triage completes now.
- Links: task 18550 · follow-on task 20046 · issue id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916 · issue id(phase-14): Agents in worlds (MCP bridge) — v1 — first-iteration design + spike plan #6300 · issues id(phase-14): spike 1/5 — agent shell profile in the id-shell contract (semantic diffs, region subscriptions, stale-decision token) #7913, id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914, id(phase-14): spike 3/5 — agent identity, roles, UCAN-style attenuated delegation #7915, id(phase-14): spike 5/5 — bounded program interaction + end-to-end spike run #7917
Triage evidence (fresh, 2026-11-17)
- Issue id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916 is OPEN with no held / user/owned / do-not-merge / do-not-auto-edit labels and no prior comments; parent id(phase-14): Agents in worlds (MCP bridge) — v1 — first-iteration design + spike plan #6300 is OPEN (status/waiting-dependency).
- Nothing is implemented and nothing was queued for it: sibling spikes id(phase-14): spike 1/5 — agent shell profile in the id-shell contract (semantic diffs, region subscriptions, stale-decision token) #7913 (step 1), id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914 (step 2), id(phase-14): spike 3/5 — agent identity, roles, UCAN-style attenuated delegation #7915 (step 3), id(phase-14): spike 5/5 — bounded program interaction + end-to-end spike run #7917 (step 5) are all OPEN with the same bare label set, and no live queue task covers any of them.
- Sequencing, from the design (
doc/2026-11-09_design_id6300_agents_in_worlds_v1.md, spike plan): step 1 before step 2; step 3 before any non-local run; steps 4–5 last, together. Task 20046's packet therefore opens with a gate check: re-verify steps 1–3 on claim, and dep-block on the earliest unlanded step issue instead of starting if any is still open.
- The quota in this spike is the local per-session budget of design §9.3 (in the event shape F12.10 will consume) — the design explicitly does not wait for id: F12.10 fair scheduling and per-account quotas #1067, and the packet says so.
- First concrete step (once the gate clears): the ceiling check on every agent frame, ordered before quota charge and audit per design §6/§7. Acceptance: the issue's own criteria (refused + audited + never executed; visible park on quota exhaustion with owner summary; verifiable audit chain).
dezren39 commented on Nov 20, 2026 🤖 Agent note · blocked (dependency)
- Agent: repo-worker-code, OpenChamber scheduled lane oc-code-06
- Task: 20046
- Fresh gate result: id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916 remains OPEN; id(phase-14): spike 1/5 — agent shell profile in the id-shell contract (semantic diffs, region subscriptions, stale-decision token) #7913 (step 1) and id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914 (step 2) are OPEN; id(phase-14): spike 3/5 — agent identity, roles, UCAN-style attenuated delegation #7915 (step 3) is CLOSED. The earliest unmet prerequisite is id(phase-14): spike 1/5 — agent shell profile in the id-shell contract (semantic diffs, region subscriptions, stale-decision token) #7913.
- Queue state: task 20046 is blocked on id(phase-14): spike 1/5 — agent shell profile in the id-shell contract (semantic diffs, region subscriptions, stale-decision token) #7913; broker rechecks every 15 minutes and releases it when that issue closes. No implementation was started.
- Resume: after id(phase-14): spike 1/5 — agent shell profile in the id-shell contract (semantic diffs, region subscriptions, stale-decision token) #7913 closes, re-check id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914 and id(phase-14): spike 3/5 — agent identity, roles, UCAN-style attenuated delegation #7915 before proceeding.
dezren39 commented on Nov 23, 2026 🤖 Agent note · blocked (dependency) — sequencing gate re-checked, blocker moved from #7913 to #7914
- Agent: archer, Lane FA (sandbox fix lane)
- Task: 20046 (step 4/5 implementation)
- Fresh gate check (2026-11-23): id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916 OPEN, premise true, no implementation started. Spike sequencing per the design doc: steps 1–3 must land before step 4.
- Action: task 20046 dep-blocked on id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914 (dep recheck 900s, blocked-until 2026-11-26). No policy-point code started — the design forbids inventing the agent-frame surface the earlier steps define.
- Next slice: when id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914 lands, this task unblocks on its recheck cycle and step 4 proceeds as specified (capability ceiling → quota charge → signed audit chain, in that order, on every agent frame). Step 5 (id(phase-14): spike 5/5 — bounded program interaction + end-to-end spike run #7917) is sequenced with step 4.
dezren39 commented on Nov 23, 2026 🤖 Agent note · claimed — sequencing gate CLEARED, implementation starting
- Agent: archer, Lane PV (sandbox fix lane)
- Task: 20046 (step 4/5 implementation: policy point — capability ceiling, session quota, audit log)
- Fresh gate check (2026-11-23): the design's sequencing gate required spike steps 1–3 landed before step 4 starts. All three are now CLOSED as completed:
- Action: the earlier dep-block on task 20046 (blocker was id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914, per Lane FA's 2026-11-23 note) is discharged. Removing the stale
status/blocked + queue/blocked labels with this evidence. Implementing the host-side policy point in pkgs/id per design §6, §7, §9.3: ceiling check first on every agent frame, per-session quota charge with visible park on exhaustion, signed/hash-chained audit events including refusals, owner-readable summaries.
- Next: worktree off current main, implementation + tests, PR linked here when open.
dezren39 commented on Nov 23, 2026
Claim (Lane QE, 2026-11-23): taking #7916 — spike step 4/5 for #6300: the host-side policy point (capability ceiling, per-session quota, hash-chained audit log) on every agent frame in the MCP bridge.
Premise + ownership check (fresh, this pass):
Plan: implement the policy point host-side around id_caps::mcp_bridge (the bridge Lane LB landed) — ceiling check set at role grant, per-session quota charge with visible park-on-exhaustion, signed/hash-chained audit event per action including refusals — with tests named against the three acceptance criteria. #7916 stays open until the acceptance evidence is recorded; no closing keywords will be used in commits/PR text. dezren39 commented on Nov 23, 2026
Done (Lane QE): #7916 landed — closing as completed. PR #13192 merged (2b8a3e535e42, head SHA-guarded at fc82f4e0e3e); the new module is verified present on main.
What landed: id_caps::mcp_policy — the host-side policy point wrapping BridgeSession, running every agent tool call through the design's order (#6300 §§6–7):
- Ceiling (tools, worlds, object classes, program-invoke allowlist) set at role grant; anything outside is refused, audited, never executed.
- Quota: local per-session budget (§9.3 shape, not waiting on F12.10) over frames / tool calls / program invocations, charged before execution; a charge that would exceed parks the agent and surfaces the first-class world event
agent parked, quota exhausted to the driver. world.leave is never refused (charged nothing, still audited).
- Audit: one event per action including refusals and stale-input rejections; hash-chained and signed with the host's journal key (ed25519);
verify_audit_chain checks sequence/links/hashes/signatures end-to-end. The stale-decision rule is enforced at the policy point (a screen_revision token naming anything but the latest observed revision is refused). Log and spend are read-only from the session API — the agent is the subject, never the editor. Owner summary renders actions / spend / refusals.
Acceptance evidence (cargo test -p id-caps --lib, nix develop in pkgs/id at the PR head): 249 passed / 0 failed, incl. 9 new mcp_policy tests named against the criteria — ceiling refusal audited + never executed; quota exhaustion parks visibly and the summary shows actions/spend/refusals; chain verifies end-to-end and tamper/link/signature attacks fail; serde round-trip still verifies; no-mutation API shape. Clippy: zero findings in the new files (crate total 177 → 172 pre-existing). A dispatch-first attempt (run 45151325339) failed before any code ran on the known #13159 container gap (nixbld group), so verification ran on the laptop per the established pkgs/id route.
Named remainders (not in this issue's work list): §6.3 per-tool rate limits (chat.post) belong with the behavioural-guardrail pass; audit persistence is the world journal's wiring, and periodic summary delivery is a host-driver concern — the module renders the summary on demand. program.invoke itself is step 5 (#7917); the policy point already enforces its allowlist and charges its axis.
Downstream: #7917 (spike step 5/5) named #7914, #7915, and #7916 as prerequisites — all three are now closed, so it is unblocked (noted there as well). dezren39 commented on Nov 23, 2026 🤖 Agent note · DONE — policy point landed, closing as completed
- Agent: archer, Lane PV (sandbox fix lane) · Task: 20046
- Landed: PR #13182 merged
c22ec1948eb4 (head SHA-guarded at bb2d276ba475), adding pkgs/id/crates/id-caps/src/agent_policy.rs (+ one lib.rs registration line) and the acceptance suite pkgs/id/crates/id-caps/tests/agent_policy_point.rs. Additive only; no existing API changed.
- What it implements (design §6, §7, §9.3):
- Ceiling —
Ceiling::from_grant derives tool keys from the verified join grant's scopes (presence / screen.read / chat.post / program.invoke) in the grant's world; object classes and the program allowlist are owner-side additions, changeable only out-of-band.
- Quota — per-session budget over frames / tool calls / program invocations, charged before execution and refused atomically; exhaustion parks the session and emits the first-class
agent_parked world event ("agent parked, quota exhausted") in the §9.3 local-budget shape F12.10 will consume. No dependency on id: F12.10 fair scheduling and per-account quotas #1067, per §9.3.
- Guardrails — stale-decision rejection (§4.3) and per-tool rate limits (§6.3; chat.post's limit is part of the role config), plus delegation-expiry refusal (§5.3).
- Audit — one event per action including refusals and stale-input rejections (agent, owner, world, tool, object, proof ref, quota charged, outcome), hash-chained and host-signed;
AuditLog::verify_events re-derives sequence, links, hashes, and signatures end-to-end. The agent is never the editor: appending exists only inside the policy point. OwnerSummary renders actions / spend / refusals for the owner.
- Acceptance, criterion by criterion:
- Out-of-ceiling refused, audited, never executed; refusals never sampled away —
out_of_ceiling_action_is_refused_audited_and_never_executed, refusals_are_never_sampled_away (mixed run: exactly one event per action + join), forbidden non-tools (audit.mutate etc.) refused and audited inside the chain test.
- Quota exhaustion parks visibly; owner summary shows actions, spend, refusals —
quota_exhaustion_parks_the_agent_visibly (park event kind/reason/message pinned; fires once; later actions refused session_parked), owner_summary_shows_actions_spend_and_refusals.
- Audit chain verifies end-to-end; agent cannot mutate the log or its quota —
audit_chain_verifies_end_to_end_and_detects_tampering (content edit → HashMismatch; signature edit → BadSignature), quota_is_charged_before_execution_and_a_refusal_charges_nothing.
- Plus: stale-input, program allowlist + program axis, object classes, rate-limit window slide, expiry, join-is-event-test #1, and a 40-action mixed-sequence completeness property. 13/13 new tests pass; full
cargo test -p id-caps green (240 lib + 13 + 3 bridge + 1 roc); clippy clean on the new files.
- Verification route note: local run in the pkgs/id dev shell on the laptop at the PR head. The dispatch-first remote route was attempted three times and failed on three distinct container-environment layers before any code ran (nix experimental features off → missing
nixbld group → /homeless-shelter purity) — filed as #13198. Main-branch CI is the remaining authoritative gate per repo policy.
- Downstream: step 5 (id(phase-14): spike 5/5 — bounded program interaction + end-to-end spike run #7917) named this issue as a blocker; all three of its blockers (id(phase-14): spike 2/5 — MCP bridge: join, read screens, post chat #7914, id(phase-14): spike 3/5 — agent identity, roles, UCAN-style attenuated delegation #7915, id(phase-14): spike 4/5 — policy point: capability ceiling, session quota, audit log #7916) are now closed.
dezren39 commented on Nov 23, 2026 🤖 Agent note · correction to the record — this step landed TWICE
- Agent: archer, Lane PV
- My done record above (7098274394) is accurate about what PR feat(id-caps): host-side policy point for agent frames (spike 4/5, #7916) #13182 contains, but incomplete: Lane QE implemented the same step in parallel and landed first — PR #13192 (
mcp_policy, merged 2026-11-23T10:32:35Z) — and QE's done record (7098152986) is what closed this issue at 10:34:09Z. My PR merged at 10:37:54Z, after the close.
- Claim timeline: my claim posted 09:38:50Z; QE's claim posted 09:46:16Z on the already-claimed issue. I then merged without re-reading this issue's newest comments, which would have shown QE's claim and done record. Both halves of that miss are recorded in the dedup issue.
- Current state of main: both modules exist —
mcp_policy (bridge-session integrated) and agent_policy (standalone, signed hash-chained audit + owner summary). The acceptance criteria are met by each; the duplication is the defect, not a gap.
- Follow-up: #13202 — reconcile to one policy point (preserving the union of both feature sets) before step 5 (id(phase-14): spike 5/5 — bounded program interaction + end-to-end spike run #7917) builds on it.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|