Conversation
checkFlagWithEntitlement built getDefault for the offline, API and error branches but the datastream branch reached past it to the registered default, so defaultValue was ignored on exactly the path that answers most checks. Found reviewing the ruby port of this work (schematic-ruby #65).
The expiry index is what the sweeper reaches a surviving byCredit field through, so removing it first and then failing on the field orphans that field: nothing points at it any more and reservedCredits reads high for that tenant forever. Swapping the order leaves the recoverable failure instead, since a surviving index entry is swept. Found reviewing the Java port (schematic-java#109), whose store already does it in this order; schematic-go does too.
check-and-reserve sized the server's hold from the raw quantity while the settling track event bills ceil(actual), so a fractional usage held less than it billed -- the same drift the local lease path rounds up to avoid, just on the server's ledger. Round the quantity and the preflight that rides with it, in buildPreflightOptions so every consumer of that envelope asks the same whole-unit question.
Options naming usage own the usage/eventUsage pair, but a zero was dropped before that ownership was recorded, so `usage: 0` fell through to whatever the evaluation context carried: a caller pricing an action at nothing got the context's hypothetical instead. Record the pair as named even when every knob in it is dropped, and build the request body from the merge rather than passing the context through, so a preflight the merge rejected cannot ride along on it.
The joiner's deadline was minted when the extend was reached, so a check could spend its whole timeout on the entity fetches and the engine probe and then spend it again waiting on somebody else's extend. Anchor the deadline at the top of the check and pass it down.
schematic-bot
previously approved these changes
Sep 20, 2026
schematic-bot
approved these changes
Sep 20, 2026
bpapillon
deleted the
bpapillon/sch-7530-lease-client-gaps-found-in-the-port-reviews-that-node-go-and
branch
September 20, 2026 06:04
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.
Fixes the gaps the Ruby, Java and C# port reviews found that Node shares (SCH-7530), plus two decisions from those reviews.
fractional-usage.json; every SDK copies both.comp_-prefixed value as the Schematic id, the order the server uses.Go and Python legs follow this shape.