Skip to content

chore(guardrails): drop the convention resolver's .claude source-control.md reads - #13487

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-13472-41997431055-1
Nov 5, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-13472-41997431055-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #13472

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The commit-subject and PR-title enforcement resolver (lib/resolve-convention-pattern.sh and its guardrails copy) no longer reads .claude/source-control.md: the ## convention_source pointer, the ## <key> H2 fallback and h2_value are gone. It keeps docs/conventions/source-control.yaml, then the folder-form docs/conventions/source-control/commit-convention.yml, each only while git tracks it, then the git-ignored personal file. block-convention-violation drops its pointer scan and the markdown cache dependency. The docs, the plugin.json description and the four test files are converted to match, and a major guardrails changelog fragment (a config surface the gate used to read is removed) repeats the refresh note for installed commit-msg copies. Choice of means: I renamed resolve_legacy/LEGACY_READY/need_legacy to resolve_neutral/NEUTRAL_READY/need_neutral, because nothing legacy is left. I also renamed the contract section to 'The folder-form convention file' and repointed the one link that used its anchor (docs/conventions/commit-convention/README.md); the stub's own heading stays so inbound links keep working. scripts/validate-plugin-contracts.test.sh:680 is an unrelated retirement fixture that only uses the word as a heading value, so the rename does not touch it.

Not verified

  • bash scripts/run-test-file.sh for lib/resolve-convention-pattern.test.sh, plugins/guardrails/hooks/block-convention-violation.test.sh, plugins/guardrails/git-hooks/commit-msg-convention.test.sh and plugins/guardrails/git-hooks/lefthook-remote.test.sh: this lane's Bash runs only the named wrappers,…
  • scripts/check-changelog-fragments.sh --check-required origin/main: this checkout has no origin/main ref; the lane's check-changelog-fragments wrapper passed. Left to the PR's CI.
  • Tidy not run: the change touches lib/ and docs/conventions/ (listed shared paths) and 13 files across more than one area, over the tidy cutoffs.
  • Stale source-control plugin docs outside this issue's file list still describe enforcement reading the pointer or the markdown H2: plugins/source-control/reference/config-resolution.md:154-160 and :658-659, plugins/source-control/skills/setup/SKILL.md:140-155 and :428-434,…

