Skip to content

give a lease-extend joiner its own shortfall - #122

Merged
bpapillon merged 1 commit into
mainfrom
bpapillon/sch-7488-sdk-check-that-joins-a-running-lease-extend-does-not-get-its
Sep 17, 2026
Merged

bpapillon merged 1 commit into
mainfrom
bpapillon/sch-7488-sdk-check-that-joins-a-running-lease-extend-does-not-get-its

Conversation

@bpapillon

Copy link
Copy Markdown
Collaborator

Extend is single-flight per slot, so a check that arrives while an extend is in flight joins it and gets whatever that extend asked for. A background extend for the default tranche running when a check needs more than the tranche left the check failing with insufficient lease balance while the server still had the credits.

Ports the shape from schematic-node #187. The flight records the additional amount its wire call asked for, sized one level above the wire call so the registered figure and the request body match. A joiner whose shortfall exceeds the flight's ask waits the flight out, re-reads the slot, and issues exactly one follow-up extend for the difference. A follow-up never chains, so a server that cannot cover the request does not spin, and the flight cleanup is identity-guarded so it cannot evict a follow-up registered under the same key. Watermark joiners and any check the tranche covers still share one wire call.

SPEC.md carries the same joiner rule as Node. Tests cover the follow-up sizing, the no-chain rule, shared wire calls for in-tranche joiners, the cleanup guard, and the end-to-end check that now reserves after one follow-up.

@bpapillon
bpapillon force-pushed the bpapillon/sch-7488-sdk-check-that-joins-a-running-lease-extend-does-not-get-its branch from 407bc0c to 63fb786 Compare September 17, 2026 00:52
@bpapillon
bpapillon merged commit 2011a79 into main Sep 17, 2026
6 checks passed
@bpapillon
bpapillon deleted the bpapillon/sch-7488-sdk-check-that-joins-a-running-lease-extend-does-not-get-its branch September 17, 2026 00:55
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.

2 participants