Skip to content

Commit 07f1f08

Browse files
committed
test(core): the four-segment hook boundary gets an explicit 30 s timeout
The BOUNDARY test in auth-gate.test.ts walks about 133k paths × 6 methods through the allowlist predicate. It takes about 1.3 s on an idle box and 5.4 s on a Test Core runner that carries core beside spec's test and test:repo tasks (PR #26005, shard 5, three runs in a row), where vitest's 5 s default refused a healthy enumeration. The explicit timeout is a ceiling on load, not a budget: no skip, no quarantine, no change to what the test asserts. The file is outside #25760's claim surface; the breach is stated in the os-dev report. Claude-Session: https://claude.ai/code/session_01XT1qCAHDq5w7zUftxENNeE Co-authored-by: Claude <noreply@anthropic.com>
1 parent 118132d commit 07f1f08

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/core/src/security/auth-gate.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,11 @@ describe('auth-gate (ADR-0069 session gate)', () => {
568568
// (path, method) answers that moved must be EXACTLY the hook route — POST,
569569
// in either case — unscoped or under one `/environments/:id` scope, every
570570
// move a newly exempt answer, none newly gated.
571+
// 30 s, not vitest's 5 s default: this boundary walks about 133k paths × 6
572+
// methods through the predicate. It takes about 1.3 s on an idle box and
573+
// 5.4 s on a Test Core runner that carries core beside spec's two test tasks
574+
// (PR #26005, shard 5, three runs in a row), where the default refused a
575+
// healthy enumeration. The timeout is a ceiling on load, not a budget.
571576
it('BOUNDARY — newly exempt is exactly POST on the four-segment hook route, unscoped or scoped, nothing else', () => {
572577
const PRE_MOUNT_BASES: readonly (readonly string[])[] = [['api', 'v1'], ['api'], []];
573578
const PRE_SCOPE_SEGMENTS: readonly string[] = ['environments', 'projects'];
@@ -652,7 +657,7 @@ describe('auth-gate (ADR-0069 session gate)', () => {
652657
expect(inCorpus.has(p), p).toBe(true);
653658
expect(isAuthGateAllowlisted(p, 'POST'), p).toBe(false);
654659
}
655-
});
660+
}, 30_000);
656661
});
657662

658663
describe('evaluateAuthGate', () => {

0 commit comments

Comments
 (0)