Reverse engineer anything with agents, from app behavior down to native binaries.
TypeScript agent-skillsai-agentsbinary-analysisclaude-codeclicodexcordisdecompilerdeveloper-toolsdshdsh-pluginghidrahopperllmmcpmodel-context-protocolreareverse-engineeringstatic-analysistouhou
fix(process): index late scenario events in validation issues (#6160)
Abel Yagubyancbbd317fb596
diff --git a/src/domain/process/processScenario.test.ts b/src/domain/process/processScenario.test.tsindex 529fcc2d9..450d87367 100644--- a/src/domain/process/processScenario.test.ts+++ b/src/domain/process/processScenario.test.ts@@ -210,3 +210,30 @@ it("applies the selected scrollback budget to every scheduled resize", () => {}).success,).toBe(true);});++it("identifies each event scheduled after the scenario timeout", () => {+ const parsed = processScenarioSchema.safeParse({+ executable: "/bin/true",+ timeout_ms: 1_000,+ events: [+ { type: "input", at_ms: 1_000, data: "a" },+ { type: "input", at_ms: 1_500, data: "b" },+ { type: "signal", at_ms: 2_000, signal: "SIGINT" },+ ],+ });++ expect(parsed.success).toBe(false);+ if (parsed.success) throw new Error("expected late event rejection");+ expect(parsed.error.issues).toEqual([+ expect.objectContaining({+ code: "custom",+ path: ["events", 1],+ message: "event at 1500 ms occurs after the 1000 ms scenario timeout",+ }),+ expect.objectContaining({+ code: "custom",+ path: ["events", 2],+ message: "event at 2000 ms occurs after the 1000 ms scenario timeout",+ }),+ ]);+});diff --git a/src/domain/process/processScenario.ts b/src/domain/process/processScenario.tsindex bfaab2672..ba1376524 100644--- a/src/domain/process/processScenario.ts+++ b/src/domain/process/processScenario.ts@@ -298,8 +298,8 @@ export const processScenarioSchema = zif (event.at_ms > scenario.timeout_ms) {context.addIssue({code: "custom",- message: "event occurs after the scenario timeout",- path: ["events"],+ message: `event at ${String(event.at_ms)} ms occurs after the ${String(scenario.timeout_ms)} ms scenario timeout`,+ path: ["events", index],});}}