fix(gsd): address adversarial review findings on workflow-logger migration
workflow-events.ts: stop logging raw event line content to audit log — log byte length only to avoid persisting potentially sensitive payload fragments to .gsd/audit-log.jsonl. parallel-orchestrator.ts: revert worker NDJSON parse failure to silent drop — non-JSON lines (progress text, tool output) are expected in worker stdout and logging each one creates I/O pressure and audit log bloat in the parallel execution hot path.
This commit is contained in:
parent
3d6d72c04d
commit
64fe364fdb
2 changed files with 3 additions and 4 deletions
|
|
@ -725,9 +725,8 @@ function processWorkerLine(basePath: string, milestoneId: string, line: string):
|
|||
let event: Record<string, unknown>;
|
||||
try {
|
||||
event = JSON.parse(line);
|
||||
} catch (e) {
|
||||
logWarning("parallel", `JSON.parse(line) from worker output failed: ${(e as Error).message}`);
|
||||
return;
|
||||
} catch {
|
||||
return; // Non-NDJSON lines (progress text, tool output) are expected — silent drop
|
||||
}
|
||||
|
||||
const type = String(event.type ?? "");
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export function readEvents(logPath: string): WorkflowEvent[] {
|
|||
try {
|
||||
events.push(JSON.parse(line) as WorkflowEvent);
|
||||
} catch {
|
||||
logWarning("event-log", `skipping corrupted event line: ${line.slice(0, 80)}`);
|
||||
logWarning("event-log", `skipping corrupted event line (${line.length} bytes)`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue