Repository navigation
Description
Removes shortcut: delegation reports are not recorded as lineage events (#2557)
Depends on: #2535
Settle in the design before starting: how a session open, an agent registration, and a close handle a record the sink refuses (audit.md, "Write order and failure" covers only the ID-JAG, the decision, and refusals), and how the open record references a refresh token it replaced (credentials-and-lifecycle.md step (3), "Evidence").
Problem
Nothing records who acted, for whom, and what was decided. The identity broker records only call decisions and ID-JAGs, keeps them in memory, and has no session, registration, or user facts in them.
Design
- audit.md: Evidence and provenance
- audit.md: AuditEvent profile (
Subjects, provenance, evidence references, lineage) - audit.md: Delivery, protection, and reconciliation (write order and failure)
- credentials-and-lifecycle.md: (3) Session open and (7) ID-JAG from AS-1 ("Evidence", "Session end")
- credentials-and-lifecycle.md: Error reasons
- implementation.md: Session ownership and isolation
Requirements
- The identity broker records each event
audit.mdassigns to it: broker session open, refused open, close, agent registration, refused registration, grant, and call decision. Each record carries the fields the design's step "Evidence" paragraphs andSubjectslist for that event. - Opens: a record for every refusal session open returns ("Error reasons"), and for each kind of successful open: a converted token, a token AS-1 already converted, and a tokenless open.
- Closes: a record from every close path, including a hard expiry the broker notices during a lookup. A close is recorded once.
- User subjects: the owner, AS-1's own subject, and the token's
client_idqualified by AS-1's issuer, kept with the broker session at open and taken from the token only after AS-1 accepts it. - Provenance: each subject is marked verified, reported by the component that supplied it, or unavailable (
audit.md, "AuditEvent profile"). The owner after a tokenless open, the run, the delegation, the run owner, and phase 1's unverified workload are never marked verified. - Each record has an ID minted once. The broker keeps the open record's ID with the broker session and the registration record's ID with the agent, so later records can reference them (
audit.md, "Lineage"). - Write order and failure follow
audit.md: the ID-JAG and success decision records are written before the gateway token is returned, and an error means no token. Every record goes through a sink that can refuse it, and each event handles a refusal as the design says. - Delegation reports (Runs, delegations, and the run owner #2557): each accepted and refused
ReportDelegationis a lineage event. A team started through theRunTeamAPI is a run of its root's main agent whose ID exists only on mecak8s's context; its events carry that run ID, so audit can trace a member back to the API request. - No token, assertion, or credential value appears in any record.
How it fits
#2566 writes these records in the AuditEvent profile and delivers them; until then the broker keeps them in memory. #2731 adds the dispatch and outcome mecak8s reports, joined to these decisions. #2551, #2563, and #2568 record their new events through the same sink.
Done when
Tests produce a record for each event above, including every refused-open reason, each kind of open, a hard-expiry close found by a lookup, a grant with its ID-JAG jti, and a call decision; show the provenance marks after a tokenless open; show a refused record handled as the design says for each event; and prove no token value appears in any record.
Activity
fix(identitybroker): refuse with the closing reason after a failed re…
[-]"Who acted" log[/-][+]Broker records of who acted[/+]rdimitrov commentedon Nov 20, 2026
Registration records after #2555
Helpers now register, so registration records come from children too. Points for this ticket:
agent-definitions.md, "Relationships and lifetimes").rdimitrov commentedon Nov 20, 2026
Delegation records after #2557
#2557 (PR #2930) added delegation reports. The design records each accepted or refused report as a delegation lineage event, marked as reported by mecak8s (
credentials-and-lifecycle.md, "Delegation report", "Evidence"). #2930 records none of them and names this ticket as where they come from, so this ticket's events should include them:ALREADY_EXISTSfor a changed repeat among them. An identical repeat is a success, so it should not make a second record.RunTeamcall is a run of the root's main agent, and the members' runs are delegated from it (decided on Runs, delegations, and the run owner #2557). Their delegation records should mark the main agent as the stand-in parent, as their registration records do (comment above).docs(agent-identity): name the stand-in marks and the client subject …
rdimitrov commentedon Nov 25, 2026
Design settled in #2984; implemented by #2985. Changes from this ticket's text and the two comments above:
record_not_accepted; a replaced refresh token is named by theAuditIDof the open record that stored it and that open's sourcejti.user_client_idanduser_client_iss, notclient_id, soclient_idmeans the same thing in every component's records.docs(agent-identity): close the round-4 review questions on write order