Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(devx): retire the dead CI half of the lockfile merge driver, move the anti-vacuity weight - #7018

Merged
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-6436-lockfile-merge-driver-ci-half
Aug 31, 2026
Merged

zhuangjianguo merged 1 commit into
mainfrom
claude/issue-6436-lockfile-merge-driver-ci-half

Conversation

@zhuangjianguo

Copy link
Copy Markdown
Collaborator

Fixes #6436

Implements the maintainer ruling of 2026-08-27 (「同意,并继续」, option B): remove the measured-dead CI half of the pnpm-lock.yaml merge driver, keep the measured-live contributor half, and re-point the guide at what the mechanism now is — contributor-facing, with zero CI consumers.

All verification below ran against 981423c47, the head of this branch.

Constraint 1 — which assertion now carries the anti-vacuity weight

⭐ This is the load-bearing part of the change. The retired configuring.length > 0 guard was doing two jobs, and each has a new, named owner. Nothing was flipped to === 0; the count assertion is gone entirely.

The retired guard proved… …is now proved by
the grep matched something, so a zero is a reading rather than a scan that read nothing it('the workflow scan is live — zero configuring workflows is a reading, not a broken grep') — a control term that MUST hit the same population (git config, which changelog.yml genuinely runs), read out of the same directory by the same reader
the mechanism still had a consumer at all it('keeps the .gitattributes half of the mechanism true') and it("keeps CONTRIBUTING.md's contributor path — the mechanism's only remaining consumer") — those two files are the mechanism now

The phantom direction is load-bearing on its own for the first time: with zero configuring workflows, phantom is exactly "workflows this page still names", so a resurrected row reddens by itself instead of riding along with a count that happened to be non-zero. The missing direction becomes the tripwire for a CI consumer returning.

⭐ The second row is where the real weight landed. The old guard asked "does anything still consume this driver?" and answered with a workflow count. That count is zero by ruling, so the question is answered at the consumer that was measured live — and the failure message is the old one re-pointed: if CONTRIBUTING.md stops defining the driver, the mechanism genuinely has no consumers and the section plus the .gitattributes line should be deleted with it.

Proved by ablation, not asserted

