Repository navigation
Conversation
hidb4ai
reviewed
Oct 23, 2026
hidb4ai
left a comment
Contributor
There was a problem hiding this comment.
One non-blocking progress-reporting regression in the batching change.
knqiufan
force-pushed
the
codex/batch-archive-compatibility-2169
branch
from
October 25, 2026 06:00
9c2cd4a to
4b5c8a7
Compare
This branch has not been deployed
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.
Which issue or RFC does this PR close?
Closes #2169.
Rationale for this change
Archive validation performs one target lookup per record. Batching reduces compatibility queries for 5,000 Sources, one Scope, and one journal head from 5,002 to 52 while retaining per-record decoding, dependency validation, and digest comparisons.
What changes are included in this PR?
UNION ALLstatements: up to 100 branches per statement, 900 pending parameters, and 1 MiB of encoded pending keys/digests.Are there any user-facing changes?
Archive dry-run, restore validation, and idempotent retry perform fewer database executions. Target-check progress is reported after each completed batch. Public APIs, schemas, archive formats, and conflict classification are unchanged.
Recorded file-backed SQLite measurements from 2026-10-23 show 5,002-record validation decreasing from 16.3445 to 9.1713 seconds for an empty target and from 16.9955 to 10.7552 seconds for an identical target. These are medians of three runs on Windows 11, CPython 3.12.13, and SQLite 3.50.4 with 256-byte Source content and no injected network delay. Environment, baseline, query counts, restore timing, and qualification limits are documented in both locales; these measurements are not a general backend throughput guarantee.
How was this change tested?
.venv/Scripts/python.exe -m pytest -n 4 tests/builtin/portability/test_bundle.py tests/test_archive_cli.py tests/e2e/test_portable_archive.py -q: 203 passed, 63 skipped..venv/Scripts/python.exe -m pytest tests/builtin/portability/test_bundle.py -k intermediate_target_progress -q: 3 passed. Before the progress fix, the empty and identical target cases failed; the absent-table control passed.ty checkfor the four changed Python files: passed.ty check --python-platform linux --exclude docs/my --exclude evaluation/web: passed. The exclusions are existing local, untracked directories.UV_NO_SYNC=true SKIP=ty-check uv run --locked prek run -a: passed; type checks were run separately as above.uv lock --lockedandgit diff --check: passed.SQLite was executed locally. Native SeekDB is unavailable in this Windows environment, and no OceanBase test URL was configured. The real-backend cases remain unqualified for the changed query path; parameterized tests do not establish acceptance. Keep this PR in draft until actual SeekDB/OceanBase runs qualify it.
AI usage statement
OpenAI Codex assisted with implementation, regression tests, documentation, and local review using the Open Code Review plugin's delegation rules. The original optimization and benchmark also used the plugin's configured DeepSeek Flash provider for automated review.