Repository navigation
dagql: make the persisted-decode singleflight survive reader cancellation - #13962
Merged
Merged
Conversation
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
August 26, 2026 04:30
464d8fd to
696d83a
Compare
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
2 times, most recently
from
August 27, 2026 02:10
2c166b3 to
053d5e5
Compare
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
August 30, 2026 19:37
053d5e5 to
983cf4b
Compare
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
September 3, 2026 22:16
983cf4b to
c2b3558
Compare
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
September 3, 2026 23:05
c2b3558 to
ab561fc
Compare
Base automatically changed from
sipsma/remote-cache-track4-deferred-release
to
main
September 3, 2026 23:48
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
September 3, 2026 23:48
ab561fc to
d6e160c
Compare
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
September 9, 2026 22:09
d6e160c to
1ca59a2
Compare
ensurePersistedHitValueLoaded runs a persisted payload's decode on the decode leader's own request context: DecodeResult gets ContextWithCall(ctx, call) and syncResultSnapshotLeases gets ctx, with no WithoutCancel. When that context is canceled mid-decode, the decoder returns the context error, finishPersistDecode latches it exactly like a broken payload, and every joiner parked on persistDecodeWaitCh wakes, reads it, and returns it as its own failure. The joiner cannot tell a departed leader from a broken payload. The entry stays retryable because the channel is cleared, but the joiners already failed. The lazy singleflight handles the same class differently: evaluateOne runs the callback under context.WithoutCancel plus an attempt-scoped cancel, and waitForLazyEvaluation retries a healthy waiter on the attempt's own cancellation. The model had no way to reach this. A decode leader had exactly one exit (DecodeLeadFinish), a parked joiner had no own-cancellation arm although the Go select has one, and no configuration put a canceling reader next to a decode. Two actions close that gap, both enabled by ReaderCanCancel: - DecodeLeadCancel: the leader's context is canceled while it decodes. decodePhase returns to idle, decodeErr latches a new value "cancel", and the leader leaves through "canceling". The payload stays encoded, placing the cancellation inside DecodeResult, before the decoded value is installed. One action, because a caller arriving between the decoder's return, the latch, and the close either joins the published channel or leads afresh, which the model already reaches. - DecodeJoinCancel: a parked joiner's select takes its own ctx.Done arm. Nothing shared changes. DecodeWake now treats a latched "cancel" the way the code does today: the joiner returns the latched error and fails. The comment names the fix shape (loop back to the read barrier, as waitForLazyEvaluation does) and says why it is not modeled: the code does not do it. CancelOnlyOwn is a new property: an invocation in a cancel phase must carry ownCancel, a property-only ghost set by exactly the actions that model that invocation's own ctx.Done arm (WaiterCancel, WaiterCancelLate, ReadBarrierCancelHit/Wait, DecodeLeadCancel, DecodeJoinCancel). It pins any future decode fix against relabeling a foreign cancellation as the joiner's own: a DecodeWake that sent the joiner to "canceling" on a latched "cancel" trips it at once, where NoSpuriousErrors would go green. The spec header now lists every property-only definition and the contract each traces to. TypeOK gains the decodePhase, decodeErr, and ownCancel domains. No existing configuration reaches the new actions: the decode phases need ModelPersistence and the new arms need ReaderCanCancel, and no existing configuration enables both. ownCancel is a function of the phase in every existing configuration. All 25 existing configurations were re-run against this spec and every distinct-state count is identical to the stack-tip baseline (for example core 22,443; rollback 9,476,372; rollback_decode 2,146,638; lazy_import 2,617,035; persist 475,901). Signed-off-by: Erik Sipsma <[email protected]>
Three configurations put a canceling reader next to a persisted decode: one session, one call, two invocations (a leader and a joiner), an imported starting graph so an envelope row exists from the start, ReaderCanCancel on, DecodeCanFail off, release off. - decode_cancel: ACCEPTED FINDING, expected red on NoSpuriousErrors. The shortest trace is two lookup hits on the envelope row, DecodeLead, DecodeJoin, DecodeLeadCancel, DecodeWake sending the joiner to decodeErr, DecodeFailHit, and the joiner's operation exit as "failed": one caller's cancellation became another caller's error. TLC finds it after 35,399 distinct states with 10,797 still queued. The defect and the Go anchors are in the config header. Erik decides what to do with the code; the model keeps reporting it until the code changes. - decode_cancel_gates: the same scenario without the finding's invariant, so TLC explores the whole space (192,537 distinct states, 6s) and TypeOK, OwnershipExact, NoUnderflow, DecodeMutualExclusion, ReturnedLive, and CancelOnlyOwn hold in every state. It exists because TLC stops at the first violation: in decode_cancel the green invariants are only checked on the prefix explored before the red one. - decode_cancel_liveness: LiveSpec with EventuallyTerminal (808,537 distinct states, green). A canceled leader clears the channel before it leaves, DecodeWake is fair, so no joiner wedges. MaxResults is 4 for the same reason as persist_liveness. Evidence that the red is not vacuous and is attributable to cancellation alone: a probe for a joiner parked in decodeJoined with decodePhase idle and decodeErr "cancel" is reachable (TLC reports the probe invariant violated after 6,743 states); the same scenario with ReaderCanCancel off is green with all seven invariants (111,293 distinct states). Re-break of CancelOnlyOwn: a DecodeWake that relabels the latched "cancel" as the joiner's own "canceling" violates CancelOnlyOwn in both safety configurations, and NoSpuriousErrors no longer trips in decode_cancel, which is the relabeling the property exists to catch. TLC action coverage on decode_cancel_gates shows DecodeLeadCancel firing 12,164 times and DecodeJoinCancel 6,016 times. The expectedOutcome map records decode_cancel as the one expected violation and the README no longer says every configuration is green. Signed-off-by: Erik Sipsma <[email protected]>
…ncel arm Three review findings on the decode-cancellation model, two of them fidelity corrections. 1. A leader can fail or be canceled AFTER the decoded value is installed. ensurePersistedHitValueLoaded installs the payload under payloadMu once DecodeResult returns, then runs syncResultSnapshotLeases on the leader's own context, then finishPersistDecode. An error from the lease sync leaves the payload decoded with the error latched: the joiners already parked fail, later readers take the fast path at the top of the loop and never join, and the owner leases are never attached because nothing retries the sync. DecodeLeadCancel gains a second arm (installed \in BOOLEAN) for the context error, and DecodeLeadFinish's failure under DecodeCanFail splits into "failEnvelope" (DecodeResult failed; payload stays encoded; retried on the next demand) and "failDecoded" (AttachLease failed after install). One action suffices in both cases: a caller arriving between install and finish returns the decoded value without joining, in Go and in the model alike. The decode_cancel header now names both consequences; it previously claimed the lease sync was covered when it was not. 2. ReadBarrierCancelHit and ReadBarrierCancelWait fired for results whose barrier is "none". Go has the attach-barrier ctx.Done select only when attachDepsWaitCh is non-nil: fresh results get the channel in initCompletedResult and keep it closed afterwards (finishAttachDeps closes it and never clears it), so both arms stay ready for them; imported rows never get the channel. Both actions now require barrier # "none". A reader of an imported row can cancel only inside the decode. 3. Comment only: the DecodeLeadCancel comment now states why a new leader publishing a fresh channel between the old leader's clear and close needs no channel generation. In Go the old joiner wakes, reads the reset error, loops, and joins the new leader; in the model it stays parked until the new leader finishes (DecodeWake requires decodePhase idle) with DecodeJoinCancel enabled throughout. Either way it ends with the new leader's outcome or its own cancellation. Distinct-state counts, stack tip -> previous commit -> this commit: - rollback_decode 2,146,638 -> 2,146,638 -> 2,545,596 (failDecoded) - persist_liveness 543,821 -> 543,821 -> 608,429 (failDecoded) - rollback 9,476,372 unchanged (no persistence: every result is fresh, so the barrier guard removes nothing) - decode_cancel_gates 192,537 -> 180,497 (imported rows lose the attach-barrier cancel arm, gain the post-install cancel arm) - decode_cancel_liveness 808,537 -> 774,737, green - decode_cancel: still red on NoSpuriousErrors - lazy_import and persist (DecodeCanFail off) must stay at 2,617,035 and 475,901; verified in the same run as every other configuration. Probes against this spec: the post-install cancel state (payload decoded, decodeErr "cancel") is reachable; the parked-on-"cancel" state is reachable; the no-cancellation control is green at 111,293; the relabeling DecodeWake violates CancelOnlyOwn in both safety configurations. Signed-off-by: Erik Sipsma <[email protected]>
… generations The post-install failure arm made the old decode-wake abstraction unfaithful. In Go the leader installs the decoded value under payloadMu as soon as DecodeResult returns, and only then runs the lease sync and finishPersistDecode. A reader reaching the top of the loop after the install returns the value on the fast path even while the attempt is still running. Combined with a new leader publishing a fresh channel between the old leader's clear and close, that produces a joiner that ends successfully: leader A latches and clears, new leader B publishes a fresh channel and resets the error, B's DecodeResult succeeds and B installs the value, A closes its old channel, A's joiner wakes, reads nil, loops, sees the value, and returns; B's sync then fails or is canceled. The previous model made B's install atomic with B's finish and kept A's joiner parked until B finished, so that joiner inherited B's error instead. The model over-approximated failures, which was conservative for every asserted property, but it was not the code. Minimal faithful change: - DecodeInstall(i): the payloadMu block after DecodeResult. The payload becomes decoded while the attempt keeps running; from that instant ReadBarrierOk serves new readers without joining. - DecodeLeadFinish's "ok" and "failDecoded" outcomes require the install to have happened; "failEnvelope" requires that it has not. DecodeLeadCancel no longer chooses an arm: whether the install already happened is state. - Channels are generations. res.decodeGen is incremented by every finish or cancellation (the clear-and-close); DecodeJoin records the current generation in invocations.joinedGen; DecodeWake is enabled once decodeGen has moved past joinedGen, regardless of decodePhase, and reads the CURRENT decodeErr: "fail" or "cancel" fails the joiner as today, "none" loops it back to the read barrier, where it returns an installed value, rejoins a running attempt, or leads. That is Go's wake-read-loop. TypeOK bounds both counters by MaxInvocations: every increment is one leader's finish and an invocation leads at most once. - Comments: the outcome-equivalence claim in DecodeLeadCancel is gone; the decode comments say a failure is retryable only when it landed before the install; and every place that said the owner leases are "never attached" now says that syncResultSnapshotLeases removes and attaches leases one at a time and returns on the first error, so the desired lease set may be left incompletely synchronized (earlier attaches and imported leases may already exist) and the decode path does not retry it. Distinct-state counts, commit 3 -> this commit (every configuration with ModelPersistence on changes, because the install is now its own step): - rollback_decode 2,545,596 -> 3,186,402 - persist 475,901 -> 553,097 - persist_liveness 608,429 -> 697,841 - lazy_import 2,617,035 -> 4,696,841 - flush_roundtrip 9,973 -> 10,006 - flush_closure 80,246 -> 80,378 - flush_inflight 52,852 -> 53,002 - flush_drained 17,991 -> 18,024 - poisoned_restart 14,149 -> 14,182 - decode_cancel_gates 180,497 -> 237,373 - decode_cancel_liveness 774,737 -> 876,413 - decode_cancel: still red on NoSpuriousErrors Every configuration without persistence is unchanged (they cannot reach the decode actions); the full table is in the report. Probes against this spec: the parked-on-"cancel" state and the post-install cancel state stay reachable; a joiner whose channel closed while a newer leader runs with the value already installed is reachable with three invocations (no committed configuration has three, so that path is exercised only by the probe); the no-cancellation control is green; the relabeling DecodeWake violates CancelOnlyOwn in both safety configurations. Signed-off-by: Erik Sipsma <[email protected]>
Comment-only; the transition relation is unchanged, so no configuration was re-run. - DecodeLeadFinish's "failDecoded" comment said nothing retries the post-install lease sync. That is broader than the code: the decode path does not retry it, but SyncResultSnapshotOwnerLeases (cache.go:1549, called from core/schema/http.go:165) runs the same sync later on its own. It now says what the other corrected sentences say: the decode path does not retry it. - The decode_cancel header said "both arms of DecodeLeadCancel". Since the install became its own step, DecodeLeadCancel is one transition and the payload state records whether DecodeInstall happened. It now says "before or after DecodeInstall". Signed-off-by: Erik Sipsma <[email protected]>
…ending lease sync The persisted-decode singleflight in ensurePersistedHitValueLoaded ran entirely on the decode leader's request context and latched a cancellation like a broken payload: every parked joiner woke, read the latched context error, and returned it as its own failure. A cancellation that landed in syncResultSnapshotLeases after the payload install additionally left the owner-lease set incompletely synchronized with nothing retrying it, because later readers took the decoded fast path and never joined. The lazy singleflight had this class fixed in waitForLazyEvaluation (#13938); the decode singleflight did not. Port the same two mechanisms: - finishPersistDecode latches a retry classification next to the error (persistDecodeRetry, computed by lazyEvalErrorCausedByContext against the leader's context). A woken joiner with a healthy context treats a departed leader's cancellation as retryable and loops - leading or joining afresh - instead of failing. Its own cancellation still returns its own cause, and a genuine decode failure still propagates. - A failure after the payload install sets persistLeaseSyncPending (computed inside the finish as installed-and-failed, mirroring lazySyncPending). The fast path does not serve a value while the flag is set; the next demand leads a sync-only attempt that skips the decode and retries just the lease reconciliation. Retrying the sync is safe because syncResultSnapshotLeases stores the reconciled link set only on full success, so a retry re-diffs from the previous stored state. The decode attempt itself stays on the leader's context. The fuller port - a detached attempt context with waiter refcounting, as the lazy path has - was considered and deliberately not done: retrying the bounded decode is enough for correctness, and the detached-attempt machinery would be a much larger change for an efficiency gain only. Tests cover the four shapes: a leader canceled mid-decode with a parked joiner (the joiner succeeds by re-leading; the decoder runs twice), a leader canceled inside the post-install lease sync (the next demand runs a sync-only retry, the desired lease ends attached, and the payload is decoded exactly once), a joiner's own cancellation (returns its own cause), and a genuine decode failure (propagates to callers, no retry). fakeSnapshotManager's attach block is now one-shot and context-aware so a canceled attach returns the context cause and a retried sync proceeds unblocked. Signed-off-by: Erik Sipsma <[email protected]>
…ose the finding Mirror the previous commit in the TLA+ model and close the decode_cancel accepted finding. Model changes: - DecodeWake sends a joiner that read a latched "cancel" back to the read barrier (the retry loop, waitForLazyEvaluation's shape); only a genuine "fail" still exits through decodeErr. - New result field persistSyncPending (Go persistLeaseSyncPending). DecodeLeadFinish computes it exactly as the Go finish does (installed-and-failed; "ok" clears it), DecodeLeadCancel sets it when the payload is decoded, ReadBarrierOk requires it clear, and DecodeLead/DecodeJoin accept a decoded payload with the flag set - the sync-only attempt. TypeOK pins the flag to installed payloads. - decode_cancel now expects a pass on all seven invariants, including NoSpuriousErrors; its header describes the contract instead of the defect. decode_cancel_gates existed only because TLC stops at the first violation of the expected red; with the red gone it is exact duplicate coverage and is deleted. expectedOutcome and the README follow. Evidence (pinned TLC jar, -workers auto, -Xmx8g, logs under /tmp/tlc-fix/): - decode_cancel: pass, 229,933 distinct states, 12s. - decode_cancel_liveness: pass, 868,973 distinct states, 3min02s solo. - Re-break: reverting only DecodeWake's cancel branch in a scratch copy turns decode_cancel red on NoSpuriousErrors again (11-state trace: lead, join, DecodeLeadCancel, wake to decodeErr, failed; 33,146 distinct states at the violation). - Probes (scratch copies, INVARIANTS replaced, all violated, i.e. reachable): persistSyncPending set; a sync-only leader running on a decoded pending payload; a woken retryer at the read barrier with the canceled latch. - All 25 other configurations: distinct-state counts identical to the pre-fix spec except rollback_decode 3,186,402 -> 3,203,610 and persist_liveness 697,841 -> 700,073, both deliberate: the DecodeCanFail configs now reach the pending-flag states and the sync-only attempts. Configurations without decode failure injection cannot set the flag, so their counts cannot change, and did not. - dagger check tla-check:cache-lifecycle on this tree: OK in 6m20s, exit 0. Consolidation measured and decided: - MaxInvocations 3: still running at 26,973,029 distinct states after seven minutes when stopped - far past a CI lane budget. The config stays at 2 invocations; with the retry modeled, the joiner-of-canceled-attempt-succeeds path is reachable at 2 (the joiner re-leads), so only the wake-to-a-newer-leader interleaving remains 3-invocation-only. - AllowRelease TRUE: violates NoSpuriousErrors through a path unrelated to the decode - a waiter whose own session is released mid-flight fails at publication (pubErrDropHold). No existing configuration pairs AllowRelease with NoSpuriousErrors, so this shape was never checked. Release stays off here; whether to refine the invariant for release scenarios is a separate decision. Signed-off-by: Erik Sipsma <[email protected]>
Review finding (blocker): a reader that read the encoded payload at the loop top, then paused before acquiring persistDecodeMu while another leader decoded, installed, synced, and finished cleanly, would publish a redundant attempt: it skipped the decode on the re-read but ran syncResultSnapshotLeases unconditionally, and that redundant sync could fail or be canceled, re-latching an error and re-setting persistLeaseSyncPending on a fully healthy entry. The TLA+ model already excludes this transition (DecodeLead requires an envelope or decoded-with-pending), so the code moves to the model, not the model to the code. The leader now re-reads the payload state and the pending flag while holding persistDecodeMu, after finding no published channel. If the payload is installed and the sync is not pending there is nothing to lead: unlock and loop back to the fast path. The same read decides whether the attempt is a full decode or sync-only, replacing the post-publish re-read. Also from the review: - Three test hooks on Cache (pre-lock, joined, lead-published), the same pattern as testAfterLazyEvalFinish. The joiner tests now wait on the joined hook instead of sleeping 100ms, so they deterministically exercise the parked-joiner paths, and the genuine-failure test asserts the decoder ran exactly once. - A regression test for the stale-reader race: the leader is held in the decoder, the stale reader is held between its loop-top read and the mutex, the leader finishes cleanly, and the stale reader must serve the value without publishing (one decode, one published attempt in the whole test). With the leadership re-check reverted, the test fails on leadPublishes 2 != 1. - The finishPersistDecode comment no longer claims the close happens inside the critical section: the latch and clear are under the mutex, the close is after unlocking. Validation: gofmt/vet clean; full dagql package green under -race (/tmp/fixtests/dagql-final.log). The spec is untouched by this commit. Signed-off-by: Erik Sipsma <[email protected]>
Comment-only; the transition relation is unchanged. The header still
described the pre-fix behavior ("terminates, with the latched error
today"). It now says a woken joiner retries a departed leader's
cancellation and terminates under fairness, with the argument for why
the retry cannot loop forever.
Re-run after the edit, identical to the pre-edit run: green, 868,973
distinct states (/tmp/tlc-fix/all/decode_cancel_liveness_round2.log).
Signed-off-by: Erik Sipsma <[email protected]>
Comment-only; the transition relation is unchanged. After a post-install cancellation the retry leader runs sync-only - the payload is already installed, so DecodeInstall is disabled - so the header now says fair waiter progress completes the remaining decode or sync-only attempt, instead of claiming a leader installs. Signed-off-by: Erik Sipsma <[email protected]>
Give each cluster separate config and data volumes using its existing unique kubeconfig token. Concurrent fixtures with the same service name must not remove each other's live cluster state. Signed-off-by: Erik Sipsma <[email protected]>
Apply the existing manual model-check discipline from the first open PR. The default CI check list should not start the full model suite. Signed-off-by: Erik Sipsma <[email protected]>
Use the existing heartbeat setting for both example subprocesses so elapsed time does not change final-report comparisons. Signed-off-by: Erik Sipsma <[email protected]>
Prepare diagnostic call digests before the streamed graph capture acquires cache locks. Cold result references can then resolve while a graph writer is waiting, without blocking the snapshot behind its own read lock. Preserve the existing JSON fields and report unavailable diagnostics for frames added or replaced after preparation. A deterministic regression queues a writer during output and checks the resulting digests. Signed-off-by: Erik Sipsma <[email protected]>
Make the synchronization purpose explicit inside the critical section. Signed-off-by: Erik Sipsma <[email protected]>
The expectedOutcome edits in this branch shifted line numbers in main.go, and the generated bindings' SourceMap coordinates were never regenerated. Applied with `dagger generate -y go-sdk:generate`; the diff is source-map line numbers only, no signature, description, or behavior changes. Signed-off-by: Erik Sipsma <[email protected]>
sipsma
force-pushed
the
sipsma/remote-cache-track5-reader-cancel
branch
from
September 18, 2026 18:10
a5c4b25 to
c6653c6
Compare
…ations main's cache model now declares the DelegatedReleaseOnly constant (its orphaned-lease mutation) and every configuration on main sets it. The two configurations this branch adds were written before that constant existed and did not set it, so TLC would refuse to load them. Both set it to FALSE, the non-mutation value, like every other green configuration. Signed-off-by: Erik Sipsma <[email protected]>
grouville
approved these changes
Sep 18, 2026
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.
Summary
A persisted-decode leader runs
DecodeResultandsyncResultSnapshotLeaseson its own request context, andfinishPersistDecodelatched its cancellation exactly like a broken payload. Every joiner parked onpersistDecodeWaitChwoke, read the latched context error, and returned it as its own failure, so one caller's cancellation became another caller's error. A cancellation that landed after the payload install additionally left the result's owner-lease set incompletely synchronized: later readers took the decoded fast path and never joined, and nothing retried the sync. #13938 fixed this class for the lazy singleflight (waitForLazyEvaluation); the decode singleflight had not been changed.This is layer five of the cache-remediation stack. It is stacked on #13940 (base branch
sipsma/remote-cache-track4-deferred-release) and depends on #13940, #13938, #13936, and #13934. The TLA+ model work that isolated and pinned this defect (the formerdecode_cancelaccepted red finding) is included in the range.Design
finishPersistDecodelatches a retry classification next to the error (persistDecodeRetry, computed by the existinglazyEvalErrorCausedByContextagainst the leader's context), together with the pending-sync flag and the channel clear, in onepersistDecodeMucritical section. A woken joiner with a healthy context treats a departed leader's cancellation as retryable and loops - leading or joining afresh - instead of failing. Its own cancellation still returns its own cause; a genuine decode failure still propagates.persistLeaseSyncPending(computed as installed-and-failed, mirroringlazySyncPending). The fast path refuses to serve a value while the flag is set; the next demand leads a sync-only attempt that skips the decode and retries just the lease reconciliation. Retrying is safe becausesyncResultSnapshotLeasesstores the reconciled link set only on full success, so a retry re-diffs from the previous stored state.persistDecodeMu: a reader that raced a successful leader finds nothing left to lead and loops to the fast path instead of publishing a redundant attempt whose sync could fail and re-latch an error.Model
DecodeWakesends a joiner that read a latched cancellation back around the loop; a newpersistSyncPendingresult field mirrors the Go flag throughDecodeLeadFinish,DecodeLeadCancel,ReadBarrierOk,DecodeLead, andDecodeJoin(the sync-only attempt reuses the decode actions).decode_cancel, previously the model's one accepted red finding (NoSpuriousErrors), is now a green gate over all seven invariants at 229,933 distinct states.decode_cancel_gatesexisted only because TLC stops at the first violation of an expected red; it is deleted as exact duplicate coverage.decode_cancel_livenessis green at 868,973 distinct states.DecodeWake's cancel branch turnsdecode_cancelred again with the original trace. Three reachability probes (pending flag set; sync-only leader running; woken retryer at the barrier) are all reachable.rollback_decode3,186,402 -> 3,203,610 andpersist_liveness697,841 -> 700,073, both deliberate: the decode-failure-injection configurations now reach the pending states.MaxInvocations = 3(stopped past 26.9M distinct states, beyond a CI lane budget; the retry-success path is reachable at 2) andAllowRelease = TRUE(tripsNoSpuriousErrorsthrough an unrelated released-session publication failure; no existing configuration pairs release with that invariant, and refining it is a separate decision).Validation
go test -race ./dagql -count=1green, including five targeted decode-cancellation tests: leader canceled mid-decode with a parked joiner, cancellation inside the post-install lease sync, joiner's own cancellation, genuine decode failure, and a regression test for the stale-reader leadership race. The concurrent tests synchronize on test hooks rather than sleeps, and the regression test fails when the leadership re-check is reverted.go vet/gofmtclean.dagger check tla-check:cache-lifecycle- 27 configurations green (6m20s).No integration test suite was run.
🤖 Generated with Claude Code