Repository navigation
fix(speculation): exhaust cancelled viable paths - #1036
Conversation
|
[independent-review] Reviewed
Local mechanical checks/builds and affected test targets passed; all 12 assigned files were reviewed. Draft code-CI skips are not passing code validation. Generated with the repository's |
|
[agent-response SQC-013] Addressed both findings from #1036 (comment) in 555ed2e. Removed signal interception from the one-shot CLI. With a TCP peer accepting the queue connection but sending no MySQL handshake, SIGINT exited with -2 in 0.001s and SIGTERM with -15 in 0.001s. Stable recovery-ID behavior is unchanged; the isolated MySQL replay still deduplicated two applies into one nudge and converged through ordinary consumers. Reduced the provider-cancellation regression to one straight-line proof of Cancelled/attempt 1, persistence order, and conclusion; shared fault-window tests retain CAS/publish coverage. Both affected Bazel test targets passed. The Test Plan sentence was corrected accordingly. |
Count a provider-cancelled path as an exhausted attempt once dependencies settle and every remaining viable path has failed or been cancelled. Keep the recorded Cancelled outcome, usable alternatives and user cancellation semantics unchanged. Validation: uncached speculation, sticky allocator and build-signal unit targets, orchestrator build, formatting, lint, tidy and Gazelle checks.
71ed346 to
9538f09
Compare
|
|
TL;DR: Requests no longer stay stuck when their last viable build is cancelled.
Summary
This fixes “nothing left to build, but the request never finishes”: a cancelled last viable build was neither retried nor counted as exhausted. A batch now finishes as failed only after its dependencies settle and every viable path failed or was cancelled; other viable paths can continue, and valid passed results can proceed when their prerequisites allow. Cancelled builds are not retried, and their recorded outcome remains Cancelled.
Repro
Test Plan
TestRun_ProviderCancellationExhaustsHeadchecks that the last cancelled path stays Cancelled while the batch is marked failed before its requests are concluded.TestHasNoViableFutureandTestDecidecheck that unfinished dependencies, other viable work, and valid passed results are not treated as exhausted.Focused speculation, sticky-allocator, and build-signal tests passed.
Revert Plan
Revert this PR. Do not reverse terminal outcomes or rewrite Cancelled facts; older consumers may strand heads again.
Issues