Skip to content

ci: fail shipped plugin content that names an organization repository - #17570

Merged
kyle-sexton merged 2 commits into
mainfrom
ci/17208-org-repo-token-check
Nov 20, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
ci/17208-org-repo-token-check

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #17208

Summary

#17208's third done-when item: a CI check that fails a pull request adding this organization's repository path to shipped plugin content outside the allowed citation shapes (#17208).

Fix

  • scripts/check-org-repo-tokens.sh scans tracked text files under plugins/ for an <org>/<repo> token or an <org>.github.io/<repo> URL. Not scanned: each plugin's CHANGELOG.md and .claude-plugin/plugin.json (publisher metadata), test files (*.test.*, test_*.py) and evals/, tests/, test/, fixtures/ directories.
  • Excused citation shapes, from docs/plugin-philosophy.md "Design boundary" and the Remove organization-specific dependencies from shipped plugins #17208 plan: a line carrying Pointer:, Basis: or As of; a link into this repository's own pages (github.com/<org>/claude-code-plugins/blob|tree|issues|pull|...); the marketplace add install command.
  • Every other token needs a counted entry with a reason in scripts/org-repo-tokens-allow.tsv (path, token, count, reason). A file with more occurrences than its entry allows fails; an entry above the current count prints a notice to lower it and does not fail.
  • The allow file is seeded from main: 179 path/token pairs, 297 occurrences. Reasons by kind: raw links to this marketplace's own docs (62 pairs), schema $id/$ref identifiers (58), another organization repository named in prose or an example (20), this marketplace's own repository as install, issue target or example (19), the git-hooks entries.json default remote (11), links to other organization repositories cited for a reader (9).
  • Wired as the org-repo-tokens hygiene gate in pr-require-checks.yml (lint-repo job, beside loop-lane-floor-drift), with its check-affected-gates.txt row and check-script-contract.test.sh registry row. docs/plugin-philosophy.md lists it as the repository-path extension of the org-agnosticism classes.

Verification

  • scripts/check-org-repo-tokens.sh on this branch: clean.
  • scripts/check-org-repo-tokens.test.sh: PASS=17 FAIL=0 (clean tree; an organization pages URL fails; citation shapes and excluded files pass; an unexcused token fails with path, token and line on stderr only; a raw own-repo fetch is not a citation; counted entries; a count overrun; the lower-it notice; malformed and missing allow file and a non-repository root exit 2).
  • scripts/check-affected-gates.test.sh 6/0, scripts/check-docs-only-gate.test.sh 88/0, scripts/check-docs-only-gate.sh --check clean, scripts/check-script-contract.test.sh 68 pass, 2 fail on check-html-assets.sh only because this worktree has no node_modules (htmlhint missing). scripts/check-affected.sh: 16 passed.

Remaining

What #17208 still needs after this PR:

  • The guardrails lanes App login: #17556, held with do-not-merge on an owner question about its default.
  • The 20 "prose or example" and 19 own-repository allow entries are the remaining instruction-level matches; each lowers its count as its plugin is reworded.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd

scripts/check-org-repo-tokens.sh scans tracked text under plugins/ for an
<org>/<repo> token. A Pointer:, Basis: or As of line, a link into this
repository's own pages and the marketplace install command are citations;
every other token needs a counted entry with a reason in
scripts/org-repo-tokens-allow.tsv, seeded from main. Wired into the
lint-repo hygiene gates.

Refs: #17208

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 20, 2026 02:09
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T02:10:51.557052Z f18a7ef 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

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44658827400

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #17570, incremental (f18a7ef..ac1d185)

I found no security issues. I read the whole of the one change since the last review, in .claude-lane/incremental.diff: one hunk in docs/plugin-philosophy.md. This lane already reviewed an earlier head, so this review was blocking only and reports CRITICAL and IMPORTANT findings only.

What changed. The "repository path" bullet is rewrapped and now says two more things about scripts/check-org-repo-tokens.sh:

  • Allowed: the marketplace add <org>/<own repo> install command passes the gate.
  • Not scanned: each plugin's CHANGELOG.md and .claude-plugin/plugin.json, *.test.* and test_*.py files, and anything under an evals/, tests/, test/ or fixtures/ directory.

The PR description lists the same allowance and the same exclusions as the script, which this lane reviewed at the earlier head. The edit only records them in the docs.

Instruction-surface lens. The edit deletes, narrows or softens no standing rule and changes no enforcement. It describes what the existing gate leaves out, and that makes the doc more accurate, not less safe. The file is not on the trusted-path list.

Trust controls and manifests. This change touches no trust control, token scope, kill switch, merge hold or plugin manifest.

PR context. The description matches the change and contains no embedded instructions.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on f18a7efdd1a60d92e7e5a2f49fd84549758cedd9; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread docs/plugin-philosophy.md Resolved
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, f18a7ef → ac1d185): no findings

This review covers only what changed since f18a7efd, which is the docs/plugin-philosophy.md hunk at lines 89-98. I read the whole hunk. The prior-findings file says blocking only: yes, so this pass reports blocking findings only.

The earlier finding is fixed. The bullet now matches what the gate does:

  • It names the marketplace add <org>/<own repo> install-command excuse, which the script handles at scripts/check-org-repo-tokens.sh:59 and :68.
  • Its "Not scanned" list matches the script's pathspec exclusions at scripts/check-org-repo-tokens.sh:35-37: each plugin's CHANGELOG.md and .claude-plugin/plugin.json, *.test.* and test_*.py files, and anything under evals/, tests/, test/ or fixtures/.
  • The Pointer:/Basis:/As of excuse matches :66, and the own-repository link excuse matches :58 and :67.

The owner resolved the settled thread on these lines, and lines changed since resolution is no. Nothing is raised again.

I ran nothing. The author's verification claims are unverified.

Closing issue: none. The PR only says Refs: #17208.

Loosened checks: none. The edit is documentation and it makes the stated coverage narrower, not wider. Loosened-check verdict: fail (the default, since the prompt has no loosened_check_verdict: line); patterns: 0 (no loosened_check_patterns: line). There was no loosened_check_decision_record: line, so the citation requirement was not checked.

Spend: none.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 3ae3b63 Nov 20, 2026
70 checks passed
@kyle-sexton
kyle-sexton deleted the ci/17208-org-repo-token-check branch November 20, 2026 03:00
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant