Skip to content

fix(tooling): fail the vendor drift gate on a deleted vendored file - #600

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-11456-fail-the-vendor-drift-gate-when-a-stock-file-is-deleted
Oct 25, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-11456-fail-the-vendor-drift-gate-when-a-stock-file-is-deleted

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • New tooling/vendor-diff-pruned.txt: only the upstream paths a re-vendor excludes, 46 entries (32 directory prefixes, 14 exact files where the parent directory is partly vendored), generated once from the current diff as the shortest ancestor of each missing stock path that holds nothing vendored.
  • tooling/vendor-diff-check.sh:
    • A stock path missing from vendor/interchange stays informational only when it, or a directory above it, is listed. Any other missing path fails with D <path>, unless exactly allowlisted like any other drift.
    • A pruned entry fails when it covers a path in the vendored tree at HEAD (covers vendored <path>: <entry>), or covers no missing stock path, such as a directory written without its trailing / (covers no missing stock path: <entry>). These failures get their own advice: remove or narrow the entry.
    • Drift failures keep their advice: revert toward stock, or record an upstream-justified allowlist entry.
    • The header comment says missing stock paths matching a pruned entry exactly or as a directory prefix are excused, and the pass line names both files.
  • vendor/interchange/VENDORED.md: absent upstream paths are informational only when listed in the pruned list, and a re-vendor whose excluded paths change updates it. The file is excluded from the gate.
  • docs/ARCHITECTURE.md (Vendoring) describes the list.

Verification

Against the pinned stock commit, fetched from upstream:

  • Clean tree: exit 0, informational: 5125 upstream paths are absent from the pruned checkout.
  • Temporary packages/hub-client/ entry: exit 1, covers vendored … lines and covers no missing stock path: packages/hub-client/.
  • Temporary dead entry (tests/workflow/ written as tests/workflow): exit 1, the files under it fail as D, and covers no missing stock path: tests/workflow.
  • packages/hub-client/src/transforms.ts deleted and committed: exit 1, D packages/hub-client/src/transforms.ts.
  • There is no case script for this gate.

Closes CL-11456

@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

CL-11456

@TheGreatAxios
TheGreatAxios force-pushed the cl-11456-fail-the-vendor-drift-gate-when-a-stock-file-is-deleted branch from 5ba77f5 to b374830 Compare October 25, 2026 14:34
@TheGreatAxios
TheGreatAxios changed the base branch from cl-11422-match-the-vendor-drift-gate-on-exact-paths to main October 25, 2026 14:34
@TheGreatAxios
TheGreatAxios force-pushed the cl-11456-fail-the-vendor-drift-gate-when-a-stock-file-is-deleted branch 2 times, most recently from 95b029f to cafbe88 Compare October 25, 2026 15:07
@TheGreatAxios
TheGreatAxios force-pushed the cl-11456-fail-the-vendor-drift-gate-when-a-stock-file-is-deleted branch from cafbe88 to 50caf08 Compare October 25, 2026 15:22
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 25, 2026 15:27
@corbits-triage

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Triage will approve.
Waiting on a maintainer to approve: request review.

@TheGreatAxios
TheGreatAxios merged commit c39593b into main Oct 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant