Repository navigation
fix(server): report the CIBA inbox entries whose lookup the store refused - #991
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
BackchannelAuthenticationStore's lookup returned a plain error for an unknown handle, so a caller couldn't tell a request that is gone from any other refusal a store reports the same way. The server's inbox listing therefore left out every entry whose lookup failed that way, hiding from the operator entries the store couldn't answer for. Add storage.ErrBackchannelAuthenticationNotFound, which LookupBackchannelAuthentication and DecideBackchannelAuthentication should wrap for an unknown handle, and for nothing else. Wrapping it is optional, as for ErrBackchannelAuthenticationAlreadyDecided. The contract gains optional subtests that a store wrapping it does so without also wrapping ErrStoreUnavailable, and a required one that a second decision of a stored request doesn't wrap it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
memstore's BackchannelAuthenticationStore answered a lookup or a decision for a handle it doesn't hold with a plain error. Both now wrap storage.ErrBackchannelAuthenticationNotFound, so the server can tell a request that is gone from any other refusal, and the contract's optional subtests for the sentinel run against memstore rather than skip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ListBackchannelInteractions left out every inbox entry whose request lookup came back invalid_request, taking it for a request gone from the store. But the lookup answers invalid_request for any refusal a store reports as a plain error, and for a request record the server can't read as its own, so such entries were hidden from the operator, and an account closure could look done while one remained. The listing now leaves an entry out only when the store says the request is gone (storage.ErrBackchannelAuthenticationNotFound) or its client is no longer registered, as before. Any other refused lookup is reported in the listing's error, with every readable request still returned, as an undecodable inbox record already is. DenyBackchannelInteractions goes on denying the others, doesn't count such an entry, and leaves it in the inbox. It also takes a request the store says is gone when it comes to deny it for a stale entry: passed over and taken out of the inbox, like one already decided. LookupBackchannelInteraction answers an unknown handle as before, with the store's error as its cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin that the inbox listing leaves out only a request the store says is gone or whose client is no longer registered, that a bulk denial clears a request the store says is gone, and that memstore wraps storage.ErrBackchannelAuthenticationNotFound for an unknown handle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
osanderson
force-pushed
the
feat/ciba-lookup-not-found
branch
from
November 26, 2026 00:08
504fea9 to
782e504
Compare
|
This was referenced Nov 26, 2026
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.



This makes the CIBA inbox listing say which lookup failures it skips. Until now it silently skipped any entry whose lookup answered
invalid_request. That included a request that is simply gone, but also a plain error from a custom store and a request record the server couldn't read as its own.feat(storage):ErrBackchannelAuthenticationNotFoundThis is a new optional sentinel, following the precedent of
ErrBackchannelAuthenticationAlreadyDecided(#964). A store'sLookupBackchannelAuthenticationandDecideBackchannelAuthenticationshould wrap it for an unknown handle, and only for that: never for an outage, nor for a stored request.ErrStoreUnavailable. A third, required subtest checks that deciding an already-decided request doesn't wrap the sentinel.fix(server): report the lookup refusals the listing used to hideListBackchannelInteractionsnow skips an entry only when it's gone, meaning one of:unauthorized_client, because the client is no longer registered (unchanged);invalid_requestwrapping the not-found sentinel.Any other
invalid_requestfrom the lookup is now reported in the listing's joined error, the way an undecodable inbox record already is. The readable entries are still returned, and an outage is handled as before.DenyBackchannelInteractions:LookupBackchannelInteraction's answers are unchanged.For stores that don't wrap the sentinel yet
A custom store that returns a plain error for an unknown handle will now see such entries reported as unreadable until they expire, instead of skipped. UPGRADING.md (v0.85.1) says to wrap the sentinel.
sqlstore is in the same position until it adopts the sentinel. That change is ready, but needs a fapigo release that includes the sentinel, so it ships in a follow-up PR with sqlstore's fapigo requirement raised. Until then a sqlstore deployment would also see gone requests reported, so the two should be released close together.
Tests
Nothing on the wire changes. Only the embedder-facing listing and bulk-denial APIs are affected.
🤖 Generated with Claude Code