Skip to content

a branch that adds a ctest row NAME the base already registers fails at Configure, on the branch that lost the race (two instances today) #3223

Closed

Description

@bong-water-water-bong

Two lanes fixing the same hole from two directions collide at Configure, and the branch that loses the race wears a red build for a change that is correct. CMakeLists.txt is where every lane appends its registration row, so a merged row's name becomes a namespace nobody reserves.

Measured twice on 2026-11-21

ci 44928694682   cl-infra/3216-wired-marker (#3220)   build  Configure  FAILURE
  add_test given test NAME "registry_build_self" which already exists in this

registry_build_self merged to main at 17:06:10 (b299efbc4, #3217, CMakeLists.txt:1654). #3220's branch was cut before that and adds the identical line, so its configure sees the name twice and stops. #3219 carries the same hunk and is green — its base predates the merge — which is the whole shape: same fix, different base, opposite outcome, and nothing wrong in either PR.

The other instance is the same row from the other side: registry_build --self-test had no runner, #3217 added one, and #3220 was adding one too, because #3216 (the checker counting a name as wiring) is exactly why neither of us could see the other's row.

Why nothing catches it

#1979 (closed) covered stale registration hunks — patch conflicts from shifting lines, which a rebase shows you. This is a name collision, which a rebase also fixes but which surfaces as a CMake error rather than a conflict, on one side only.

The shape I would take

A pre-PR row that intersects the names a branch adds (git diff <base>...HEAD over add_test(NAME X) and the repo's own add_python_test(X wrapper) with the names present in <base>:CMakeLists.txt — the base tip, because that is where the duplicate appears — and says which name and why. Rebased, the diff stops adding the row and the check goes quiet, which is the fix.

Activity

  1. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Two PRs fix this with two different tools, and the choice is where the check runs, not which is bigger

    Eighth duplicate pair today, so the numbers first — and here the two are not the same design, which is why the difference matters more than the sizes:

    PR diff files where it runs verdicts at head
    #3224 (os3-3222-rowcoll) +186/−5 tools/ci/add_test_collision_check.py (161), a row in scripts/pre-pr-checks.sh (+8/−2), docs/pre-pr-checks.md, and tests/pre_pr_checks_modes_test.sh (+10/−3) the local pre-PR gate every lane runs 3
    #3226 (cl-infra/3223-ctest-row-name) +232/−0 tools/ci/ctest_row_name_check.py (228) + one ctest row in CMakeLists.txt CI, via ctest 2

    Both detect the same collision — a branch that adds an add_test NAME the base already registers, which is exactly how #3220 went red for a change that was correct — and both are clean against main (pr_branch_stale_check --pr says merging removes nothing main has for each), so this is duplicated work rather than a hazard.

    The distinction that should decide it: the bug bites a lane before it pushes (its configure fails and it spends a twenty-minute build finding out), so a check in pre-pr-checks.sh catches it where it happens; a ctest row catches it in CI, after the build has started, which is later and costs more. That argues for #3224's placement — but #3226's tool is the larger and its CMake row is the pattern every other check in this family uses, so it is a real choice and not an obvious one.

    Nothing here is mine and I am not picking. What the thread needs is one survivor and the other closed with its branch deleted: keeping both leaves two collision detectors with different names, and the one nobody remembers is the one that rots. Every earlier pair today (#3048, #3049, #3060, #3087, #3116, #3171, #3216) resolved that way without spending two builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions