fix: merge test/test-full leaf variants per-cell instead of wholesale - #80
Merged
HereThereBeDragons merged 3 commits intoAug 17, 2026
Merged
Conversation
…e_matrix_test_leaf. add test for it. small fix for code readability.
HereThereBeDragons
approved these changes
Aug 17, 2026
HereThereBeDragons
left a comment
Collaborator
There was a problem hiding this comment.
directly added code changes as review due to OOO
…test_leaf_variants_per_cell
HereThereBeDragons
deleted the
users/cgoea/merge_test_leaf_variants_per_cell
branch
August 17, 2026 16:41
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.
Motivation
upsert_leaf's test/test-full path replaced a per-arch test leaf (and its fullvariantslist) wholesale whenever the do-not-downgrade guard accepted the update. The build phase already avoided this via_merge_variant_leaf, which merges matrix cells one at a time, but test/test-full had no equivalent.Technical Details
merge_matrix_test_leaf(existing, new)totherock_status_document.py, mirroring_merge_variant_leaf. Beyond per-cell variant merging, its leaf header (run_id/run_attempt) advances monotonically via the sameshould_replaceguard, so a race-loser snapshot cannot regress the header.StatusDocument.upsert_leaf's test/test-full branch: when the incomingleafcarriesvariants, it now merges into the existing leaf viamerge_matrix_test_leafand always reports the write as accepted._refresh_same_run_fanout_testsintherock_update_status_json.pyto merge cell-by-cell viamerge_matrix_test_leafinstead of overwriting the leaf'svariantswholesale. After mergingdevelop(prevent cross-architectural leakeage in matrix_job_re #76), this composes with prevent cross-architectural leakeage in matrix_job_re #76's per-arch scoping: variants are re-derived per architecture into acandidate, and that per-archcandidateis what gets merged cell-by-cell, so per-cell preservation and cross-arch isolation both hold.Test Plan
test_upsert_test_replaces_whole_leaf_with_variants_atomicallyand renamedtest_upsert_test_with_variants_rejects_lower_attempt_wholesale->test_upsert_test_with_variants_rejects_lower_attempt_per_cell.test_upsert_test_with_variants_always_returns_true, mirroring the build-side coverage.test_upsert_test_merge_does_not_regress_completed_cell: the core push-race regression test.test_matrix_merge_leaf_header_keeps_newer_run_over_stale_loser,..._advances_to_newer_run,..._takes_higher_attempt_within_run) covering the monotonicrun_id/run_attemptpick.Test Result
All tests pass (the 3 pre-existing
therock_workflow_registry_test.pyenv failures aside).