Skip to content

fix(engine): protect the real post-#6203 autonomy/guardrail-config paths, not just their src/ shims - #8128

Merged
JSONbored merged 1 commit into
mainfrom
fix/engine-guardrail-globs-post-migration-paths
Jul 23, 2026
Merged

fix(engine): protect the real post-#6203 autonomy/guardrail-config paths, not just their src/ shims#8128
JSONbored merged 1 commit into
mainfrom
fix/engine-guardrail-globs-post-migration-paths

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • ENGINE_DECISION_GUARDRAIL_GLOBS (packages/loopover-engine/src/review/guardrail-config.ts) exists so a PR touching a safety-decision file is forced to manual review — never auto-merged or auto-closed (ported from reviewbot core to prevent an incident class where an auto-merged PR quietly weakened the gate itself).
  • It listed src/settings/autonomy.ts and src/review/guardrail-config.ts — both now confirmed 5-line re-export shims (export * from "../../packages/loopover-engine/src/...") after Finish the settings/ slice extraction #4879/chore(review): converge 9 hand-duplicated src/review/ files onto their @loopover/engine shims #6203 moved the real logic into @loopover/engine. The real, substantive files never appeared in the guardrail list at all.
  • Concretely: a PR editing the autonomy deny-by-default dial, or editing ENGINE_DECISION_GUARDRAIL_GLOBS/DEFAULT_HARD_GUARDRAIL_GLOBS itself to quietly remove entries, could touch only the real engine-package file and never trip the guardrail hold it should — verified this was a real gap via a full-repo grep confirming no other glob list covers packages/loopover-engine/src/**.
  • Adds the two real packages/loopover-engine/src/... paths alongside the existing shim entries (kept, since they're still real if thin files).

Closes #8012.

Test plan

  • New tests in test/unit/guardrail-config.test.ts: both real paths are present in ENGINE_DECISION_GUARDRAIL_GLOBS, and a PR touching only the real path (never the shim) trips isGuardrailHit against DEFAULT_HARD_GUARDRAIL_GLOBS.
  • Verified the tests actually catch the bug: reverted the source fix locally, confirmed 3 new assertions fail (isGuardrailHit returns false for the real paths pre-fix), then restored the fix and confirmed green.
  • npm run build --workspace @loopover/engine
  • npx tsc --noEmit
  • Full affected-suite run (guardrail-config, change-guardrail, agent-guardrail-paths, predicted-gate-engine-coverage, queue-3, processors-public-comment-merge-facts) — 225/225 passing
  • npm run test --workspace @loopover/engine (648/648 passing)
  • npm run engine-parity:drift-check — clean, not one of the 5 hand-duplicated twin-pair files

…ths, not just their src/ shims

src/settings/autonomy.ts and src/review/guardrail-config.ts are now
5-line re-export shims after #4879/#6203 moved the real logic into
@loopover/engine. ENGINE_DECISION_GUARDRAIL_GLOBS still only listed
the shim paths, so a PR editing the real autonomy deny-by-default
dial, or silently narrowing this guardrail list itself, would touch
only the packages/loopover-engine files and never trip the manual-
review hold it should.

Adds the real packages/loopover-engine paths alongside the existing
shim entries.

Closes #8012.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
loopover-ui 7080a7a Commit Preview URL

Branch Preview URL
Jul 22 2026, 11:54 PM

@JSONbored JSONbored self-assigned this Jul 22, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored merged commit d821cbd into main Jul 23, 2026
11 checks passed
@JSONbored
JSONbored deleted the fix/engine-guardrail-globs-post-migration-paths branch July 23, 2026 00:04
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.02%. Comparing base (c02a277) to head (7080a7a).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8128      +/-   ##
==========================================
- Coverage   92.02%   92.02%   -0.01%     
==========================================
  Files         760      760              
  Lines       77394    77394              
  Branches    23392    23392              
==========================================
- Hits        71225    71221       -4     
  Misses       5061     5061              
- Partials     1108     1112       +4     
Flag Coverage Δ
shard-1 57.09% <ø> (-0.02%) ⬇️
shard-2 54.34% <ø> (ø)
shard-3 50.28% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ges/loopover-engine/src/review/guardrail-config.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant