Skip to content

refactor(harness-config): move the audit-pass suppressions to docs conventions harness-config.yaml - #9985

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-9732-40185167037-1
Oct 25, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-9732-40185167037-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #9732

Summary

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

The audit engine now reads harness-config's team suppression layer from the suppressions mapping of <home>/harness-config.yaml (<home> is the convention home the repository binds, else docs/conventions), using the shared YAML-subset parser. The YAML is checked against the new plugins/harness-config/schemas/harness-config.schema.json. The fenced block of .claude/audit-pass.md is read only while the YAML is absent, for one release. When both exist, the old file is reported as ignored. A YAML that does not parse drops the team layer and never falls back to the old file. The engine output gains suppressions.layers (each layer's file and state), and each applied entry names its source file next to its layer. Migrated settings: both of this repository's suppression entries, fce618a146f90b9c (missing-pattern:Bash(git push *)) and 52bccf5cafa7fd59 (missing-pattern:Bash(git push)), both harness-config/audit/B/baseline-ask-rules on .claude/settings.json. Their new home is docs/conventions/harness-config.yaml under suppressions, with schema plugins/harness-config/schemas/harness-config.schema.json; values were copied unchanged and .claude/audit-pass.md stays until the cleanup slice. The finding-suppression convention names no concern for suppressions, only the legacy .claude/<surface>.md location, so the concern is the owning plugin's name per ADR 0064 Decision 1, and the convention's 'Where the record lives' section now says so. The reader uses lib/yaml-subset.awk (the parser lib/parse-concern-value.sh routes through) directly, as harness-ops' morning-brief already does. parse-concern-value.sh accepts keys only of \[A-Za-z0-9_.-\] and cannot list a mapping's keys, so it cannot read finding_id-keyed entries or the anchor/v1 key.

