fix(engine): guard the guardrail engine and gate-advisory/predicted-gate files themselves - #8713
Conversation
…ate files themselves ENGINE_DECISION_GUARDRAIL_GLOBS listed the host/engine shim pairs for autonomy.ts and guardrail-config.ts, but never the packages/loopover-engine files that actually decide a PR's disposition: change-guardrail.ts (the glob matcher powering isGuardrailHit/guardrailPathMatches), gate-advisory.ts (the gate-decision core and check-run sanitizer), and predicted-gate.ts (the orchestrator wiring both). A PR weakening the matcher, flipping a block/advisory disposition, or rewiring the orchestrator would not itself trip the hard guardrail — a self-referential blind spot in the exact mechanism meant to catch that class of change. Add all three engine-side paths and cover each with a test asserting isGuardrailHit trips against resolveHardGuardrailGlobs(null). Closes JSONbored#8698
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8713 +/- ##
==========================================
- Coverage 93.79% 93.78% -0.01%
==========================================
Files 797 797
Lines 79480 79480
Branches 24078 24078
==========================================
- Hits 74545 74541 -4
Misses 3563 3563
- Partials 1372 1376 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 00:38:35 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
fix(engine): guard the guardrail engine and gate-advisory/predicted-gate files themselves
ENGINE_DECISION_GUARDRAIL_GLOBS listed the host/engine shim pairs for
autonomy.ts and guardrail-config.ts, but never the packages/loopover-engine
files that actually decide a PR's disposition: change-guardrail.ts (the glob
matcher powering isGuardrailHit/guardrailPathMatches), gate-advisory.ts (the
gate-decision core and check-run sanitizer), and predicted-gate.ts (the
orchestrator wiring both). A PR weakening the matcher, flipping a
block/advisory disposition, or rewiring the orchestrator would not itself trip
the hard guardrail — a self-referential blind spot in the exact mechanism
meant to catch that class of change.
Add all three engine-side paths and cover each with a test asserting
isGuardrailHit trips against resolveHardGuardrailGlobs(null).
Closes #8698