Fix

  • lib/resolve-convention-pattern.sh: removed LEGACY_MD_REL, TEAM_FILE, h2_value, the convention_source pointer read and its path checks, and the H2 fallback in team_value. The folder-form rung (WELL_KNOWN_NEUTRAL, git-tracked only) stays as resolve_neutral, with its symlink, unreadable, empty-key and…
  • plugins/guardrails/hooks/resolve-convention-pattern.sh: regenerated from lib/ with sync-shared-copies.
  • plugins/guardrails/hooks/block-convention-violation.sh: removed conv_pointer, its call and the CONV_POINTER append, and the .claude/source-control.md CONV_DEPS entry; kept the commit-convention.yml entry. Updated the header and cache comments.
  • plugins/guardrails/git-hooks/commit-msg-convention.sh: header comment names the folder-form file instead of the legacy markdown.
  • plugins/guardrails/README.md: the block-convention-violation row (105), the commit-msg-convention row (145) and the block_convention_gate_enabled row (1764) name the folder-form file, kept in step with plugin.json.
  • plugins/guardrails/.claude-plugin/plugin.json: block_convention_gate_enabled description updated the same way.
  • docs/contracts/commit-convention/README.md: the two-reads text, the layers row and the parse-contract rungs drop the markdown rung and 'for one release'. The convention_source section is rewritten as 'The folder-form convention file' (tracked-only policy floor, one fixed path, value grammar,…
  • docs/conventions/commit-convention/README.md: the redirect stub's link points at the renamed section anchor.
  • lib/resolve-convention-pattern.test.sh: fixtures write the tracked team YAML or folder-form file instead of markdown. The pointer, the markdown-fallback and the markdown-precedence cases are replaced by one case asserting that a tracked .claude/source-control.md H2 and pointer are not enforced…
  • plugins/guardrails/hooks/block-convention-violation.test.sh: newrepo/subrepo write the tracked team YAML. The team-yaml-over-markdown case is now team-yaml-over-folder-form. Cache cases use the YAML files and assert the entry records no markdown dependency, plus one retired-markdown not-enforced…
  • plugins/guardrails/git-hooks/commit-msg-convention.test.sh: new_repo writes the tracked team YAML and a folder() helper writes the folder form. The layer-name assertion now names the folder-form file, the e2e precedence is team YAML over folder form, plus one retired-markdown not-enforced case.
  • plugins/guardrails/git-hooks/lefthook-remote.test.sh: the consumer's pattern is written to docs/conventions/source-control.yaml.
  • .changes/guardrails/work-resolve-issue-issue-13472-41997431055-1-e56618d5.md: new major fragment (Removed), including the installed-copy refresh note for pre-0.61.0 copies and for copies installed before this release.

Verification

The runner ran each check from the base copy against 52c4a7c:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • .lane/verify/bin/sync-shared-copies: generated plugins/guardrails/hooks/resolve-convention-pattern.sh, exit 0
  • .lane/verify/bin/sync-shared-copies --check: all 678 registered copies match their canonical sources, exit 0
  • .lane/checks/bin/check-changelog-fragments: 1 fragment valid
  • .lane/checks/bin/check-changed-skills: no changed skills, nothing to gate
  • .lane/checks/bin/check-affected: first run failed shellcheck SC2115 at lib/resolve-convention-pattern.test.sh (rm -rf "$r/..."), fixed with ${r:?}; rerun: 13 passed, 6 skipped over 13 changed files
  • Grep for .claude/source-control.md over lib, plugins/guardrails and docs/contracts/commit-convention: outside CHANGELOG.md and *.test.sh the only hits are the ~/.claude/source-control.md drafting mentions the done-when regex excludes
  • Grep: lib/resolve-convention-pattern.sh still carries readonly WELL_KNOWN_NEUTRAL="docs/conventions/source-control/commit-convention.yml", and block-convention-violation.sh still names docs/conventions/source-control/commit-convention.yml
  • Grep: plugins/guardrails/CHANGELOG.md has one ## \[1.1.0\] heading (line 81)
  • Fresh-context subagent review of the whole diff: no correctness bugs in the resolver or the converted tests (each changed case traced against the code, the YAML fixtures against yaml-subset.awk, and ls-files behaviour under a symlinked parent directory). It raised one changelog wording gap, now…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41997431055

Left out: the items under Not verified.

Related

#13472

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 52c4a7cef52ad63e7172f809719281a306864569: read 13 of 13 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13487 (head 52c4a7c)

No security issues found. I read every hunk of all 13 changed files in .claude-lane/pr.diff. This was a full review, not a blocking-only one: the prior-findings file shows this lane has reviewed no earlier head.

What changed

The commit-subject and PR-title convention resolver (lib/resolve-convention-pattern.sh and its generated copy at plugins/guardrails/hooks/resolve-convention-pattern.sh) no longer reads .claude/source-control.md. That removes both the ## <key> H2 fallback and the ## convention_source pointer. block-convention-violation.sh drops its pointer scan and the markdown file from its cache dependency list. The rest of the diff is tests, docs, a plugin.json description string and a changelog fragment.

What I checked

  • The input surface gets smaller, not larger. The removed pointer let a tracked markdown file send the resolver to any repo-relative path. That code needed checks for absolute paths, .. and backslashes (old case "$ptr"). The folder-form path is now the constant WELL_KNOWN_NEUTRAL, so removing the traversal checks opens nothing.
  • The checks on the folder-form file are unchanged. It still counts only while git ls-files --error-unmatch says git tracks it. The symlink and repo-escape check (in_repo_or_exit), the unreadable-file check, the empty-key check and the dialect check all still run (resolve_neutral). The old H2 read only tested [ -f ], not git tracking, so dropping it also removes an untracked input.
  • The new diagnostics are safe. They now interpolate $NEUTRAL_REL, which is the constant path, instead of $ptr, which came from file content. No content controlled by a file reaches stderr through them.
  • No stale cache entries. CONV_DEPS changes from four entries to three. The cache freshness check requires the recorded dependency list to equal the current one, in order, so an entry written by an older release is treated as a miss, not served (block-convention-violation.sh).
  • Trust controls: none touched. None of the 13 changed files matches a TRUSTED PATHS glob. Nothing changes the trusted-trigger check, the lane token scope, the kill switch, a merge hold or the broker.
  • Instruction-surface lens: I consulted docs/contracts/instruction-exception-register/README.md. It adopts the six Gate 0 classes: irreversible-action, secret-handling, data-integrity, external-publication, legal-compliance and agent-authority. Matching a commit subject or PR title against a pattern falls in none of them, so no protected rule is lost.
  • Enforcement can lapse, but that is not a security issue. Repos that set their pattern only in .claude/source-control.md stop getting enforcement, and installed commit-msg-convention copies keep the old resolver until they are refreshed. The .changes/guardrails/ fragment documents both. This is a style and convention gate, so losing it has no leak, compromise or charge impact.

Manifest

  • manifest userConfig.block_convention_gate_enabled.description: pass (the only change is description text, which is in the inert set; type and default: true are unchanged)

Embedded text

I found nothing in the PR context file telling the lane to pass the PR, skip a check, drop a finding or post somewhere else.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 52c4a7cef52ad63e7172f809719281a306864569: read 13 of 13 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #13487, retire the convention resolver's .claude/source-control.md reads

No blocking or advisory findings. I read every hunk of all 13 changed files in the full diff. This is a first review, not blocking only, and there were no prior findings.

What I checked

  • Resolver (lib/resolve-convention-pattern.sh and its guardrails copy):
    • h2_value, LEGACY_MD_REL, TEAM_FILE, the pointer read and the path-shape checks are all gone. Nothing still references them: I grepped for $ptr, TEAM_FILE, h2_value and LEGACY_.
    • resolve_neutral keeps the policy floor that the file must be tracked (ls-files --error-unmatch). It also keeps the in_repo_or_exit symlink checks, the unreadable-file check, the dialect check and the empty-key check.
    • team_value now goes only from the YAML to the folder-form file. A YAML key still comes before a broken folder-form file, so the folder form never disables a key the YAML supplies.
    • The diagnostics now name $NEUTRAL_REL instead of the dead $ptr, which fixes the unreadable-file message.
    • The two copies match hunk for hunk.
  • block-convention-violation.sh: conv_pointer and the markdown CONV_DEPS entry are removed. A cache entry written by an older release lists the dependencies in a different order, so it fails the in-order DEP check at line 210 and reads as a miss. It never serves a stale pattern.
  • Tests:
    • The fixtures now write the team YAML or the folder-form file and track it with git.
    • lefthook-remote.test.sh writes the YAML untracked, but git add -A at line 125 runs before the first commit is judged, so the file is tracked when it matters.
    • Cache cases 8 and 9 git add the file that appears.
    • assert_absent exists in guardrails-test-helpers.sh:63.
    • Each of the three suites has one case showing that a tracked .claude/source-control.md is not enforced, as the issue asks.
  • Docs: the contract README, the redirect stub's anchor, the README rows and the plugin.json description agree with each other and with the code. A grep of the done-when scope (lib, plugins/guardrails, docs/contracts/commit-convention) finds .claude/source-control.md only in test files and in the ~/.claude/source-control.md mentions the issue's regex excludes.

Closing issue #13472

  • Every Change bullet is met in the diff.
  • I did not run the Done when checks myself: the test-file runs, sync-shared-copies --check and check-changelog-fragments --check-required. The PR says the test runs are left to CI, so treat their passing as the author's claim, unverified.
  • The grep-based done-when items (WELL_KNOWN_NEUTRAL readonly, the folder-form path named in the guard) hold at head when read directly.

Manifest

  • manifest userConfig.block_convention_gate_enabled.description: pass. It describes the shipped read order. The default and options are unchanged.
  • manifest version (changelog fragment bump): pass. bump: major fits removing a config surface the gate used to read.

Notes (not counted as findings)

  • The PR's own "Not verified" section says that source-control plugin docs outside this PR still describe enforcement reading the pointer or the markdown H2. Those are plugins/source-control/reference/config-resolution.md and plugins/source-control/skills/setup/SKILL.md. This change makes them inaccurate, so they need a follow-up issue. They are outside this PR's file list and the issue's scope.
  • Spend: none. No cost-bearing changes.
  • No embedded instructions were found in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 52c4a7cef52ad63e7172f809719281a306864569. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 5, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could not fix every failing check, after one retry a model rung up, so a session builder takes it; its run log names each one and why. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=13487 -f activity=fix-ci

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 52c4a7cef52ad63e7172f809719281a306864569.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 5, 2026
@melodic-automation-lanes melodic-automation-lanes Bot removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 5, 2026
Merged via the queue into main with commit 7817b47 Nov 5, 2026
128 of 131 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-13472-41997431055-1 branch November 5, 2026 09:52
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 7817b4761eac4f8304c7d59a47162f1f218e48a2; later checks count it verified from this comment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(guardrails): drop the convention resolver's one-release .claude/source-control.md reads

0 participants