Repository navigation
fix(ceremony): keep what a refusing platform said - #182
Merged
Merged
Conversation
A notarized token or identity request that the platform refused failed as a bare "Platform request failed": the status line and body were dropped, so an X token request failing after a 94 s notary setup could not be told apart between an expired code, a rate limit and a server error. GitHub's refusals, sent with a 200 and an OAuth error, failed as a malformed transcript. A refusal now keeps the platform's status line and body in the failure text, with the code, code verifier, client credential and bearer the request carried removed, and the Prover emits platform-refusal first: the operation, the HTTP status, the OAuth error code and how long the Prover document had run, a lower bound on the code's age. Nothing a response holding a bearer says is quoted. Assisted-by: Claude Opus 5.5 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Google proves from the ID token in its return, so a notarized refusal never reaches it; its failures lost the platform's words elsewhere. An authorization return with an error failed as "Authorization failed" for every platform, dropping the provider's error code and description; a public fetch such as Google's signing keys or the Bridge's configuration dropped its HTTP status; and an ID token for another client and an expired one both failed as "Invalid Google token". The failure text now keeps the return's error and error_description, the fetch's status, and which ID token check failed. Assisted-by: Claude Opus 5.5 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
…eserve-platform-errors
Wondertan
added a commit
that referenced
this pull request
Nov 20, 2026
Ships #182 in @libid/ceremony 0.6.1: a failed Bridge configuration or versions fetch keeps its HTTP status. Signed-off-by: Wondertan <hlibwondertan@gmail.com> Assisted-by: Claude Opus 5.5
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.
A platform that refuses a notarized token or identity request now says why, in the failure and in an event, so a failure like today's X run no longer has to be guessed at.
Today an X token request failed after a 94 s notary setup with a bare "Platform request failed". The status line and body were dropped, so an expired code (400), a rate limit (429) and an X outage (5xx) look the same. GitHub's refusals, sent with a 200 and an OAuth
error, failed as a malformed transcript instead.Changes
responseJsonkeeps the platform's status line and body, for examplePlatform request failed: HTTP/1.1 400 Bad Request {"error":"invalid_request",…}. The code, code verifier, client credential and bearer the request carried are replaced by<redacted>; a body holding anaccess_tokenis never quoted. An OAutherrorsent with a 200 (GitHub) is a refusal too.platform-refusalevent: emitted before the fetch fails, withoperation(token-fetchoridentity-fetch),status, the OAutherrorcode, andprover-ms, how long the Prover document had run (a lower bound on how long the code waited). It is an extension event, which every published client already accepts;CeremonyFailedis unchanged.errornow fails asAuthorization failed: <error> (<error_description>)on every platform, where it said only "Authorization failed". A public fetch (Google's signing keys, the Bridge's configuration) keeps its HTTP status. An ID token for another client and an expired one, both "Invalid Google token" before, now say which.docs/metrics.mddocuments the event and what the failure text keeps.Verified
@libid/ceremonytests: 1061 passed, with new cases for the return's error code and description on every platform, the public fetch's status, the two Google token checks, a 400 with an OAuth body, a 429 without JSON, a 503 with unreadable framing, GitHub's 200 refusal, the bearer guard, secret removal, and the event and failure through the GitHub and X provers.pnpm -C ts lint,fmt:checkand the ceremony typecheck pass.Not verified / known issues
statusandprover-ms(and a text column forerror) in its telemetry.🤖 Generated with Claude Code