Committed first, so each restore leg had the implementation to return to. Every mutation was confirmed on disk by counting both the removed and the injected token (an editor's exit code proves nothing), and every restore was proved byte-for-byte against the HEAD blob hash.

# Ablation Result
A1 delete the .gitattributes line keeps the .gitattributes half RED
A2 delete CONTRIBUTING.md's driver definition only remaining consumer RED
A3 put a workflow row back in the guide table both-directions RED (phantom)
A4 break the scan's control term the workflow scan is live RED
A4b the both-directions pin under that same broken scan GREEN
A5 a workflow configures the driver again both-directions RED (missing)

⭐ A4b is the point of the whole exercise. Under a broken scan the both-directions pin still passes — that is precisely the vacuity the retired guard existed to catch, and the new control test is what now catches it. Restore proof: git diff HEAD empty over all five targets, and all five worktree hashes equal to their HEAD blobs.

Constraint 2 — the worked-example citation, re-pointed a second time

scripts/check-pre-install-import-graph.mjs and its test cited changeset-release.yml's config as the worked example of "a quoted argument that must not be read as an install". This PR removes that config, so the citation is re-pointed for the second time (PR #6389 was the first, from dependabot-auto-merge.yml) — and this time no live in-repo example remains.

Honest "formerly" wording, ⛔ not a silent deletion: the anchor now says the example was formerly changeset-release.yml, that no live instance is left, and that the shape survives as the synthetic fixture in the test — cited by the test case's name, not by a line number. That last choice is #6998's own recommendation, applied to the text this PR writes; #6998 records a cross-file citation in this repo that had rotted 86 and 107 lines off. (The dispatch's own :273-278 had already drifted to 275-276, so the citation was located by content.)

A third copy of the same citation turned up during the sweep — content/docs/guide/ci-cd-pipeline.md also cited that config as the gate's worked example. My diff falsifies it, so it is re-pointed the same way rather than left behind.

Constraint 3

#6437 is untouched and stays open. Nothing here closes it: this PR fixes the model for the case the ruling decided, and the CI-only framing #6437 describes is a separate subject. The commit trailer says Part of #6436 while this body carries the Fixes, so the squashed message cannot contradict itself.

Prose my diff falsified, and fixed

Removing the config makes three statements elsewhere untrue. All three are corrected rather than left to rot:

  • content/docs/guide/ci-cd-pipeline.md, changeset-release section: "Both lanes configure a pnpm-lock.yaml merge driver" → they configure none, with the reason.
  • The same page's pre-install-import-graph prose (the third citation copy above).
  • .github/workflows/changeset-release.yml:557's comment already argued the .gitattributes half "is NOT dead" — correct, and on the ruling's side, but it explained a config that is no longer beside it. It is now a tombstone that keeps the whole measurement record (the enumerated git sweep, each zero-hit with its control term, and the changesets/action@v1.9.0 reading) so nobody re-derives it a fourth time.

⚠️ One trap worth naming: the pin greps workflow text for the config key, so merely naming that key in a workflow comment trips it. That is the safe direction — a false red, never a false green — and the tombstone comment spells the attribute form instead. Both the comment and the pin's failure message say so.

Verification

Everything below ran on 981423c47.

  • npx vitest run --maxWorkers=2 scripts/__tests__ → 90 files, 2574 tests, all passed, exit 0.
  • Gates, each exit code captured before any pipe: check:control-bytes, check:doc-fences, check:doc-types, check:pre-install-import-graph, check:action-forward-parity, check:shell-escape-residue, docs:check-links → all exit 0.
  • check:doc-snippets first returned exit 2 — "I could not run", not a red. Built the closure it names (turbo run build $(node scripts/check-doc-snippet-types.mjs --build-filter) --concurrency=2, 32/32 tasks) and re-ran: 271 of 271 blocks judged, 0 failed, exit 0.
  • check-changeset-presence with GITHUB_BASE_REF=main → exit 0. The changeset carries empty frontmatter: repository tooling and contributor docs, publishing nothing. ⛔ No skip-changeset label — in this repo that label is a phantom with zero readers.
  • pnpm lint:root → exit 0. Not narrowed: the full scoped population ran — 221 files judged (counted from eslint's own --format json, not estimated), 0 errors, 29 pre-existing warnings, none in this diff. All three lintable files this PR edits were in that population at 0 errors / 0 warnings.
  • Control-byte self-scan across every file in the diff, beyond the gate: clean.

The test surface was derived from what the diff touches rather than from the dispatch list: git grep for every file that references ci-cd-pipeline.md, .gitattributes, CONTRIBUTING.md or changeset-release.yml returned 20 files, all inside scripts/ — so the tree run above covers them, and the doc/lint gates cover the rest.

Generated by Claude Code


Generated by Claude Code

changeset-release.yml configured merge.pnpm-merge but performs no local
merge, so the config could never fire. It was the last CI consumer.
.gitattributes and CONTRIBUTING.md's contributor path are measured live
and are kept; the guide section is re-pointed at what the mechanism now
is: contributor-facing with zero CI consumers.

The pin test's anti-vacuity weight moves rather than vanishing:
configuring.length > 0 was proving both that the grep matched something
and that the mechanism had a consumer. Job one moves to a control term
that must hit the same population; job two moves to .gitattributes and
CONTRIBUTING.md, the two files that are the mechanism today. The phantom
direction becomes load-bearing.

Part of #6436

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgDDqh6YnkXqsnVTCa7wHk
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ci/cd configuration documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Decision] The lockfile merge driver is DEAD in CI and LIVE for contributors — and the pin test cannot express both. Remove, re-point, or leave?

2 participants