fix(coding-agent): aligned output counters after sink replacement
- Adjusted OutputSink to disable head retention after replace(), resetting counters so later pushes append to the tail and do not trigger stale middle-elision in dump(). - Refined artifact link emission to insert a newline separator only when the minimized output lacked one. - Added a regression test for replace-plus-push ordering that verifies no elision marker and aligned byte counts.
This commit is contained in:
@@ -252,7 +252,8 @@ export async function executeBash(command: string, options?: BashExecutorOptions
|
||||
outputBytes: minimized.outputBytes,
|
||||
});
|
||||
if (artifactId) {
|
||||
sink.push(`\n[raw output: artifact://${artifactId}]\n`);
|
||||
const sep = minimized.text.endsWith("\n") ? "" : "\n";
|
||||
sink.push(`${sep}[raw output: artifact://${artifactId}]\n`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user