Repository navigation
Answer a BluMint close of a key the bridge holds nothing under with 200 - #99
Merged
Confetti3 merged 1 commit intoOct 17, 2026
Merged
Conversation
BluMint reads a close answered 404 as a failed close and hands the match
to its host. Its contract says a partner that holds nothing under the
close's idempotencyKey records the key closed and answers 200, so a later
creation under it is refused. The bridge answered 404 unknown_match for
that case, and again on every repeat.
Such a close now marks the key closed, as before, and answers
{ "closed": true }, as a close of a match already over does. A live match
still closes, an ended one still answers 200, and a later creation under a
closed key still answers 409 key_reused.
Nothing reads which keys had only refused creations any more, so
blumint_refused_keys is dropped (migration 026) along with the code that
kept it.
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.
BluMint treats a close answered
404as a failed close and hands the match to a host. Its contract says that when a partner holds nothing under a close'sidempotencyKey, it records the key closed and answers200, so a later creation under that key is refused. The bridge answered404 { "code": "unknown_match" }for that case, and again on every repeat.What changes
200 { "closed": true }, the same as a close of a match that is already over. A repeat answers the same.200, and a later creation under a closed key answers409 key_reused.blumint_refused_keysand the code that kept it are removed, and migration 026 drops the table.Tests
tests/blumint.rs:a_closed_match_sends_nothinganda_close_naming_another_connections_key_ends_nothingnow expect200 { "closed": true }where they expected404 unknown_match. Against nightly's code both fail withleft: (404, {"code": "unknown_match"}),right: (200, {"closed": true}). With the fix,cargo fmt --check,cargo clippy --locked --workspace --all-targets -- -D warningsandcargo test --locked(300 tests) pass.Docs
docs/guides/BLUMINT_QUICKSTART.md: the close section says a key that made no match stays closed for a day after its close, and that a close of a key the bridge holds nothing under answers as a match that already ended does. The404 unknown_matchrow is gone from the close table, and the200row now covers a key with no match, whether its creations were refused or none arrived.docs/guides/INTEGRATIONS.md: the close bullet says such a key answers200and is closed all the same.