fix(history): serialize collision rebuilds with appends - #5088
Conversation
Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
Duang777
left a comment
There was a problem hiding this comment.
Exact-head self-review for 67bc85d: APPROVE for maintainer review. The rebuild now holds the shared run-index lock across collision detection and replacement, and the regression test exercises a concurrent append during rebuild. All branch-specific CI checks passed. The remaining installed-artifact failure is the main-branch packaging defect tracked by #5096.
…ebuild-lock Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
Duang777
left a comment
There was a problem hiding this comment.
Exact-head self-review for f9e43f87735ae373aaa7e22e884efba4e68143cb: ready for maintainer review. This head merges origin/main@eaa0c0fd089e5844b763cc24132dcf8a3881c39b without conflicts and retains only the run-index serialization fix plus its regression test. Local validation passed: 33 focused Python tests, Ruff, Mypy, history-index smoke, docs governance, and the standard premerge gate with 13 checks.
|
CI triage for exact head |
Summary
Root cause
apply_reviewed_collision_rebuildrewroteindex.jsonlfrom an unlocked snapshot. A normal run append could commit after that snapshot and then be overwritten by the rebuild replacement.Validation
python -m pytest -q tests/test_history_index_write_serialization.py tests/test_history_chronology.py tests/control_plane/test_run_artifact_reservation.py tests/control_plane/test_quota_void_commit_runtime.py(33 passed)python examples/history-index-duplicate-inspection-smoke.pypython -m mypy loopx/control_plane/runtime/run_index_rebuild.pypython -m ruff check loopx/control_plane/runtime/run_index_rebuild.py tests/test_history_index_write_serialization.pypython -m loopx.cli canary premerge --from-git-diff --tier standard --format json --no-progress(passed, 13 selected checks)python examples/docs-governance-smoke.pyKnown baseline failure
python examples/repository-hygiene-smoke.pyreports the existing missing release timeline entry forv1.2.0; the same failure reproduces on unchangedorigin/main.Merge policy
Control-plane behavior change. Maintainer review and merge required; do not self-merge.