Not verified

  • scripts/run-test-file.sh plugins/harness-config/skills/audit/scripts/audit-engine.test.sh was not run: this lane runs no interpreter or test runner, only the named wrappers. The new cases 5, 5a and 5b and the existing suite were desk-checked against the engine and parser, not executed. Left to the P
  • scripts/check-convention-yaml.sh --check (yaml-subset parse plus check-jsonschema of docs/conventions/harness-config.yaml against the new schema) was not run here; check-affected lists convention-yaml-schema as CI only. Left to the PR's CI.
  • scripts/check-changelog-fragments.sh --check-required origin/main, in the issue's exact form, was not run; the runner's check-changelog-fragments wrapper ran and passed. Left to the PR's CI.
  • The personal layers (user-global ~/.claude/audit-pass.md and overlay .claude/audit-pass.local.md) were not moved. The issue covers only the team block. The config-cascade row declares them a deviation from ADR 0075 until their own migration.
  • Low review findings left as-is: a finding_id key with nothing under it in the team YAML yields no parser record, so the engine ignores it rather than reporting it malformed (the schema rejects it in CI); a \t escape in a YAML value becomes a space, which changes the hashed constituents, so the ent
  • The team layer is still read from the working tree, not the default branch (ADR 0064 Decision 5's floor wording). That is unchanged behavior and outside this issue.

Fix

  • plugins/harness-config/skills/audit/scripts/audit-engine.sh: the team layer is read from <home>/harness-config.yaml (yaml-subset.awk, STRICT) with the .claude/audit-pass.md compatibility read only when the YAML is absent. A parse failure drops the team layer, and a broken convention-home point
  • plugins/harness-config/skills/audit/scripts/audit-engine.test.sh: case 5 asserts the compatibility read, its layer and source, and the layer list. New case 5a: the YAML wins when both exist, the old file is reported ignored, the YAML suppresses alone, and malformed YAML entries are reported. New cas
  • plugins/harness-config/schemas/harness-config.schema.json: new schema for docs/conventions/harness-config.yaml (suppressions keyed by 16-hex finding_id; check, claim, sites with surface and anchor/vN, reason, date).
  • plugins/harness-config/lib/yaml-subset.awk: new generated copy of lib/yaml-subset.awk (scripts/sync-shared-copies.sh).
  • scripts/shared-copies.txt: registers the harness-config copy of lib/yaml-subset.awk.
  • docs/conventions/harness-config.yaml: new team file carrying both suppression entries from .claude/audit-pass.md unchanged (anchor/v1 key and dates quoted).
  • plugins/harness-config/skills/setup/SKILL.md: description and the record section point at the team YAML. check parses it and reports the old team file as a compatibility read. apply migrates the old file's entries into the YAML and verifies the result through the engine, or scaffolds the YAML on req
  • plugins/harness-config/skills/audit/SKILL.md: the input table, the paste-a-stanza step (quoted anchor/v1 key; migrate first with setup apply) and the auto-mode refusal record point at the team YAML.
  • plugins/harness-config/skills/audit/context/procedures.md: the suppression-record paragraph and the auto-mode refusal line name the team YAML and the layers output.
  • plugins/harness-config/skills/audit/context/validation-categories.md: Category B names the team YAML.
  • plugins/harness-config/skills/audit-pass/SKILL.md: the reference index row and 'The suppression record' name the team YAML.
  • plugins/harness-config/skills/audit-pass/reference/suppression.md: 'The record and its layers' names the team YAML, the one-release compatibility read, the no-fallback rule, and migrate-before-write.
  • plugins/harness-config/skills/audit-pass/reference/exclusion-set.md: the excluded suppression record and the permitted central alternative name the team YAML.
  • plugins/harness-config/skills/audit-pass/reference/lane-catalog.md: the audit lane's suppression handling names the team YAML.
  • plugins/harness-config/skills/audit-pass/reference/retired-conventions-sweep.md: repeated declines are recorded in the team YAML.
  • plugins/harness-config/README.md: Consumer conventions names the team YAML and its schema.
  • .changes/harness-config/refactor-9732-harness-config-yaml-5c1e9a37.md: minor changelog fragment for the change.
  • docs/conventions/config-cascade/README.md: the harness-config (audit-pass) Implementers row names the new team layer, the compatibility read and the declared personal-layer deviation. The surface gets its own root-rule row and leaves the later-adoption list.
  • docs/conventions/config-cascade/CHANGELOG.md: Unreleased entry (no contract change).
  • docs/conventions/finding-suppression/README.md: 'Where the record lives' allows a plugin's YAML concern file as the team layer and lists harness-config's paths.

Verification

The runner ran each check from the base copy against 685673f:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: final run reports 10 passed, 6 skipped over 21 changed files. An earlier run failed spoke-plugin-root (${CLAUDE_PLUGIN_ROOT} in audit-pass/reference/suppression.md) and markdownlint MD038 (setup/SKILL.md); bot
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 5 changelog fragments under .changes/ are valid.
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/verify/bin/sync-shared-copies: generated plugins/harness-config/lib/yaml-subset.awk, exit 0.
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/verify/bin/cant-fail-scan --file plugins/harness-config/skills/audit/scripts/audit-engine.test.sh --lines 486-590: no can't-fail tests found, exit 0.
  • Local review by one fresh-context subagent over the whole diff. It desk-traced every new test assertion as passing and found no engine bug. Fixed from its findings: the write instructions now say to migrate before adding a YAML entry; audit-pass's reference no longer claims the engine output lists e
  • Grep for \.claude/audit-pass\.md under plugins/harness-config: hits are the engine's compatibility-read code and comment, the tests, CHANGELOG.md history lines, and in setup/SKILL.md the compatibility-read probe (line 113) plus two lines naming the unchanged user-global layer `~/.claude/audit-pass
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40185167037

Left out: the items under Not verified.

Related

#9732

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

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 5acf4c7f64dcc1538e29854d2097e171960d8ace: 0 finding(s), 0 as inline comments.

No security issues found in this pull request (head 5acf4c7).

critical-findings: 0

Scope read: all 21 changed files in the diff and the PR context. I also read plugins/harness-config/lib/resolve-convention-home.sh, which the engine now relies on. No changed file matches a trusted path (.github/standards/trusted-actors/**, .github/actions/check-trusted-trigger/**, CODEOWNERS, .gitmodules). No plugin.json or marketplace.json changed, so there are no manifest lines to report.

What I checked on the suppression layer, which acts as a control because it hides audit findings:

  • Path from the convention home: audit-engine.sh builds TEAM_RECORD from the output of resolve-convention-home.sh. That resolver rejects absolute paths, a leading ~, backslashes and ./.. segments (lines 354-370). A pointer line therefore cannot send the team-layer read outside $PROJECT_ROOT.
  • Fail-closed parsing: a team YAML that does not parse drops the whole team layer and never falls back to .claude/audit-pass.md. The parse error is recorded in suppressions.layers and malformed, with control characters stripped. Parsing runs with STRICT=1, so a duplicate key is a parse error. An unparseable file therefore cannot suppress anything.
  • Old file once the YAML exists: the old file is ignored, so a new YAML can only remove suppressions, never add old ones. The new suppressions.layers output records this.
  • Entries still checked: entries are still hash-verified against finding_id, so a forged or edited entry is reported malformed and does not suppress. Only the team layer suppresses; personal entries are still reported as personal-only, not applied. The YAML-to-TSV awk converter only writes known fields, and the values it passes on go through the same load_suppression_entries validation as before.
  • Injection: no new shell evaluation of file content. Values pass through awk, read and jq -R, with no eval or unquoted expansion.
  • Trust anchor: the team layer is still read from the working tree rather than the default branch. The PR states this is unchanged behaviour, so I did not count it as a finding here.
  • Instruction text: the audit skill's auto-mode refusal text is reworded to say "the team suppression record". It still forbids the same operation, and the diff adds a recheck trigger for the new file path. Nothing is dropped.

Spend: this PR changes no billed resource or setting. The lane runs spend only prepaid or subscription usage, so there is no hold.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 5acf4c7f64dcc1538e29854d2097e171960d8ace: 0 finding(s), 0 as inline comments.

No findings. I read all 21 files of the diff and the PR context, and desk-checked the engine change in plugins/harness-config/skills/audit/scripts/audit-engine.sh against its new tests. I ran no code in this session, so none of this was executed. The PR's own test and CI claims (audit-engine.test.sh, check-convention-yaml.sh) are author-claimed and I did not independently confirm them.

Closing issue #9732 — each "Done when" item, checked against the diff:

  • docs/conventions/harness-config.yaml carries both suppression entries. Their keys, claims, anchor/v1 values and dates match the legacy block as the PR describes it. The schema matches the YAML's shape on reading. The check-convention-yaml.sh run is a CI-only check I did not execute.
  • The reader tests cover the three cases the issue names: the old file is read when the YAML is absent (case 5), the YAML wins when both exist (5a), and the layer and source are named for each applied entry (5, 5a). Case 5b covers a YAML that does not parse. The .claude/audit-pass.md file is removed in the middle of 5a, so the last 5a assertions test the YAML alone, and 5b then recreates it.
  • The remaining .claude/audit-pass.md mentions under plugins/harness-config are the compatibility-read code and its tests, the changelog lines, the setup probe (which the PR says is at line 113), and the unchanged user-global layer. That matches the criterion.
  • The PR body lists each migrated entry with its new home and schema.
  • The changelog fragment is bump: minor. That fits a new schema and a new read path with a one-release fallback.

Engine correctness:

  • PLUGIN_ROOT is defined at line 327, before its first use in the new block, and lib/yaml-subset.awk exists after the shared-copy sync.
  • The convention-home handling follows the resolver's documented exit codes. Exits 2 and 3 are listed as an unusable pointer. The other non-zero exits fall back to docs/conventions without a note.
  • The parse-failure path drops the team layer, records it in malformed, and does not fall back to the old file, as the issue requires.
  • SUPPRESS_SOURCE is set in the same branch as SUPPRESS_REASON, so the set -u lookup at line 739 is safe. REC_WIDTH and the jq field indexes were both raised to 14.

Manifests: no plugin.json or marketplace.json change in this diff, so no manifest <field> lines apply.

Trusted paths: no changed file matches .github/standards/trusted-actors/**, .github/actions/check-trusted-trigger/**, CODEOWNERS or .gitmodules.

Spend and cost: nothing here spends credits or can start a charge.

Embedded text: the PR body and the issue contain no directives addressed to the reviewer.

Known limitations the PR already lists (not counted as findings): a finding_id key with nothing under it yields no parser record, so the engine ignores it. A \t escape in a YAML value becomes a space. The team layer is still read from the working tree, not the default branch.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

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

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound: no-run; evidence-unbound:claude-security-review: not bound: no-run)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 5acf4c7f64dcc1538e29854d2097e171960d8ace.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit ee12047 Oct 25, 2026
40 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-9732-40185167037-1 branch October 25, 2026 13:07
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.

refactor(harness-config): move the .claude/audit-pass.md (its suppressions block) settings to docs/conventions/harness-config.yaml

0 participants