Repository navigation
fix(plugins): bundle the contracts skills fetched from the publisher - #17442
Conversation
Skills told the model to fetch the detector-findings and pre-PR ordering
contracts from the publisher's raw GitHub URL before acting, which makes
the publisher a runtime dependency (docs/plugin-philosophy.md, Design
boundary) and turns every offline persist run report-only.
Ship each contract inside the plugin that reads it as a generated copy
(scripts/shared-copies.txt) and read it from ${CLAUDE_PLUGIN_ROOT}:
detector-findings into ai-slop, attribution, docs-hygiene,
harness-config, mutation-testing and testing; pre-pr-ordering into
source-control. The canonical stays in docs/contracts/. Its sibling
links now go through the repository root so they resolve from both
the canonical and the copies.
Refs: #17208
Co-authored-by: Claude Opus 5.5 <[email protected]>
check-cross-plugin-source-drift.sh --check fails the six identical reference/detector-findings.md copies as an unregistered cluster. Register them, plus duplication-audit cluster lines for both contracts, as the other generated contract copies are. Refs: #17208 Co-authored-by: Claude Opus 5.5 <[email protected]>
…pokes
The Read tool substitutes no variables, so a spoke that names
${CLAUDE_PLUGIN_ROOT} hands the model an unresolved path
(scripts/check-spoke-plugin-root.sh). Name the copy by its place in the
plugin root instead, and use source-control's <plugin-root> placeholder,
which its SKILL.md renders.
Refs: #17208
Co-authored-by: Claude Opus 5.5 <[email protected]>
… copies check-vocabulary allows the contract's severity-tier wording under docs/contracts/detector-findings/ but reported the same lines in the six generated copies under plugins/*/reference/detector-findings.md, which must match the source byte for byte. The copies get the same allow by path, as the enforcement-ladder copies have, with a test row that shows the line is still reported outside that path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d05d70d26e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lane run report
Failed GitHub API calls
|
|
claude-security-review reviewed Security review: PR #17442 (incremental, since f984da9)No security issues found. This lane already reviewed an earlier head of this pull request, so this pass was blocking only: it reports only CRITICAL and IMPORTANT findings. Scope. I read the whole incremental diff. It covers one file, What changed. Seven existing registry lines were moved, with no change to their text, from after the
No line was added or removed, and no source or destination path changed. The set of copies that What is untouched. This push changes no trust control, token request, kill switch, merge hold, instruction surface or plugin manifest, so there are no manifest lines. Context files. The PR context file has no text asking the lane to pass the change, skip a check or drop a finding. The one prior finding is a summary with no line anchor and zero findings, so there is nothing to repeat. critical-findings: 0 |
|
claude-review reviewed Code review:
|
|
Held: claude-review flags the new |
Drop the vocabulary allow for plugins/*/reference/detector-findings.md
and its test row. Reword the two contract lines check-vocabulary reported
in the copies ("Repo-override only", "overrides it"), so the copies pass
with no new allow.
"Where the file goes" now states what a producer needs without the
review plugin: the findings directory and branch slug, the self-ignore
guard, the file name and no-overwrite rule, and what the consumer admits.
The review plugin's change-set.md and findings-file-shape.md stay the
consumer's statement, which the contract must agree with. Adopter wording
says a producer reads its bundled copy instead of fetching the contract.
The contract is bumped to 3.11.0 and the six copies regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two eval cases still expected the network fetch this branch removes. ai-slop's persist-refuses-without-contract now makes the bundled reference/detector-findings.md unreadable, so it still tests the refuse-to-write rule. attribution's offline audit case now expects rung 2, the plugin's bundled copy, to resolve the contract, so a Write of the findings file is allowed; an Edit or shell redirect into one is still refused. Two spoke sentences pointed at the review plugin for the slug rule and said the contract does not state it; they now name the bundled contract. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The offline audit case now expects the bundled contract to resolve, so nothing tested rung 3 of persist-findings.md (neither copy readable, so write nothing). audit-contract-unreadable-report-only is that case: the same corpus and the original no-write, no-edit and no-shell-write graders, with the plugin's bundled reference/detector-findings.md unreadable and a report-only grader that names both bundled-copy rungs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… contracts The seven registry lines sat inside the target-scope block, at the line another queued change also inserts at, so the merge queue removed this pull request on a merge conflict. They now follow the enforcement-ladder copies, with no change to what is registered. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Refs: #17208
Summary
Eight shipped instructions told the model to fetch a contract from this repository's raw GitHub URL before acting. That makes the publisher a runtime dependency, which plugin-philosophy (Design boundary, org-agnosticism) calls non-conforming. It also made every offline persist run report-only. Each plugin now ships its own generated copy of the contract and reads that copy.
skills/audit/context/persist-findings.md(and the matching step inSKILL.md)skills/audit/context/persist-findings.md, rung 2 of the resolution ladderskills/audit-noise/context/persist-findings.mdskills/audit-instructions/context/persist-findings.mdskills/audit/context/persist-findings.mdskills/audit/SKILL.md,--persist-findingsstep 1skills/pull-request/reference/prep.mdandready-for-review.mdready-for-review.mdis an eighth site: the same sentence ("Read it there"), the same contract and the same plugin asprep.md.Fix
scripts/shared-copies.txt:docs/contracts/detector-findings/README.mdgoes toplugins/<p>/reference/detector-findings.mdin the six detector plugins, anddocs/contracts/pre-pr-ordering/README.mdgoes toplugins/source-control/reference/pre-pr-ordering.md.scripts/sync-shared-copies.shgenerated all seven. The canonical copies stay indocs/contracts/.${CLAUDE_PLUGIN_ROOT}because the Read tool substitutes no variables (scripts/check-spoke-plugin-root.sh). So the detector spokes name the copy by where it sits in the plugin root, and source-control uses its own<plugin-root>placeholder. Wording that described a fetch now describes a read: "cannot be read", "contract read succeeded", "read-and-refuse gate". The refuse-to-write rule is unchanged.reviewplugin's files). Rung 2 is now the bundled copy, and the paragraph explaining the rung order was rewritten to match.plugin-philosophy.mdand toCHANGELOG.mdas repository-root-relative links (../../../docs/...). These links resolve from bothdocs/contracts/<name>/andplugins/<p>/reference/, so lychee offline passes on the copies and no exclude is needed.scripts/cross-plugin-source-registry.txt, with cluster lines for both contracts. The other generated contract copies are registered the same way.reviewplugin is not installed. That covers the findings directory and branch slug, the self-ignore guard, the file name and no-overwrite rule, and what the consumer admits (type:,branch:, the## Findingsheader, cell escaping, repo-relative paths).review'schange-set.md"Findings location" andfindings-file-shape.mdremain the consumer's statement, and the contract must agree with them. The adopter wording that said a producer fetches the contract at run time now says it reads its bundled copy.check-vocabularyreported two contract lines in each bundled copy, because its allow coversdocs/contracts/detector-findings/**only. The two lines are reworded: "Repo-override only" became "Opt-in per repository", and "overrides it" became "replaces it". The copies pass with no new allow.persist-refuses-without-contractnow makes the bundled copy unreadable, so the refuse-to-write rule is still tested. attribution'saudit-unsourced-restatement-report-onlynow expects rung 2, the bundled copy, to resolve the contract offline, so a findings file may be written; an Edit or shell redirect into one still fails the case. A new attribution case,audit-contract-unreadable-report-only, keeps rung 3 (neither copy readable, so write nothing) under test with the original no-write graders. Two spoke sentences that sent the slug rule to thereviewplugin now name the bundled contract.Verification
scripts/sync-shared-copies.sh --check: all 981 copies match, after the update from main.--check-bump origin/main: every carrying plugin has a fragment.scripts/check-changelog-fragments.sh --check-required origin/main: 7 of 7 plugins have a fragment.python3 -I scripts/check-vocabulary.pyover the whole tree: exits 0, with no allow for the copies (12 lines reported before the rewording).test_check_vocabulary.pyunder unittest: 23/23.scripts/check-vocabulary.test.sh: 23/23.scripts/check-cross-plugin-source-drift.sh --check: clean.scripts/check-detector-findings-crosswalk.sh --check: 53 rule rows OK. Its test suite: 16/16.lychee --offlinewithlychee.toml, over the contract, its changelog and the six copies: 0 errors.validate-cases.py plugins/attribution/evals: no FAIL (warnings only, all aboutallowed_tools, which this change does not touch).check-evals-quality.shon the ai-slopevals.json: PASS.check-detector-eval-coverage.sh --check: passes.scripts/check-changed-skills.sh origin/main(7 skills, 0 failed),scripts/sync-shared-copies.test.sh(101/101),scripts/check-publisher-token-alignment.shandscripts/check-spoke-plugin-root.shpassed. The pre-pushcheck-affectedpassed on the current head.Remaining
This pull request removes the runtime fetches of contracts from this repository's raw GitHub URLs in the seven plugins listed above. Still open under #17208:
Related
corrections/.../finding-classes.md,code-metrics/.../audit-suppressions/SKILL.md,harness-config/.../criteria.md,review/reference/findings-file-shape.md,review/.../fix-pass-mode.mdandcode-tidying/.../remove.md.emit-findings.shheader comments in ai-slop, attribution, docs-hygiene and harness-config still say "fetch-and-refuse gate". Editing those lines trips the comment-lint hook on comments that predate this change, so they are left for a comment-tidy pass.🤖 Generated with Claude Code