Skip to content

Review finding: changed-file classification hides the source side of renames #314

Closed

Description

@kiwidream

Summary

Merge-profile classification (pre-existing; not covered by #160's tests): renames hide the source path, so moving a source, test or workflow file into a docs path routes the change to a docs-only profile.

Severity: medium. Found in the 2026-11-04 review of the v1.0.1 change set (all 1.x.x merges since v1.0.0 plus the open PRs that target it), against 1.x.x 21fee6ee8e; area: #160.

Observed

Confidence: confirmed.

  • Location: every changed-file step uses git diff --name-only with default rename detection. That is 31 call sites, including .github/workflows/required-merge-gate.yml:86,94,97,102 (and the four copies in the profile jobs), .github/workflows/ci.yml:96-112 and .github/workflows/core-checks.yml:78-94. The classifier is ci/checks/classify_merge_profile.py:150-180.
  • Scenario: git mv src/validation.cpp doc/reference/validation.md yields the changed-file list doc/reference/validation.md only, and classify_merge_profile.py returns validation_profile=public-docs. Required Merge Gate, Full Validation and Core Checks all skip source validation and wait only for public-docs-lint. The squash-merge push to 1.x.x uses the same diff logic, so post-merge CI skips it too. The same applies to moving a functional test, a CI script or .github/workflows/ci-nightly-heavy.yml into doc/... (or into ci/release/, which waits only for Core Checks Gate). Each of these removes code, tests or workflows with docs-only validation.
  • Evidence: reproduced in a scratch repo with git write-tree trees (no commits). --name-only lists 1 path; --no-renames lists both src/validation.cpp and doc/reference/validation.md. The real classifier prints validation_profile=public-docs. The same git diff --name-only is present at v1.0.0 70fea84.

Impact

A broken build, or a silently deleted test or workflow, could merge into the release line with a green required check. That is the gate integrity #157/#160 set out to protect.

Suggested fix

Use git diff --no-renames --name-only (or --name-status --no-renames and include both sides of R/C entries) at every changed-file site in the three workflows. Then add a contract test, alongside test_classifier_ci_contract.py, that runs the real step on a rename-from-src/ fixture and expects source.

Activity

  1. added
    bug
    on Nov 4, 2026
  2. kiwidream commented on Nov 6, 2026

    @kiwidream
    MemberAuthor

    Fixed on 1.x.x by #345 (merged as 621b330). All 31 git diff --name-only changed-file sites in required-merge-gate.yml, ci.yml and core-checks.yml now pass --no-renames, so a rename lists both paths. test_changed_files_contract.py checks every site, and checks that the classifier routes a rename into doc/ as source. Pull requests into 1.x.x already run the fixed workflows; main gets them when 1.x.x is integrated.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions