From d10e2a459826bb89faf37c1c2179078f19307ffc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 29 Oct 2026 11:35:06 +0000 Subject: [PATCH 1/2] test(verify): pay the boot's first load at module scope in four slow files dashboard-window, unique-scope, parent-write-reach and harness.required-providers booted cold inside their first hook or case, so each file's clocked time carried the 2-3.5 s first-use load. They now call warmUpBoot at module scope, as one-composition already does. Claude-Session: https://claude.ai/code/session_01L6bhgTaB4SPm2t72GW1X9n Co-authored-by: Claude --- packages/verify/src/dashboard-window.test.ts | 6 ++++++ packages/verify/src/harness.required-providers.test.ts | 6 ++++++ packages/verify/src/parent-write-reach.test.ts | 6 ++++++ packages/verify/src/unique-scope.test.ts | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/packages/verify/src/dashboard-window.test.ts b/packages/verify/src/dashboard-window.test.ts index bf112f8057b..ec086de1b2c 100644 --- a/packages/verify/src/dashboard-window.test.ts +++ b/packages/verify/src/dashboard-window.test.ts @@ -32,6 +32,7 @@ import { defineStack } from '@objectstack/spec'; import { DATE_RANGE_PRESETS } from '@objectstack/spec/data'; import { bootStack, type VerifyStack } from './harness.js'; +import { warmUpBoot } from './boot-warm-up.testkit.js'; import { deriveDashboardWindowCases, runDashboardWindowProofs, @@ -39,6 +40,11 @@ import { type DashboardWindowReport, } from './dashboard-window.js'; +// The boot's first load, paid during collection rather than in the first +// case's clock (see `boot-warm-up.testkit.ts`). The first boot below uses the +// default options. +await warmUpBoot(); + // Booting the full in-process stack runs well past vitest's 5s default. const BOOT_TIMEOUT = 120_000; const RUN_TIMEOUT = 240_000; diff --git a/packages/verify/src/harness.required-providers.test.ts b/packages/verify/src/harness.required-providers.test.ts index 568d83e084a..8d6b9326ed0 100644 --- a/packages/verify/src/harness.required-providers.test.ts +++ b/packages/verify/src/harness.required-providers.test.ts @@ -29,6 +29,12 @@ import { afterEach, describe, expect, it } from 'vitest'; import { CAPABILITY_PROVIDERS } from '@objectstack/core'; import { composeStacks, defineStack } from '@objectstack/spec'; import { bootStack, type VerifyStack } from './harness.js'; +import { warmUpBoot } from './boot-warm-up.testkit.js'; + +// The boot's first load, paid during collection rather than in the first +// case's clock (see `boot-warm-up.testkit.ts`). The first boot below requires +// `approvals`, so its provider is loaded here too. +await warmUpBoot({}, { requires: ['approvals'] }); const APPROVALS = 'com.objectstack.service.approvals'; const REALTIME = 'com.objectstack.service.realtime'; diff --git a/packages/verify/src/parent-write-reach.test.ts b/packages/verify/src/parent-write-reach.test.ts index 1d59294fa43..aafde348de7 100644 --- a/packages/verify/src/parent-write-reach.test.ts +++ b/packages/verify/src/parent-write-reach.test.ts @@ -21,6 +21,7 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import { defineStack } from '@objectstack/spec'; import { bootStack, type VerifyStack } from './harness.js'; +import { warmUpBoot } from './boot-warm-up.testkit.js'; import { deriveParentWriteReachCases, runParentWriteReachProofs, @@ -29,6 +30,11 @@ import { type ParentWriteReachReport, } from './parent-write-reach.js'; +// The boot's first load, paid during collection rather than in the first +// case's clock (see `boot-warm-up.testkit.ts`). The boots below differ only in +// their app and its security source, which the warm-up does not share. +await warmUpBoot(); + // Booting the full in-process stack runs well past vitest's 5s default. const BOOT_TIMEOUT = 120_000; const RUN_TIMEOUT = 180_000; diff --git a/packages/verify/src/unique-scope.test.ts b/packages/verify/src/unique-scope.test.ts index 3715a8476e3..ce29fa359cd 100644 --- a/packages/verify/src/unique-scope.test.ts +++ b/packages/verify/src/unique-scope.test.ts @@ -31,6 +31,7 @@ import { join } from 'node:path'; import { defineStack } from '@objectstack/spec'; import { bootStack, type VerifyStack } from './harness.js'; +import { warmUpBoot } from './boot-warm-up.testkit.js'; import { deriveUniqueScopeCases, runUniqueScopeProofs, @@ -38,6 +39,11 @@ import { type UniqueScopeReport, } from './unique-scope.js'; +// The boot's first load, paid during collection rather than in the first +// case's clock (see `boot-warm-up.testkit.ts`). The first boot below uses the +// default options. +await warmUpBoot(); + // Booting the full in-process stack runs well past vitest's 5s default. const BOOT_TIMEOUT = 120_000; const RUN_TIMEOUT = 180_000; From ee4e8659cf80e6b2f83740c6bb2504ea18068bf7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 29 Oct 2026 11:47:56 +0000 Subject: [PATCH 2/2] test(verify): declare the test budget of the five files still over 10 s dashboard-window, parent-write-reach, unique-scope, held-session-vendor-admin-doors and harness.one-composition boot the real stack once per single-cause fixture and stay over 10 s after the warm-up. Each carries the ruled header: the slowest CI reading in refresh PR #25960's window x 1.25, rounded up to the next 10 s. Claude-Session: https://claude.ai/code/session_01L6bhgTaB4SPm2t72GW1X9n Co-authored-by: Claude --- packages/verify/src/dashboard-window.test.ts | 1 + packages/verify/src/harness.one-composition.test.ts | 1 + packages/verify/src/held-session-vendor-admin-doors.pin.test.ts | 1 + packages/verify/src/parent-write-reach.test.ts | 1 + packages/verify/src/unique-scope.test.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/packages/verify/src/dashboard-window.test.ts b/packages/verify/src/dashboard-window.test.ts index ec086de1b2c..ea10cea76c7 100644 --- a/packages/verify/src/dashboard-window.test.ts +++ b/packages/verify/src/dashboard-window.test.ts @@ -1,4 +1,5 @@ // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +// test-budget: 100 — spawns the real producer once per single-cause fixture: four in-process boots of the real stack (the fixture app, the drop and zero negative-control apps, the day-turn app), each running the family's proofs once on a frozen clock; slowest CI reading 73.29 s (run 40200279306, refresh PR #25960's window (hourly runs 40200279306 to 40272142430)) x 1.25, rounded up; read before this file paid its first boot at module scope // // The dashboard date-window family — what it reads from the metadata, what it // proves on a real stack, and the controls that keep its green honest: diff --git a/packages/verify/src/harness.one-composition.test.ts b/packages/verify/src/harness.one-composition.test.ts index 547c352083c..424d525ac2c 100644 --- a/packages/verify/src/harness.one-composition.test.ts +++ b/packages/verify/src/harness.one-composition.test.ts @@ -1,4 +1,5 @@ // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +// test-budget: 30 — spawns the real producer once per single-cause fixture: each case boots the real stack as its own subject (the instance rule, a re-boot, a refused boot), the first load paid at module scope; slowest CI reading 17.89 s (run 40200279306, refresh PR #25960's window (hourly runs 40200279306 to 40272142430)) x 1.25, rounded up /** * #22301 item 1, ruling A — ONE composition rule: for one configuration, diff --git a/packages/verify/src/held-session-vendor-admin-doors.pin.test.ts b/packages/verify/src/held-session-vendor-admin-doors.pin.test.ts index 60e8b57e712..5741dfa690a 100644 --- a/packages/verify/src/held-session-vendor-admin-doors.pin.test.ts +++ b/packages/verify/src/held-session-vendor-admin-doors.pin.test.ts @@ -1,4 +1,5 @@ // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +// test-budget: 50 — spawns the real producer once per single-cause fixture: one in-process boot of the real stack with SCIM and SSO on, then sign-ins per door under each held state armed in turn; slowest CI reading 32.65 s (run 40200279306, refresh PR #25960's window (hourly runs 40200279306 to 40272142430)) x 1.25, rounded up /** * ADR-0069 D3 at the platform-admin doors better-auth serves itself, on a real diff --git a/packages/verify/src/parent-write-reach.test.ts b/packages/verify/src/parent-write-reach.test.ts index aafde348de7..dbd50c76ff9 100644 --- a/packages/verify/src/parent-write-reach.test.ts +++ b/packages/verify/src/parent-write-reach.test.ts @@ -1,4 +1,5 @@ // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +// test-budget: 80 — spawns the real producer once per single-cause fixture: three in-process boots of the real stack (the fixture app and the negative and attribution controls under parentWriteReachSecurity, and one without it), each running the family's proofs once; slowest CI reading 63.34 s (run 40200279306, refresh PR #25960's window (hourly runs 40200279306 to 40272142430)) x 1.25, rounded up; read before this file paid its first boot at module scope // // The parent-derived write reach family — what it reads from the metadata, // what it proves on a real stack, and the controls that keep its green honest: diff --git a/packages/verify/src/unique-scope.test.ts b/packages/verify/src/unique-scope.test.ts index ce29fa359cd..97878f3e9de 100644 --- a/packages/verify/src/unique-scope.test.ts +++ b/packages/verify/src/unique-scope.test.ts @@ -1,4 +1,5 @@ // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +// test-budget: 80 — spawns the real producer once per single-cause fixture: eight in-process boots of the real stack over six fixtures (single-posture, walled, the within control and the indexes[] attribution control that each plant then re-open one database file, the across control, the attribution control), each running the family's proofs once; slowest CI reading 61.38 s (run 40200279306, refresh PR #25960's window (hourly runs 40200279306 to 40272142430)) x 1.25, rounded up; read before this file paid its first boot at module scope // // The unique-scope family — what it reads from the metadata, what it proves on // a real stack, and the controls that keep its green honest: