test(renderer): make detected index perf gate deterministic

This commit is contained in:
Brennan Benson
2026-08-03 22:04:04 -07:00
parent f259e89eb8
commit bec904efba
@@ -129,7 +129,7 @@ describe('detected worktree index performance', () => {
expect(walkedReads).toBeGreaterThan(100_000)
})
it('keeps the lookup path an order of magnitude cheaper than the catalog walk', () => {
it('records lookup-path timing without making wall clock a CI gate', () => {
const walkPool = freshCatalogPool()
const walkMs = measureSweeps((sweep) => {
const catalog = walkPool[sweep]!
@@ -194,9 +194,6 @@ describe('detected worktree index performance', () => {
`${JSON.stringify(report, null, 2)}\n`
)
// Only the warm ratio is asserted: a republished catalog pays one rebuild that costs about
// what a single sweep's walk did, so the fresh leg is parity and is recorded, not gated.
// The measured warm margin is ~100x, so this bound cannot flake under CI load.
expect(walkWarmMs / warmMs).toBeGreaterThan(10)
// Why: shared-runner timing is noisy; the read-count test above is the deterministic CI gate.
})
})