Repository navigation
Add captured conflict backlog management #2158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PRAZPC
wants to merge
17
commits into
ClickHouse:main
Choose a base branch
from
PRAZPC:feat/2077-captured-conflict-management
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,946
−206
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e7c541a
Add captured conflict backlog management
PRAZPC 4a787f5
Merge upstream main into captured conflict management
PRAZPC e979a02
Guard captured conflict acceptance against stale peers
PRAZPC 2c5dc83
Classify captured rows in mentor conflict backlog
PRAZPC f5fd6c7
Keep conflict review position after decisions
PRAZPC 49db5f6
Merge remote-tracking branch 'upstream/main' into feat/2077-captured-…
PRAZPC f0ffd3e
Fence both revisions during bulk acceptance
PRAZPC 9f7eb7b
Keep conflict queue decisions and counts current
PRAZPC 979cb84
Merge current main and regenerate references
PRAZPC 7418bc4
Merge current main into captured conflict management
PRAZPC 46a94ba
Preserve captured conflict review policy across writes
PRAZPC 8ae03d6
Gate captured provenance on resolver capability
PRAZPC 07ca202
Pause captured writes during resolver rollout
PRAZPC bcf3142
Merge remote-tracking branch 'upstream/main' into HEAD
PRAZPC 8fa886c
Document Codex review notice hook boundary
PRAZPC 2dbd79a
Gate snapshot restores on resolver support
PRAZPC a5c3725
Merge current main and address captured conflict review findings
PRAZPC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Captured conflict simulation | ||
|
|
||
| The seven-day model compares the resolver's default policy with an owner opt-in for settling | ||
| high-confidence updates between authenticated captured rows. It uses the production decision | ||
| helpers and fixed verdicts; it does not call an LLM or ClickHouse. | ||
|
|
||
| Run it from the repository root: | ||
|
|
||
| ```bash | ||
| uv run --locked python scripts/ops/simulate_captured_conflicts.py | ||
| ``` | ||
|
|
||
| ## Results | ||
|
|
||
| | Scenario | Captured rows | Human-reviewable pairs, default | Human-reviewable pairs, opt-in | All automatic settlements, default | All automatic settlements, opt-in | Captured-policy settlements, opt-in | | ||
| | --- | ---: | ---: | ---: | ---: | ---: | ---: | | ||
| | Light | 700 | 372 | 141 | 176 | 407 | 231 | | ||
| | Steady | 1,750 | 975 | 328 | 413 | 1,060 | 647 | | ||
| | Surge | 3,500 | 1,965 | 645 | 829 | 2,149 | 1,320 | | ||
|
|
||
| In all six runs, backlog growth, false automatic settlements, and settled genuine | ||
| contradictions were zero. Each scenario used a review capacity of 2,000 pairs per sitting. | ||
| The model produced no failed resolver jobs and left no resolver work pending. | ||
|
|
||
| ## Model inputs and limits | ||
|
|
||
| - Seven days of seeded synthetic cases use fixed resolver verdicts and confidence scores. | ||
| - Resolver batches contain 40 rows, concurrency is 8, bursts last at most 300 seconds, and a | ||
| row gets at most three attempts. | ||
| - A daily resolver call cap stands in for the namespace cost-share limit; it is not a provider | ||
| price estimate. | ||
| - Review capacity is an input, not a measured operator rate. The generated workload contains | ||
| no Undo events. | ||
| - Synthetic case mixes and fixed verdicts do not represent production distributions. The model | ||
| excludes database races, provider latency distributions, and real restore writes. |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1 — The documented manual-review guarantee has an inline exception. Under
newest_wins,check_on_commitcan classify a templated update asrefines, and the commit retires the peer before the resolver sees it. Cover the inline path with the captured policy and test a captured update against a templated peer.