diff --git a/e2e/lib/event-parser.ts b/e2e/lib/event-parser.ts index 1ebf5f7a..1a42a7b5 100644 --- a/e2e/lib/event-parser.ts +++ b/e2e/lib/event-parser.ts @@ -37,7 +37,7 @@ export function parseEvents(output: string): ParsedEvent[] { } buffer = line } else if (buffer) { - buffer += "\\n" + line + buffer += "\n" + line } else { tryParseEvent(line, events) } @@ -55,19 +55,7 @@ function tryParseEvent(text: string, events: ParsedEvent[]): void { if (data.type) { events.push({ ...data, raw: text }) } - } catch (e) { - if ( - text.includes('"startRun"') || - text.includes('"completeRun"') || - text.includes('"stopRun') - ) { - process.stderr.write( - `[PARSE_FAIL] Failed to parse event (len=${text.length}): ${(e as Error).message}\n`, - ) - process.stderr.write(`[PARSE_FAIL] first 200 chars: ${text.slice(0, 200)}\n`) - process.stderr.write(`[PARSE_FAIL] last 200 chars: ${text.slice(-200)}\n`) - } - } + } catch {} } export function filterEventsByType( diff --git a/e2e/perstack-cli/continue.test.ts b/e2e/perstack-cli/continue.test.ts index e34c936d..a304ffaa 100644 --- a/e2e/perstack-cli/continue.test.ts +++ b/e2e/perstack-cli/continue.test.ts @@ -41,13 +41,6 @@ describe.concurrent("Continue Job", () => { { timeout: LLM_TIMEOUT }, ) const continueResult = withEventParsing(continueCmdResult) - process.stderr.write( - `\n[DEBUG continue] exitCode=${continueCmdResult.exitCode} events=${JSON.stringify(continueResult.events.map((e) => e.type))}\n`, - ) - process.stderr.write(`[DEBUG continue] stdout:\n${continueCmdResult.stdout.slice(0, 3000)}\n`) - if (continueCmdResult.stderr) { - process.stderr.write(`[DEBUG continue] stderr:\n${continueCmdResult.stderr.slice(0, 1000)}\n`) - } expect(assertEventSequenceContains(continueResult.events, ["resumeFromStop"]).passed).toBe(true) expect( continueResult.events.some( diff --git a/e2e/perstack-cli/providers.test.ts b/e2e/perstack-cli/providers.test.ts index 2e392f83..bd4445b7 100644 --- a/e2e/perstack-cli/providers.test.ts +++ b/e2e/perstack-cli/providers.test.ts @@ -31,13 +31,6 @@ describe.concurrent("LLM Providers", () => { provider, }) const result = withEventParsing(cmdResult) - process.stderr.write( - `\n[DEBUG ${provider}] exitCode=${result.exitCode} events=${JSON.stringify(result.events.map((e) => e.type))}\n`, - ) - process.stderr.write(`[DEBUG ${provider}] stdout:\n${result.stdout.slice(0, 3000)}\n`) - if (result.stderr) { - process.stderr.write(`[DEBUG ${provider}] stderr:\n${result.stderr.slice(0, 1000)}\n`) - } expect(result.exitCode).toBe(0) expect(assertEventSequenceContains(result.events, ["startRun", "completeRun"]).passed).toBe( true,