From 82ca89124b8d42d604ef15ee4fe5596926bf7a17 Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Fri, 18 Sep 2026 00:34:42 -0400 Subject: [PATCH] fix(lint): exempt the descendant-sweep test shim from the module-mocking gate (#21362) #20642 and #20645 added src/main/daemon/mock-descendant-sweep.ts and src/relay/mock-descendant-sweep.ts: test-only side-effect modules whose whole body is one vi.mock, imported by 60 suites so mock PTY PIDs never reach the host process table. Their CI ran before the anti-slop gate landed, so main now fails `oxlint --config config/oxlint-anti-slop.json` on every PR's merge ref. File-scoped exemption, like the others in this config, because the root lint scan does not load the plugin and an inline directive would read back as unused. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb --- config/oxlint-anti-slop.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/oxlint-anti-slop.json b/config/oxlint-anti-slop.json index bba8588d949..7d379a9df4e 100644 --- a/config/oxlint-anti-slop.json +++ b/config/oxlint-anti-slop.json @@ -56,6 +56,15 @@ "anti-slop/no-module-mocking": "off" } }, + // mock-descendant-sweep.ts (daemon and relay) is a test-only side-effect shim: its whole body + // is one vi.mock that keeps mock PTY PIDs away from the host process table, and it exists so + // 60 suites do not each inline the same hoisted factory. It is never imported by product code. + { + "files": ["**/mock-descendant-sweep.ts"], + "rules": { + "anti-slop/no-module-mocking": "off" + } + }, // The exemptions below are file-scoped rather than inline `oxlint-disable` comments // because the root lint scan does not load this plugin, so an inline directive naming // an anti-slop rule always reads back as an unused directive there.