From 6fad6dcfab2c832efc899148ffe4db36b5a90ec5 Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 25 Aug 2026 18:48:40 +0900 Subject: [PATCH] Pin carry-forward flag off in default-behavior test; ignore test scratch The "does not carry forward by default" test in paired-execution-context.test.ts read the real config, so enabling PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL in this deployment's .env flipped its result and it failed. Pin the flag to false in that suite (mirroring the flag-on carry-forward.test.ts which pins true) so the unit test is deterministic regardless of the ambient .env. Full suite is green again with the flag enabled: 1595 pass / 3 skip / 0 fail. Also gitignore the .ejclaw-*images-*/ and .ejclaw-attachment-*/ scratch dirs that outbound-attachments tests create in the repo root; they only leak when a test run is interrupted mid-flight and would otherwise clutter git status. Co-Authored-By: Claude Opus 4.7 --- .gitignore | 4 ++++ src/paired-execution-context.test.ts | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index aa95599..deda64c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,10 @@ data/ data-*/ logs/ .ejclaw-reviewer-runtime/ +# Scratch dirs created in CWD by outbound-attachments tests; leak into the repo +# root only when a test run is interrupted mid-flight. +.ejclaw-attachment-*/ +.ejclaw-*images-*/ # Groups - only track base structure and specific CLAUDE.md files groups-*/ diff --git a/src/paired-execution-context.test.ts b/src/paired-execution-context.test.ts index 43d0a2b..6e52f51 100644 --- a/src/paired-execution-context.test.ts +++ b/src/paired-execution-context.test.ts @@ -48,6 +48,19 @@ vi.mock('./logger.js', () => ({ }, })); +// This suite verifies the flag-OFF ("by default") carry-forward behavior. Pin +// the switch to false so the result is deterministic regardless of the +// deployment's .env override (the flag-ON path is covered separately in +// paired-execution-context-carry-forward.test.ts). +vi.mock('./config.js', async () => { + const actual = + await vi.importActual('./config.js'); + return { + ...actual, + PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL: false, + }; +}); + import * as db from './db.js'; import * as config from './config.js'; import {