chore(benchmarks-misc-fixes): cleaned benchmark task/pid validation

- Added `vim` as an edit variant in benchmark CLI/config and rating script coverage.
- Expanded benchmark execution so `vim` is treated as a mutation tool for retries, stats, and edit intent checks.
- Adjusted `TaskTool` output schema precedence so explicit params override agent frontmatter.
- Fixed `TaskTool` success counting by excluding aborted tasks from success totals.
- Improved validation guidance in `SubmitResultTool`/`TodoWriteTool` for clearer recovery when payloads are missing or invalid.
- Added background command PID regression coverage in `executeBash` to confirm a real, terminateable PID is returned.
This commit is contained in:
can1357
2026-04-13 12:27:10 +02:00
parent dd023eb4de
commit c62ab2d53e
7 changed files with 132 additions and 88 deletions
@@ -100,6 +100,25 @@ describe("executeBash", () => {
expect(Date.now() - start).toBeLessThan(3000);
});
it("returns a real PID for background external commands", async () => {
if (process.platform === "win32") {
return;
}
const result = await executeBash("sleep 10 & echo $!", {
cwd: tempDir,
timeout: 5000,
});
const pid = Number.parseInt(result.output.trim(), 10);
expect(Number.isInteger(pid)).toBe(true);
expect(pid).toBeGreaterThan(0);
expect(() => process.kill(pid, 0)).not.toThrow();
process.kill(pid, "SIGTERM");
await Bun.sleep(100);
expect(() => process.kill(pid, 0)).toThrow();
});
it("times out commands", async () => {
if (process.platform === "win32") {
return;