A pass's credit-error mark ignores a grant seen since the pass started #3

Open
opened 2026-11-02 18:34:14 +00:00 by jorijnvdgraaf · 0 comments

When a pass ends with the credit error, Settle calls Ledger::MarkOut unconditionally. Ledger::Reconcile (1.1.0) records a probe's credit error only when no grant was seen since the probe started (grantSeen), because the reading may predate the grant. A pass has the same race: its request can hit the credit error just before the credits land, and the process can end after another driver's probe has lifted the key. The late mark then holds a freshly granted key out until the next run's probe lifts it again.

A fix records a pass's credit error under Reconcile's rule, against the pass's start, with a test of a mark that arrives after a grant seen since the pass began.

Found by the 1.1.0 push gates.

When a pass ends with the credit error, `Settle` calls `Ledger::MarkOut` unconditionally. `Ledger::Reconcile` (1.1.0) records a probe's credit error only when no grant was seen since the probe started (`grantSeen`), because the reading may predate the grant. A pass has the same race: its request can hit the credit error just before the credits land, and the process can end after another driver's probe has lifted the key. The late mark then holds a freshly granted key out until the next run's probe lifts it again. A fix records a pass's credit error under Reconcile's rule, against the pass's start, with a test of a mark that arrives after a grant seen since the pass began. Found by the 1.1.0 push gates.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Catcrafts/Crafter.Review#3
No description provided.