Repository navigation
Description
Problem
This repository cannot adopt its own formatter hooks. Every consumer repository now runs the aggregate lefthook-remote.yml except this one. The formatter jobs rewrite whole files, but the diff-scoped checks treat every rewritten line as content the author added.
A formatter-only cleanup can therefore never land, and neither can format-on-touch. Measured on main at 4f663b8, with every tracked file staged and each formatter job run alone:
| Formatter | Files rewritten (fixtures excluded) | Added lines | Added lines with git diff -w |
|---|---|---|---|
bash-format (shfmt; the synced .editorconfig sets switch_case_indent = true) |
1,282 | 49,949 | 3,725 (209 files) |
python-format (ruff format; ruff.toml is lint-only today) |
359 | 49,997 | 49,588 |
Committing either cleanup fails:
code-tidying-remote-comment-lint: 1,470 findings on the shell cleanup and 639 on the Python cleanup. All of them are pre-existing comments that the formatter reindented or moved.guardrails-remote-pre-commit-content:plugins/source-control/scripts/worktree-create.test.sh:1142(C:/repos/acme, a test's sample path) is reported as a machine-specific path, because shfmt reindented that line.- CI runs the same diff-scoped gates on the PR:
pr-require-checks.yml:1655-1661(comment lint,scripts/check-comment-lint.sh) and:1887(machine-specific paths).
Format-on-touch has the same failure, and a worse one: an ordinary commit that touches an unformatted file gets the whole file reformatted, then blocked on its old comments.
Owner decision
On 2026-11-18 the owner chose to hold this repository on its guardrails and code-tidying remotes, and to fix the gates before the cleanup lands.
Done when
- The diff-scoped checks judge only content a commit really adds. They should not count lines a formatter only reindented or reflowed: in
lib/git-hooks/check-lib.shchecks_changed_lines,scripts/check-comment-lint.sh, the machine-paths step and the guardrails content scan. One approach is to compare each line's non-whitespace content, or its tokens, against the old file. - A formatter-only commit passes these checks, both locally and in CI.
- The shfmt and
ruff formatcleanups then land as two PRs. Their squash commits go in.git-blame-ignore-revs, andlefthook.ymlswitches tolefthook-remote.yml.
Release cost to weigh: the two cleanups touch 90 plugins (shell: 90, Python: 33, all inside the 90). Shared copies change, so sync-shared-copies.sh --check-bump and check-vendor-version-bump.sh require a non-none fragment for each of them, which means 90 patch releases with no behavior change.
Branches are ready to rebuild: .work/dryrun-worktree.sh and .work/ccp-cleanup.sh in control-hub produce both cleanups, with one patch fragment per touched plugin. Fixtures are excluded from both. All 960 shared copies still match their canonical sources after formatting.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 18, 2026
Size: Large
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Blast radius: the diff-scoped gate scripts (check-lib.sh, check-comment-lint.sh, guardrails content scan, machine-paths step), then 90 plugins' files and fragments across the two cleanup PRs; read by every contributor and CI.
Reversible: partly; gate changes and cleanup commits can be reverted, but patch releases already published stay.
Open questions: none
Understood: formatter-only commits fail the diff-scoped checks because reindented or reflowed lines count as added, so the repo cannot adopt lefthook-remote.yml or land the shfmt and ruff format cleanups.
The recorded decision (comment by kyle-sexton, #17178 (comment), with the amendment at #issuecomment-7054897470) settles the release-cost question. Each cleanup PR carries one
bump: patchfragment per touched plugin, with no exemption in the bump checks, and the blame-ignore file follows in a separate commit. It starts "Decision recorded. Owner, 2026-11-20, typed in the owning session (verbatim): ..." and picks option A for Q126.The other refinement questions are implementation choices for the issue lane: how to compare tokens for ruff, how to split the work, and whether the external machine-paths action needs its own change and pin bump. Related work: #16911, and merged #16156 touched the same diff-range parsing. No duplicate or merged fix found.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 18, 2026
Not admitted to the issue lane yet: sub-issue #17778 is open; sub-issue #17779 is open; sub-issue #18273 is open.
melodic-automation-lanes commentedon Nov 18, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Make the diff-scoped checks ignore whitespace-only and reflow-only line changes so a formatter-only commit passes locally and in CI, then land the shfmt and ruff format cleanups as two PRs with blame-ignore entries and the lefthook-remote.yml switch.
Related work
Open questions
RECOMMENDED: Track the ci-workflows change as a separate prerequisite issue, and have this issue bump the pin once it is released. Basis: .base/.github/workflows/pr-require-checks.yml:1887-1890
RECOMMENDED: Yes: the gate fix is this issue's scope, and the two cleanups become separate dependent issues. Basis: .base/lib/git-hooks/check-lib.sh:422-442 and the triage comment saying the cleanups depend on the gate fix
RECOMMENDED: Accept the 90 patch fragments, since the issue already says shared copies change and the bump checks require them. Basis: judgment
RECOMMENDED: Compare whitespace-stripped content for shfmt, and for Python also treat a reflowed statement as unchanged by comparing the token stream of the hunk against the old one. Basis: issue body table; judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 21, 2026
Decision recorded. Owner, 2026-11-20, typed in the owning session (verbatim): "I want to make sure that the recommendations are grounded in facts, data, metrics, and research from the latest consensus-based research from official, authoritative, and trusted sources, and just go with the recommendations there." The recommendation was checked against the code at origin/main and current official sources before this record; the decision below is the grounded one.
Q126 (CONFIRMED A)
A. The shfmt and
ruff formatcleanups each land as one PR carrying one patch fragment per touched plugin (90 in all), assync-shared-copies.sh --check-bumpandcheck-vendor-version-bump.shrequire today; the release PR that follows bumps those plugins once. Both squash commits go in.git-blame-ignore-revs. No formatter-only exemption is added to the bump checks (B), and the repo-wide cleanup is not replaced by format-on-touch (C).Basis
version"pins the plugin to that version until you change it"; https://code.claude.com/docs/en/plugins/loading: "The version also names the plugin's cache directory."scripts/check-vendor-version-bump.shheader at origin/main says the same: "the version is the update cache key, and an unbumped plugin never delivers the change to consumers."git log --since=2026-10-21 --grep=chore.releaselists 1,133 release commits in 30 days, and 81-, 85-, 80-, 82- and 77-plugin releases already shipped (chore(release): release 81 plugins #16794, chore(release): release 85 plugins #16716, chore(release): release 80 plugins #16537, chore(release): release 82 plugins #11271, chore(release): release 77 plugins #15860). Fragments batch, so 90 fragments become one or two release PRs, not 90. The plugins/ tree holds 99 plugins.Dissent considered
Users download 90 plugin updates with no behavior change, and each plugin gets a "no behavior change" CHANGELOG entry. B would avoid that, but it adds a whitespace/token-equal exemption path to two fail-closed gates for a one-time event, which runs against "fewest moving parts". GitHub docs note an ignored revision "will still appear in blame" for a line it was the last to modify, so blame noise does not drop to zero.
kyle-sexton commentedon Nov 21, 2026
Amendment to the decision above, from the research re-check (owner direction of 2026-11-20 recorded there).
Amendment
Q126 stays A. The shfmt and
ruff formatcleanups each land as one PR, with one changelog fragment per touched plugin. There is no formatter-only exemption in the bump checks (B) and no format-on-touch in place of the cleanup (C). What changes:bump: patch. The fragment gate's documented contract accepts a no-release fragment as well. RP1: "The check-changelog-fragments.sh header says --check-required needs an added or modified fragment for each fragment-mode plugin whose shipped files a change set changes, and ADR 0048 says that requirement counts a fragment with bump none" (check-changelog-fragments.sh, ADR 0048). Abump: nonefragment would leave the changed bytes under the old version. RP2: "ADR 0048 says a plugin whose pending fragments are allbump: nonegets no new version, and release pull request chore(release): release 2 plugins #17688 movedversionin plugin.json while deleting the fragments it consumed" (release commit). SV1: "SemVer 2.0.0 item 3 says the contents of a released version MUST NOT be modified and any modifications MUST be released as a new version" (SemVer 2.0.0). Qualifier on SV2: SemVer names no increment for a change that alters no behavior. PATCH is the smallest increment item 3 allows.scripts/check-changelog-fragments.sh --check-required(RP1). The two scripts the decision named require a releasing bump only in their own scope. RP3: "The sync-shared-copies.sh header says --check-bump fails when a canonical changed and a carrying fragment-mode plugin added no fragment whose bump is not none, and the check-vendor-version-bump.sh header says a fragment-mode plugin must add a fragment whose bump is not none". Its scope qualifier: canonical shared sources for the sync gate, andvendor/trees for the vendor gate. The research's reading of the gate's code, RP4, is MEDIUM and was not run: whether--check-requiredcounts any added fragment, whatever its bump. Sobump: patchis stated in the fragments rather than left to the gate.plugins-reference#versionpage; these replace it.versionpins the plugin to that version until you change it, and that command-source plugins, plugins from a claude.ai-hosted marketplace, and plugins loaded in place from a local-path marketplace are not pinned by the field" (manifest reference, version).versionkeeps every user on the cached copy until its author changes the string, however many commits they push" (loading, versions and updates). Qualifier: in-place loads from a local-path marketplace ignore the version string..git-blame-ignore-revsat origin/main. RP5: "git ls-tree origin/main for.git-blame-ignore-revsreturns no entry, so the repository has no root.git-blame-ignore-revsfile at origin/main ac4f209" (tree at ac4f209). The follow-up commit adds the root file listing both squash commits by their full SHAs. BL1: "The Black guide for introducing Black says to reformat everything in preferably one massive commit, list the full 40-character commit identifiers in.git-blame-ignore-revsat the project root, and setblame.ignoreRevsFilefor git to apply it on every blame" (Black guide)..git-blame-ignore-revsfile in the repository root are hidden from the blame view, and that a listed commit that was the last to modify a line still appears in blame" (GitHub docs).Caveat. The research's verifier failed rows 7 (confidence grading) and 12 (claims following jointly from their sources), on qualifiers dropped in restatements and one misquoted line of the git page. The git line is corrected above. Every source's quote and date checked out except RP5's date, which is off by the conversion from UTC to local time.
Done when
ruff formatcleanup PR each add one fragment under.changes/<plugin>/for every plugin whose shipped files they change, and every one of those fragments setsbump: patch.scripts/check-changelog-fragments.sh --check-requiredpasses on each cleanup PR's change set..git-blame-ignore-revsfile exists and lists the full 40-character SHAs of both cleanup squash commits, one per line.scripts/sync-shared-copies.shnorscripts/check-vendor-version-bump.shgains an exemption for formatter-only or whitespace-only changes.melodic-automation-lanes commentedon Nov 21, 2026
Split at intake (owner Q93). This issue is Size Large, so its done-when is split into 2 sub-issues, each holding its task-list lines as written.
Automated split by the lanes App. Admission waits on this issue while a sub-issue is open; work-unblock closes it as completed once every sub-issue is closed as completed by a merge or a listed human and its done-when is covered.