Skip to content

fix: merge test/test-full leaf variants per-cell instead of wholesale - #80

Open
cgoea wants to merge 1 commit into
developfrom
users/cgoea/merge_test_leaf_variants_per_cell
Open

fix: merge test/test-full leaf variants per-cell instead of wholesale#80
cgoea wants to merge 1 commit into
developfrom
users/cgoea/merge_test_leaf_variants_per_cell

Conversation

@cgoea

@cgoea cgoea commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Motivation

upsert_leaf's test/test-full path replaced a per-arch test leaf (and its full variants list) 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

  • Added merge_matrix_test_leaf(existing, new) to therock_status_document.py, mirroring _merge_variant_leaf.
  • Wired StatusDocument.upsert_leaf's test/test-full branch: when the incoming leaf carries variants, it now merges into the existing leaf via merge_matrix_test_leaf and always reports the write as accepted.
  • Wired _refresh_same_run_fanout_tests in therock_update_status_json.py to merge cell-by-cell via merge_matrix_test_leaf instead of overwriting existing.variants = leaf.variants wholesale.

Test Plan

  • Updated test_upsert_test_replaces_whole_leaf_with_variants_atomically and renamed test_upsert_test_with_variants_rejects_lower_attempt_wholesaletest_upsert_test_with_variants_rejects_lower_attempt_per_cell
  • Added test_upsert_test_with_variants_always_returns_true, mirroring the existing test_upsert_build_with_variants_always_returns_true build-side coverage.
  • Added test_upsert_test_merge_does_not_regress_completed_cell: the core push-race regression test

Test Result

All tests passed.

@cgoea
cgoea requested review from a team and HereThereBeDragons August 14, 2026 13:57
@cgoea
cgoea changed the base branch from main to develop August 14, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant