From 5a8ba8e81e8ec2b473034329c70ba2ab4ba0ed34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 15 Sep 2026 16:18:54 +0200 Subject: [PATCH] test(scripts): keep the indirect-ownership example on a test that still reaches the kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `scripts/mutation/ownership.test.ts` fails on today's `main`, so `check:affected` stops at its `mutation-model` step for any change touching a lane file. The derivation it guards is intact — 147 tests own `scroll-edge-state`, including every test that reaches it through `src/daemon/scroll-runtime.ts`. What went stale is the example: the gesture unit test's import closure no longer reaches the scroll runtime at all, so asserting that it owns the kernel asserts something the graph no longer contains. `src/daemon/__tests__/scroll-runtime.test.ts` sits one import away from `scroll-edge-state.ts` and never mentions it, which is the omission the assertion exists to catch. --- scripts/mutation/ownership.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/mutation/ownership.test.ts b/scripts/mutation/ownership.test.ts index 75b88692fd..8b9fc4e32a 100644 --- a/scripts/mutation/ownership.test.ts +++ b/scripts/mutation/ownership.test.ts @@ -29,8 +29,9 @@ test('a kernel is owned by the mirrored test that imports it directly', () => { ); }); -// The omission that hand-listed ownership could not see: this test asserts over -// normalizeError without importing packages/kernel/src/errors.ts itself. +// The omission that hand-listed ownership could not see: neither test below names the kernel source +// it reaches. `daemon-error.test.ts` asserts over `normalizeError` without importing +// packages/kernel/src/errors.ts, and the scroll runtime test never mentions scroll-edge-state. test('a kernel is owned by tests that reach it indirectly', () => { const deriver = ownershipDeriver(repoRoot); assert.ok( @@ -38,9 +39,8 @@ test('a kernel is owned by tests that reach it indirectly', () => { 'daemon-error.test.ts exercises normalizeError but does not own kernel-errors', ); assert.ok( - deriver - .ownersOf('src/commands/interaction/runtime/gestures.test.ts') - .includes('scroll-edge-state'), + deriver.ownersOf('src/daemon/__tests__/scroll-runtime.test.ts').includes('scroll-edge-state'), + 'scroll-runtime.test.ts reaches scroll-edge-state through the daemon runtime, not by import', ); });