Skip to content

feat(sqlstore): report an unknown CIBA handle as not found - #997

Merged
osanderson merged 3 commits into
mainfrom
feat/sqlstore-ciba-lookup-not-found-v2
Nov 26, 2026
Merged

osanderson merged 3 commits into
mainfrom
feat/sqlstore-ciba-lookup-not-found-v2

Conversation

@osanderson

Copy link
Copy Markdown
Collaborator

This is the sqlstore half of the CIBA lookup not-found error. The root half, storage.ErrBackchannelAuthenticationNotFound, shipped in fapigo v0.86.0 (#991).

feat(sqlstore): report an unknown CIBA handle as not found

For an unknown handle, LookupBackchannelAuthentication and DecideBackchannelAuthentication now wrap storage.ErrBackchannelAuthenticationNotFound as well as sqlstore.ErrNotFound.

Why it matters: since v0.86.0, Server.ListBackchannelInteractions skips an entry only when the store says its request is gone. Before this change, a sqlstore deployment saw such an entry reported as unreadable until it expired. Now the listing leaves it out again, and DenyBackchannelInteractions clears it.

sqlstore now requires fapigo v0.86.0. examples/linked-accounts, which uses sqlstore, requires it too, in a separate chore(examples) commit. Without it, that example's go.mod wouldn't be tidy.

Tests

  • Store contract: the optional subtests for the new error now run and pass for sqlstore on SQLite and PostgreSQL. These are LookupUnknownHandleWraps… and DecideUnknownHandleWraps…. DecideAgainIsNotNotFound passes too.
  • sqlstore's own tests: TestBackchannelDecisionsAndExpiry checks both wraps, and checks that a second decision doesn't wrap the new error.
  • Released fapigo: sqlstore's suite passes against the released v0.86.0, with the replace dropped.
  • Examples: every example module builds and passes.
  • Mutants: one new, sqlstore-ciba-unknown-handle-wraps-notfound, which is killed.

🤖 Generated with Claude Code

osanderson and others added 3 commits November 26, 2026 11:52
The backchannel store's lookup and decision for a handle it holds no
request under wrapped only sqlstore.ErrNotFound, which the server
doesn't recognise. Its inbox listing therefore reports an entry whose
request is gone (expired and purged, say) as one it couldn't read.

Both now also wrap storage.ErrBackchannelAuthenticationNotFound, so the
listing leaves such an entry out and DenyBackchannelInteractions clears
it. ErrNotFound is still wrapped, and the contract's optional subtests
for the sentinel now run against both dialects.

The sentinel first ships in fapigo v0.86.0, which sqlstore now
requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The example uses sqlstore, which now requires fapigo v0.86.0, so its
own requirement has to be at least that for its go.mod to be tidy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@osanderson
osanderson merged commit 0106327 into main Nov 26, 2026
30 checks passed
@osanderson
osanderson deleted the feat/sqlstore-ciba-lookup-not-found-v2 branch November 26, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant