Skip to content

Commit a08f212

Browse files
test: real-pair check imports the replay tools lazily — one test file serves both trees
The suppression test rides upstream slice cnighswonger#272, which carries the extension but not tools/; a static import made the whole file error there. The real-pair test already skips without the capture — the same skip now covers a tree without the tooling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZxGrF1LRBvmb7cFXmS2DH
1 parent 484aa19 commit a08f212

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

test/insertion-suppression.test.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import {
3535
pinnedBlockHashes,
3636
findSuppressibleDuplicate,
3737
} from "../proxy/extensions/insertion-normalization.mjs";
38-
import { findMitigationGaps, findSafetyViolations, safetyViolation, readCapture } from "../tools/replay.mjs";
3938

4039
const __dirname = dirname(fileURLToPath(import.meta.url));
4140
const REPO = join(__dirname, "..");
@@ -264,6 +263,17 @@ test(
264263
return;
265264
}
266265

266+
// The census/gate helpers ship in the tools slice; in a tree carrying
267+
// only the extension (upstream PR #272) this check rides #276 instead.
268+
let replayTools;
269+
try {
270+
replayTools = await import("../tools/replay.mjs");
271+
} catch {
272+
t.skip("tools/replay.mjs not in this tree — the real-pair check runs where the tools land");
273+
return;
274+
}
275+
const { findMitigationGaps, findSafetyViolations, safetyViolation, readCapture } = replayTools;
276+
267277
const scratch = await mkdtemp(join(tmpdir(), "insertion-suppression-"));
268278
const saved = {};
269279
const overrides = { CLAUDE_CONFIG_DIR: scratch, ...GATES };

0 commit comments

Comments
 (0)