From 314e96ac4306008f839b576069405a540bc0188b Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 29 Mar 2026 21:21:26 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20learnings-show=20E2E=20slug=20mismatch?= =?UTF-8?q?=20=E2=80=94=20seed=20at=20computed=20slug,=20not=20hardcoded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test seeded learnings at projects/test-project/ but gstack-slug computes the slug from basename(workDir) when no git remote exists. The agent's search looked at the wrong path and found nothing. Fix: compute slug the same way gstack-slug does (basename + sanitize) and seed the learnings there. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/skill-e2e-learnings.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/skill-e2e-learnings.test.ts b/test/skill-e2e-learnings.test.ts index 390eedf7..8b6dec94 100644 --- a/test/skill-e2e-learnings.test.ts +++ b/test/skill-e2e-learnings.test.ts @@ -44,8 +44,9 @@ describeIfSelected('Learnings E2E', ['learnings-show'], () => { fs.chmodSync(path.join(binDir, script), 0o755); } - // Seed learnings JSONL with 3 entries of different types - const slug = 'test-project'; + // Seed learnings JSONL — slug must match what gstack-slug computes. + // With no git remote, gstack-slug falls back to basename(workDir). + const slug = path.basename(workDir).replace(/[^a-zA-Z0-9._-]/g, ''); const projectDir = path.join(gstackHome, 'projects', slug); fs.mkdirSync(projectDir, { recursive: true });