Repository navigation
fix(lens): retry unconfirmed progress without replaying reviews - #76
Merged
Merged
Conversation
Collaborator
Author
|
bugbot run |
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.
Concurrent investigation tasks can fail with HTTP 409 after ClickHouse commits a progress update but its acknowledgment arrives after the writer lease expires. Retry uncertain progress writes only when they contain no review, using the existing retry window and reacquiring ownership before each attempt
Implements the narrow no-review retry proposed by the reporter in #74. Review-bearing writes and arbitrary mutations retain their existing no-replay behavior, so an uncertain write cannot append the same review or charge usage twice
Validation uses real ClickHouse 26.9.6.6 and Keeper with a forwarding proxy that delays the acknowledgment after publication. On base e320cab, four concurrent worker progress calls reproduce the reported 409. On this branch all four succeed and retain their activities. Storage tests also cover one stage transition, no duplicate reviews, and persistent delays exhausting the retry window with WriteUnconfirmed
Reproduction and regression checks:
This fixes transient progress-write uncertainty. It does not replay model-budget mutations or guarantee completion through a prolonged storage outage. Preserving finished candidate results is addressed separately for #75
Formatting and workspace Clippy pass. The full workspace test run passed all targets except a Docker startup timeout in the existing trace-query fixture; all 21 tests in that target passed on a serial rerun. An earlier unrelated OAuth fixture port-discovery failure also passed on rerun. The new regression tests passed in the workspace run
The bundled agent dependencies now use patched zod, body-parser and undici releases, including the required qs update. Both agent suites pass (96 tests), type/style checks pass, and the production agent bundle has zero Grype findings with the October 26 vulnerability database
The existing live-writer test now verifies the lease through the active repository connection. Its separate fixture connection was idle for the full 30-second retry window, matching ClickHouse’s HTTP keep-alive timeout. The unchanged base reproduced the same post-timeout Transport error in one of six repeated runs. The corrected test passed all six equivalent repeats, and all 146 investigation tests pass on this branch. Formatting and workspace Clippy pass. The assertion still checks the exact lease and unchanged investigation, and the deadline assertions are retained
Fixes #74