Repository navigation
docs(agent-identity): finish the write-order follow-ups from review - #3000
Merged
Merged
Conversation
- The 503 repeat rule keys on the verified owner everywhere, says what keeps and ends the minute, and gives clients one rule: after a 503 on an open that presented a token, refresh it before retrying. The write-order rows for session open and schedule setup point to it. - The deleted-host-session mark becomes broker check 4: keyed on host session and incarnation, 5 minutes, per replica and best effort, also set when a scheduled run ends. It has a failure row, maps to 404, and the failure matrix and error reasons say so. - The ID-JAG outcome row drops broker-check denials, which are recorded as decisions, and the Decision row leaves the superseding refusal's error to the supersede rule. Closes #2998 Co-Authored-By: Claude Opus 5.5 <[email protected]>
An open refused with session_closed gets 404 when mecak8s no longer has the session and 503 otherwise, as for a scheduled run whose session is kept for its results. Refs #2998 Co-Authored-By: Claude Opus 5.5 <[email protected]>
An open whose broker session closes after it converted the token is refused with session_closed, which mecak8s answers 503 while it still has the session and 404 once it is gone, as #2985 does. A create, fork, or clear, whose session is not saved yet, still fails as for a refused token. Refs #2998 Co-Authored-By: Claude Opus 5.5 <[email protected]>
ChrisJBurns
approved these changes
Nov 26, 2026
ChrisJBurns
left a comment
Contributor
There was a problem hiding this comment.
Approving: this brings the design back in line with #2985, which is now merged, so main currently has code answering 503/404 where the design still says 401. Three small text fixes, before or straight after merge; I may be wrong on any of them. Line references are at bf4b07b.
- The description doesn't mention the 401 → 503/404 change. A converted open whose broker session closes mid-open used to fail "as for a refused token" (401
bearer_rejected); it now answers 503identity_broker_unavailablewhen mecak8s still has the session and 404session_not_foundwhen it doesn't, with create, fork, and clear keeping 401. That is client-visible, and only the commit message says so. Could the body state it, with its client impact? - The create/fork/clear exception appears in one place only.
credentials-and-lifecycle.md:258keeps 401 for a create, fork, or clear whose session isn't saved yet, but:328and:961say anysession_closedopen gets 404 or 503 "whether or not it presented a token". The failure-matrix row at:928also keys on "if the session was deleted", where the others say "no longer has the session". Could all three carry the exception and the same condition? - Broker check 4's retry column. The row at
:319says "Retry: No", while:328and:961answer 503 "which the client can retry". For a session that is kept (a scheduled run that ended), each retry within the 5 minutes gets 503 again. Maybe "No; a 503 here clears once the mark lapses", or split by 404/503?
The remaining design/code differences and the ticket follow-ups are in #3001 so they don't hold this up.
…where The client mapping, the failure matrix, and error reasons all keep 401 for a create, fork, or clear whose session is not saved yet, and key 404 on mecak8s no longer having the session. Broker check 4's retry column splits the 404 from the 503, which repeats until the mark lapses. Refs #2998 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Finishes the points left from the last review of #2984, the broker's audit write order. All of them are in #2998.
The 503 repeat rule.
implementation.mdnow keys it on the verified owner, as step (3) and "Error reasons" already do, with schedule setup and renewal counting too. Step (3) says only a successful open, schedule setup, or renewal by the same caller ends the minute early, and any other failure keeps it. Clients get one rule they can follow: after a 503 on an open that presented a token, refresh the token before retrying, because the code is the same whatever the cause. The write-order rows for session open and schedule setup point to the exception.The deleted-host-session mark is now broker check 4 in step (3):
It gets a failure-table row, maps to 404
session_not_foundwhen mecak8s no longer has the session and to 503identity_broker_unavailablewhen it does, as for a scheduled run whose session is kept, whether or not the open presented a token (no token is spent), and the failure matrix, "Error reasons", "Session end" andimplementation.md's checks say so.Outcomes table. ID-JAG issuance's
deniedcovers AS-1's refusal only: a broker check that refuses a call is recorded as a denied decision, and no ID-JAG is requested. The Decision row keepserrorfor a failed evaluation; a refusal that supersedes an allowing decision takes its outcome from the supersede rule.A converted open whose broker session closes meanwhile no longer fails as for a refused token (401
bearer_rejected). It answers 503identity_broker_unavailablewhile mecak8s still has the session and 404session_not_foundonce it does not. A create, fork, or clear, whose session is not saved yet, keeps 401. Client impact: a client that refreshed and retried on the 401 now gets a 503 instead, and follows the 503 rule above (refresh the token it presented, then retry); after a delete it gets 404 and stops. feat(identitybroker): record who acted, for whom, and what was decided #2985, now merged, already answers this way.#2985, now merged, implements the matching code points (#2999), including keying the mark on incarnation and answering 404 only when the session is gone.
Checks
task docspasses.Closes #2998
🤖 Generated with Claude Code