Repository navigation
contract 1.18: scope the supersession lock and pin near-tie ranking (story 28.1) - #218
Merged
Merged
Conversation
…anking-near-tie pins near-tied order to the bit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…th a correctly rounded exp2 and unfused products Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…ength Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…unds subnormals once, checked against a math/big reference; lock tests prove the in-scope wait, NULL scope fields included Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
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.
Rest of story 28.1 (part 1 was #214).
lock-supersession-rowslocked a replacement row by ID with no scope predicate, so with row-level security off a caller naming another tenant's record took a row lock on it. .NET now locks only rows in the caller's exact scope (IS NOT DISTINCT FROMfor optional fields); outcomes are unchanged. Contract 1.18 publishes the scoped statement (sql/lifecycle-1.18.sql), add-only; Python and Go switch to it. Lock tests in all three languages fail on the old statement and pass on the new, including the in-scope and NULL-scope cases, usinglock_timeout, no sleeps.retrieval-policy/ranking-near-tie): two pairs 1 ulp apart. It found two Go divergences:math.Powmisrounding and arm64 FMA fusion. Go now uses a correctly roundedexp2(checked against a 320-bitmath/bigreference) and unfused products. Python already matched. 1.18 pins only the fixture's inputs: libmpowmisrounds about 1 in 1,500 inputs, so rare near-ties can still order differently; quantized tie-breaking is logged as follow-up.Tests: Storage.Postgres 933/933 default and RLS; contract 102/102 with both cross-language tests; Python 1777 passed, mypy strict; Go vet, staticcheck, race in all modules and the postgres legs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy