From 3cbb5c3bbdb9eba717b1b3c987f04932dd90d45c Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Fri, 12 Jun 2026 06:54:17 -0700 Subject: [PATCH] =?UTF-8?q?test:=20fix=20operational-learning=20E2E=20fixt?= =?UTF-8?q?ure=20=E2=80=94=20copy=20lib/jsonl-store.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pre-existing breakage, proven on main: gstack-learnings-log has imported lib/jsonl-store.ts (shared injection patterns) since v1.57.5.0 / #1910, but the fixture copies only the bin scripts — the bin exits 1 before writing anything, on main silently (stderr swallowed) and on this branch loudly (the #1950 error-surfacing made the four-day-old failure visible). A real install always ships bin/ and lib/ together; the fixture now does too. Verified: the fixture-shaped invocation writes the learning (exit 0) with lib present, exits 1 on both main and this branch without it. Co-Authored-By: Claude Fable 5 --- test/skill-e2e-bws.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/skill-e2e-bws.test.ts b/test/skill-e2e-bws.test.ts index 956174117..b3dac4209 100644 --- a/test/skill-e2e-bws.test.ts +++ b/test/skill-e2e-bws.test.ts @@ -199,6 +199,13 @@ Report the exact output — either "READY: " or "NEEDS_SETUP".`, fs.copyFileSync(path.join(ROOT, 'bin', script), path.join(binDir, script)); fs.chmodSync(path.join(binDir, script), 0o755); } + // gstack-learnings-log imports $SCRIPT_DIR/../lib/jsonl-store.ts (shared + // injection patterns, since v1.57.5.0) — a real install always ships bin/ + // and lib/ together, so the fixture must too. Without it the bin exits 1 + // before writing anything and the test fails on every attempt. + const libDir = path.join(opDir, 'lib'); + fs.mkdirSync(libDir, { recursive: true }); + fs.copyFileSync(path.join(ROOT, 'lib', 'jsonl-store.ts'), path.join(libDir, 'jsonl-store.ts')); // gstack-learnings-log will create the project dir automatically via gstack-slug