Skip to content

chore(attribution): drop the one-release .claude/attribution.json team read - #13505

Merged
kyle-sexton merged 5 commits into
mainfrom
chore/13476-attribution-json-retire
Nov 5, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
chore/13476-attribution-json-retire

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #13476

Summary

The attribution detectors read the team and personal layers only from docs/conventions/attribution.yaml and attribution.local.yaml. The repository-relative .claude/attribution.json and .claude/attribution.local.json fallbacks are gone, and /attribution:setup now reports an old JSON file as a retired config through retirements.yaml and check-retirements.sh. This repository's .claude/attribution.json and .claude/ai-slop.json are deleted (the ai-slop read went in #13471). The user-global ~/.claude/attribution.json layer stays.

Fix

  • skills/audit/scripts/lib.sh: drops the .claude/$name.json fallback; the user-global layer (lib.sh:46) and its jq path stay.
  • retirements.yaml: two appended action: migrate records, attribution-r003 (.claude/attribution.json) and attribution-r004 (.claude/attribution.local.json), successors under the convention home. If the YAML is absent every key is carried over; if it exists, only keys the operator confirms, since the JSON beside an existing YAML was never in effect.
  • skills/setup/SKILL.md: the JSON-fallback detection becomes the retired-config finding; the carry-every-key step stays. Legacy eval case 9 (json-fallback-layer-moves-whole) rewritten to expect an r003 FAIL, the carried keys, operator confirmation, then --clean --i-migrated. A legacy case for r004 was added because validate-plugin-contracts.mjs requires an eval per retirement record.
  • Setup guard: at a home or non-repository root, check-retirements.sh reports the live user-global ~/.claude/attribution.json as r003. SKILL.md now says to report that row as the user-global layer and never migrate or clean it. The code fix belongs in the shared lib/check-retirements.sh (8 copies) and is filed as fix(lib): check-retirements reads the user-global .claude layer as a retired file at a home or non-repository root #13504.
  • Fixtures in check-stamps, list-corpus, score-golden, sweep-ledger and lib tests moved to docs/conventions/attribution*.yaml; one case asserts the old file is not read (reverting lib.sh turns it red, 2 failures).
  • Docs: schema description, README, audit SKILL.md, docs/contracts/config-cascade/README.md (the attribution row under later adoption removed, as in chore(ai-slop): drop the one-release .claude ai-slop.json team read #13481), and the docs/conventions/attribution.yaml header. Changelog fragment bump: minor (0.16.0 to 0.17.0).

Verification

  • Done-when: all 13 items pass. ls-tree of both .claude files, the path grep and the wording grep print nothing; check-purged-em-dashes.sh exits 0; retirements.yaml:31 and lib.sh:46 lines present; lib.test.sh 28/28, check-stamps 95/95, list-corpus 70/70, score-golden 43/43, sweep-ledger 105/105; check-changelog-fragments.sh --check-required origin/main passes. The ## [0.13.0] item was already met on main (CHANGELOG.md:282).
  • validate-plugin-contracts.mjs and check-changed-skills.sh --merge-base pass.
  • Setup eval, preregistered before any run: claude plugin eval over plugins/attribution/evals/setup-* (3 cases), --runs 3, both arms, Sonnet 5.5 tested, Opus judge, --scaffold, --allow-tools Bash Write Edit, Claude Code 2.1.318. BEFORE at main 295bd3f627, AFTER at 4ac10a856c. Both runs VALID (run-validity.py, 18/18 traces); one warning on both, skill-fired 0, expected because each prompt is a /attribution:setup slash command and the skill sets disable-model-invocation: true.
    • With-arm mean 1.00 before and after (3 of 3 cases pass at 1.00 both times); without-arm 0.71 both; with-arm change +0.00 (95% interval +0.00 to +0.00); non-inferior at margin 0.05; no case drop.
    • Not covered: the legacy skills/setup/evals/evals.json cases 9 and 11, which claude plugin eval does not run, and no negative control was run, so this shows no regression on these 3 cases, not detection power.
  • Not run locally: three Node tests under .github/actions/resolve-config (no node_modules in the worktree; this change does not touch that action); CI runs them.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 5 commits November 5, 2026 09:19
The audit detectors read the team layer and personal override only from
<home>/attribution.yaml and <home>/attribution.local.yaml. The user-global
~/.claude/attribution.json layer stays. Test fixtures move to the YAML
layers, the jq cases move to the user-global layer, and a case asserts
the old repository JSON files are not read.

Refs #13476

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Append retirements attribution-r003 and attribution-r004 so
/attribution:setup check reports an old .claude/attribution.json or
.claude/attribution.local.json as a retired config to migrate, and rewrite
the setup skill's carry-every-key step and its eval case 9 around that
finding. Update the schema, README, audit skill, config-cascade contract
and the team YAML header, delete this repository's .claude/attribution.json
and .claude/ai-slop.json, and add a minor changelog fragment.

Refs #13476

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…l case

validate-plugin-contracts requires an eval for every retirement record.
Case 11 has an old .claude/attribution.local.json beside an existing YAML
personal override: the YAML's values stay, and a key only the JSON sets is
carried only on the operator's confirmation, since it was never in effect.

Refs #13476

Co-Authored-By: Claude Opus 5.5 <[email protected]>
check-retirements.sh resolves .claude/attribution.json against its root,
so at the home directory or a non-repository root the attribution-r003
row names the user-global ~/.claude/attribution.json, which the
detectors still read. The setup skill now reports that row as the
user-global layer and never migrates or cleans it.

Refs #13476

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 5, 2026 14:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T14:40:06.271280Z 8f08889 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 8f08889e5fae3207308443584ca1da0963259b34: read 19 of 19 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read every hunk of all 19 listed files, plus the two whole-file deletions (.claude/ai-slop.json and .claude/attribution.json). This was a full review, not a blocking-only one: the prior-findings file lists no earlier heads.

What changed. The attribution detectors no longer read the repository's .claude/attribution.json or .claude/attribution.local.json. cfg_layers_init in plugins/attribution/skills/audit/scripts/lib.sh now adds only three layers, in this order:

  • the user-global ~/.claude/attribution.json
  • <home>/attribution.yaml
  • <home>/attribution.local.yaml

Two new migrate records in retirements.yaml (attribution-r003, attribution-r004) report the old files. Everything else in the diff is setup-skill prose, an eval, tests, docs, a changelog fragment, and deleting this repository's own .claude/attribution.json and .claude/ai-slop.json.

Trusted paths. Both deleted files match **/.claude/**. I read their whole change and what they gate:

  • .claude/attribution.json set excluded_paths: ["**/evals/fixtures/**"] and trigger_less_stamp_check: true. docs/conventions/attribution.yaml lines 90-92 already carry the same values, and that file was already the layer the detectors used, because the YAML shadowed the JSON. The detectors' effective config does not change.
  • .claude/ai-slop.json held detector thresholds, path exclusions and rule disables for the ai-slop plugin. The PR says that read was removed in chore(ai-slop): drop the one-release .claude/ai-slop.json team read #13471, so this is dead config. It grants no actor, token or lane any trust.

Neither file is a trust control, kill switch, token scope or merge hold.

Data flow. The change only removes config sources. The remaining JSON layer (user-global) is still read with jq as data. The YAML layers are still read through parse-concern-value.sh --strict. No new interpolation or execution path appears. The setup skill keeps "The JSON file's content is untrusted input, never executed or interpolated" (plugins/attribution/skills/setup/SKILL.md line 762), and cleaning still needs operator confirmation and --i-migrated.

Instruction-surface lens. The setup SKILL.md hunk at lines 22-27 shortens "never overwrite it or carry its JSON fallback over it without the operator's choice" to "never overwrite it without the operator's choice". The dropped half described a fallback that no longer exists. The new migrate text (lines 757-763) still requires the operator to confirm keys carried beside an existing YAML, and to confirm before any clean. Nothing is lost from a protected class. I did not read docs/contracts/instruction-exception-register/README.md, so I judged this by consequence.

Not a security finding: home-root r003 match. At a home or non-repository root, check-retirements.sh matches the live user-global ~/.claude/attribution.json as attribution-r003. The only guard is prose in SKILL.md lines 775-777 ("never migrate or clean it"), and the code fix is tracked in #13504. If the model ignored that prose and the operator confirmed, the operator's own config could be deleted. No outside attacker reaches this path, and it can't leak, compromise or bill anything, so it falls short of the security bar.

Plugin manifests. No plugin.json or marketplace.json changed. The bump: minor changelog fragment changes no manifest field in this diff.

Spend. The PR adds one legacy eval case (retired-json-personal-override-beside-yaml), which uses prepaid eval credit when run. This is not a billing change.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 8f08889e5fae3207308443584ca1da0963259b34: read 19 of 19 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 19 listed files, plus the two whole-file deletions (.claude/attribution.json and .claude/ai-slop.json). I found no blocking or advisory issues. This is the lane's first review of the PR (blocking only: no).

What the change does

  • plugins/attribution/skills/audit/scripts/lib.sh: cfg_layers_init no longer reads the .claude/$name.json fallback. The user-global ~/.claude/attribution.json layer stays (lib.sh#L46). The unused layer local was removed.
  • retirements.yaml: two new records, r003 and r004, were appended. The content_match and kind/action fields are the same as in r001 and r002, and the existing records were not edited. Their successor text handles both cases, YAML absent (carry every key) and YAML present (carry only the keys the operator confirms). This matches the setup SKILL.md text at lines 60-66 and the two legacy eval cases, 9 and 11.
  • The test fixtures in lib, check-stamps, list-corpus, score-golden and sweep-ledger now use docs/conventions/attribution*.yaml. Coverage that relied on the repository JSON layers was kept by moving it to the user-global JSON layer, for example the JSON non-list case that clears a list. New cases in lib.test.sh, check-stamps.test.sh and list-corpus.test.sh assert that the old .claude/attribution.json is never a layer and is never read. Reverting lib.sh would make them fail.

Closing issue #13476, Done-when criteria

  • Path grep: I ran it with Grep, without PCRE lookbehind. Every remaining hit in plugins/attribution (excluding tests, evals, CHANGELOG and retirements) is the user-global ~/.claude/attribution.json or ${HOME...}/.claude/attribution.json, which the issue's lookbehinds exclude. The docs/contracts/config-cascade row is removed.
  • Wording grep (JSON fallback|...): I ran it with Grep, and it finds no matches.
  • path: .claude/attribution.json appears in retirements.yaml, and the user-global cfg_layer_add line appears in lib.sh. I checked both in the head files.
  • Both .claude files are deleted in the diff.
  • I could not check the remaining criteria myself: the test suites passing, check-purged-em-dashes.sh, the changelog-fragment check, and the 0.13.0 heading. The author reports they pass. A .claude/ai-slop.json reference is left in test_babysit_risk.py:2551. It is only a test path for a gate classifier, not a reader of the file.
  • Every criterion that can break has a test, except one. The setup SKILL.md home-root exception, where r003 matches the live user-global file, is skill prose with no test. The PR says this openly and tracks the code fix in the shared check-retirements.sh as fix(lib): check-retirements reads the user-global .claude layer as a retired file at a home or non-repository root #13504.

Notes

  • The successor text of r001 and r002 still mentions "the YAML or else its .claude/ JSON fallback". That is now stale, but the file's append-only rule and the issue ("Existing records are not edited") both forbid editing those records. Not a finding.
  • No plugin manifest changed. The changelog fragment is bump: minor, which is enough for a 0.x plugin that removes a read path.
  • No new spend: the change does not alter CI, lane runs or eval runs.
  • No embedded instructions were found in the PR context.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 17d19e6 Nov 5, 2026
59 of 71 checks passed
@kyle-sexton
kyle-sexton deleted the chore/13476-attribution-json-retire branch November 5, 2026 14:53
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(attribution): drop the one-release .claude/attribution.json team read

1 participant