From e1341941d50708629d7ab7616e6652e809734d7b Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 22 Apr 2026 12:17:59 -0700 Subject: [PATCH] test(plugins): guard legacy bundled hook regressions --- src/plugins/contracts/boundary-invariants.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/contracts/boundary-invariants.test.ts b/src/plugins/contracts/boundary-invariants.test.ts index 9773a1c63a1..ede41db06ee 100644 --- a/src/plugins/contracts/boundary-invariants.test.ts +++ b/src/plugins/contracts/boundary-invariants.test.ts @@ -138,4 +138,10 @@ describe("plugin contract boundary invariants", () => { }); expect(offenders).toEqual([]); }); + + it("keeps bundled plugin production code off legacy before_agent_start hooks", () => { + const files = listTsFiles("extensions", { excludeTests: true }); + const offenders = files.filter((file) => readRepoSource(file).includes("before_agent_start")); + expect(offenders).toEqual([]); + }); });