Repository navigation
ci: fail a plugin that loads a file from a sibling plugin - #16560
Conversation
Record the boundary rule from docs/plugin-philosophy.md:100 under Boundary rules in a new architecture topic doc, and enforce it with scripts/check-plugin-imports.sh: a relative path in a load position that resolves into another plugin's directory fails, naming the rule and path:line. Four tests that hold two plugins to one contract are listed in scripts/plugin-imports-exceptions.txt; a listed file that stops crossing fails as stale. The cant-fail scan suite now writes its own C# files instead of reading mutation-testing's fixture. The check runs in check-affected.sh and in the check-plugins job beside the cross-plugin source drift step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLnS6k3MEmYoBnwDv3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLnS6k3MEmYoBnwDv3
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: 88f47e76a6
ℹ️ 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".
Plugin hook entry points are .tsx files, and the check skipped them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLnS6k3MEmYoBnwDv3
Lane run report
Failed GitHub API calls
|
…rt check A path after a variable named *PLUGIN_ROOT or *PLUGIN_DIR was resolved from the file's own directory, so three tests that reach a sibling plugin that way passed unseen. Each is an agreement or integration test and is listed as a dated exception. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLnS6k3MEmYoBnwDv3
|
claude-security-review reviewed Security review: PR #16560 (incremental, head 008fb55)I found no security issues in the changes since critical-findings: 0 This review was blocking only, because this lane already reviewed an earlier head. Only CRITICAL and IMPORTANT findings would have been reported. What changed:
Other notes:
|
|
claude-review reviewed Code review, incremental (6ba2fe5 → 008fb55), blocking onlyNo blocking findings. I read every hunk of the 3 files in this push:
This lane already reviewed an earlier head, so per the prior-findings file this review covers blocking findings only. Advisory findings were dropped. What I checked
UnverifiedI could not run anything here. The PR's claims are the author's and I have not confirmed them: 40 of 40 tests passing, and the check passing on the tree. SpendNo cost hold. This push only changes a repo-local check script, its tests and its exceptions list. Verifier dropped 0 of 0 candidates. |
Post-merge mutation testingKilled 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Surviving mutants
The run's summary has the full report. |
No related issue: first run of
/architecture:enforce-boundarieson this repository, approved by the owner in session.Summary
Records the rule "a plugin's code never loads a file from a sibling plugin" and enforces it with a repository check, proven on an injected violation.
Fix
docs/conventions/architecture/README.md(new): the architecture topic doc (architecture_dir: docs/architecture,landscape_dialect: mermaid) and the rule under## Boundary rules, ending in itsEnforced by:line.scripts/check-plugin-imports.shwithscripts/check-plugin-imports.test.sh: reads every tracked shell, Node (.tsxand.jsxincluded), Python and PowerShell file underplugins/<a>/for a relative path in a load position that resolves intoplugins/<b>/. Comment lines and path strings with no anchor are not crossings.scripts/plugin-imports-exceptions.txt: seven dated exceptions, each a test that holds two plugins to one contract or runs a sibling's real script, where a copy would stop checking the other side. The check also fails on a listed entry that no longer crosses.plugins/testing/skills/audit/scripts/cant-fail-scan.test.sh: writes its own C# files instead of reading the mutation-testing plugin's fixture.scripts/check-affected.shand one step in the existing check-plugins job ofpr-require-checks.yml; no new job, no hook. Nothing is written to agent instructions: the check enforces the rule.Known gaps, so a pass means no crossing of the shapes the check reads, not no crossing at all: a variable named
*PLUGIN_ROOTor*PLUGIN_DIRis resolved from the plugin's root and any other variable from the file's own directory, so a path after a differently named root variable is not seen; a path written from the repository root (<root variable>/plugins/<name>/...) is not read, because on today's tree every such line builds a fixture tree (5 lines in 2 files, none a real reach); and a path joined from an expression is not seen.Verification
source "$SCRIPT_DIR/../../guardrails/hooks/hook-utils.sh"added to one plugin script it exits 1 naming the rule and thepath:line; with only that line removed it passes again.scripts/check-plugin-imports.test.sh: 40 of 40.scripts/check-affected.test.shandscripts/check-script-contract.test.shpass with the new check registered.cant-fail-scan.test.sh: 1428 of 1428 before and after the fixture change; removing one[Fact]from the new files fails 3 checks.scripts/check-affected.sh --tests: 18 passed, 142 skipped; the selected test suites ran past the local time budget and are left to CI.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWmASLnS6k3MEmYoBnwDv3