From 641ea32a741bccf65d8749f412f181900e3fba8d Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 21 Mar 2026 08:13:10 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20relax=20contributor-mode=20assertions=20?= =?UTF-8?q?=E2=80=94=20test=20structure=20not=20exact=20phrasing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/skill-e2e.test.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/skill-e2e.test.ts b/test/skill-e2e.test.ts index 77296290..5cd62572 100644 --- a/test/skill-e2e.test.ts +++ b/test/skill-e2e.test.ts @@ -372,16 +372,16 @@ Per the contributor mode instructions, file a field report to ${logsDir}/browse- const logFiles = fs.readdirSync(logsDir).filter(f => f.endsWith('.md')); expect(logFiles.length).toBeGreaterThan(0); - // Verify new reflection-based format + // Verify report has key structural sections (agent may phrase differently) const logContent = fs.readFileSync(path.join(logsDir, logFiles[0]), 'utf-8'); - expect(logContent).toContain('Hey gstack team'); - expect(logContent).toContain('What I was trying to do'); - expect(logContent).toContain('What happened instead'); - expect(logContent).toMatch(/rating/i); - // Verify report has repro steps (agent may use "Steps to reproduce", "Repro Steps", etc.) - expect(logContent).toMatch(/repro|steps to reproduce|how to reproduce/i); - // Verify report has date/version footer (agent may format differently) - expect(logContent).toMatch(/date.*2026|2026.*date/i); + // Must have a title (# heading) + expect(logContent).toMatch(/^#\s/m); + // Must mention the failed command or browse + expect(logContent).toMatch(/browse|nonexistent|not found|no such file/i); + // Must have some kind of rating + expect(logContent).toMatch(/rating|\/10/i); + // Must have steps or reproduction info + expect(logContent).toMatch(/step|repro|reproduce/i); // Clean up try { fs.rmSync(contribDir, { recursive: true, force: true }); } catch {}