feat(review): let repos opt out of the built-in hard-guardrail floor - #5708
Merged
Conversation
hardGuardrailGlobs could previously only ADD to DEFAULT_HARD_GUARDRAIL_GLOBS (#3943), so no repo could narrow guardrail-triggered manual-review holds below the built-in invariant set. Add an explicit, opt-in hardGuardrailGlobsOverridesInvariants setting: when true, hardGuardrailGlobs fully replaces the built-in floor instead of adding to it (including an explicit [] to disable path guardrails entirely); default false preserves today's safe-by-default, add-only behavior for everyone who doesn't set it.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5708 +/- ##
==========================================
- Coverage 95.05% 95.05% -0.01%
==========================================
Files 581 581
Lines 46157 46159 +2
Branches 14808 14810 +2
==========================================
+ Hits 43874 43875 +1
Misses 1523 1523
- Partials 760 761 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Jul 14, 2026
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.
Summary
hardGuardrailGlobscould previously only ADD toDEFAULT_HARD_GUARDRAIL_GLOBS(fix(review): preserve invariant guardrails #3943), so no repo could narrow guardrail-triggered manual-review holds below the built-in invariant floor even when the resulting daily manual-review volume became a real bottleneck.hardGuardrailGlobsOverridesInvariantssetting: whentrue,hardGuardrailGlobsfully REPLACES the built-in floor instead of adding to it (including an explicit[]to disable path guardrails entirely). Defaultfalsepreserves today's safe-by-default, add-only behavior for every repo/self-hoster that doesn't set it.@loopover/enginepackage twin (packages/gittensory-engine/src/review/guardrail-config.ts) and its type/parsing surfaces so thegittensory_predict_gateMCP tool stays in parity with the live engine.RepositorySettings.hardGuardrailGlobs's own JSDoc,config/examples/README.md, andconfig/examples/gittensory.full.ymldisagreed with each other and with the actual (add-only) code behavior. Reconciled all three around the restored, documented contract.Scope
wantedPaths(src/,test/,packages/,.github/workflows/)site/,CNAME,**/lovable/**CHANGELOG.mdeditValidation
npm run typecheck(pre-existing, unrelated failures confirmed viagit stashdiff — none touch changed files)npx vitest run test/unit/guardrail-config.test.ts test/unit/focus-manifest.test.ts test/unit/predicted-gate.test.ts test/unit/agent-actions.test.ts test/unit/queue-2.test.ts test/unit/queue-3.test.ts test/unit/queue-lifecycle-guards.test.ts test/contract/live-gate-parity.test.ts test/contract/engine-parity.test.ts— all greennpm run test:coverage(unsharded, full suite) — exit 0, no failures;src/review/guardrail-config.tsisolated coverage: 100% statements/branches/functions/linesnpx tsx scripts/check-engine-parity.ts— no drift between the host/engine guardrail-config.ts twins (only pre-existing, unrelatednode_modulesversion-skew warning)npx tsx scripts/check-docs-drift.mjs— passes, allRepositorySettings/FocusManifestfields documentednpm run ui:openapi+npm run ui:openapi:settings-parity— regenerated and verifiednpm audit --audit-level=moderate— 0 vulnerabilitiesgit diff --check— cleanSafety
true/false/absent branches, plus the parse+resolve pipeline)