fix(security): scope the gate to the package being changed - #85
Merged
Conversation
Per-package PRs (#84) were all held NO-GO for the SAME unrelated reason: the worker scoped the FIX to one package, but the gate still built ALL packages and rolled up β so docker-extension/ui's pre-existing build break (vite/plugin-react peer conflict) held DriveIQ's backend and frontend PRs too, even though neither touched it. The per-package split was defeated. run-gate.mjs gains `--scope <dir>`: gate ONLY the package at that manifest dir. The reusable gate workflow takes a `scope` input and the worker passes `package_dir`, so each per-package PR is verified against its own package alone. Verified: on a synthetic monorepo where backend breaks, `--scope frontend` returns GO (would auto-merge) while `--scope backend` returns NO-GO β no cross-contamination. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ry-ops
added a commit
that referenced
this pull request
Jun 25, 2026
β¦86) scopem/ was a local synthetic monorepo used to validate --scope; it was created in the project dir by mistake and committed. Not part of the codebase. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug (found reviewing DriveIQ's open PRs)
Per-package remediation (#84) scoped the fix to one package but the gate still built all packages and rolled up to one verdict. So DriveIQ's
docker-extension/uiβ which has a pre-existing build break (vite@7.3.6vs@vitejs/plugin-reactpeer conflict) unrelated to any fix β held the backend and frontend PRs at NO-GO too. All three per-package PRs failed for the same unrelated reason; nothing could auto-merge.Fix
run-gate.mjsgains--scope <dir>: filter discovered packages to the one at that manifest dir, so the gate verifies only the package the PR changed.verify-functional-form.ymltakes ascopeinput β passes--scope.security-fix-worker.ymlpassespackage_dirasscope.Now backend's PR builds only backend (clean β GO β auto-merge), frontend builds only frontend (clean β GO β auto-merge), and only
docker-extension/uiis held β its genuine break, with the reason on the PR.Verified
Synthetic monorepo (backend breaks):
--scope frontendβ GO,--scope backendβ NO-GO. No cross-contamination. Build clean, 42 tests pass.π€ Generated with Claude Code