diff --git a/actions/setup/js/load_agent_output.cjs b/actions/setup/js/load_agent_output.cjs index 0863647df3..ab4d962157 100644 --- a/actions/setup/js/load_agent_output.cjs +++ b/actions/setup/js/load_agent_output.cjs @@ -56,7 +56,9 @@ function loadAgentOutput() { outputContent = fs.readFileSync(agentOutputFile, "utf8"); } catch (error) { const errorMessage = `Error reading agent output file: ${getErrorMessage(error)}`; - core.error(errorMessage); + // Use info instead of error for missing files - this is a normal scenario + // when the agent fails before producing any safe-outputs + core.info(errorMessage); return { success: false, error: errorMessage }; } diff --git a/actions/setup/js/load_agent_output.test.cjs b/actions/setup/js/load_agent_output.test.cjs index 0e68c1d4dc..479eff9011 100644 --- a/actions/setup/js/load_agent_output.test.cjs +++ b/actions/setup/js/load_agent_output.test.cjs @@ -59,14 +59,14 @@ describe("load_agent_output.cjs", () => { expect(mockCore.info).toHaveBeenCalledWith("No GH_AW_AGENT_OUTPUT environment variable found"); }); - it("should return success: false and log error when file cannot be read", () => { + it("should return success: false and log info when file cannot be read", () => { process.env.GH_AW_AGENT_OUTPUT = "/nonexistent/file.json"; const result = loadAgentOutputModule.loadAgentOutput(); expect(result.success).toBe(false); expect(result.error).toMatch(/Error reading agent output file/); - expect(mockCore.error).toHaveBeenCalledWith(expect.stringContaining("Error reading agent output file")); + expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Error reading agent output file")); }); it("should return success: false when file content is empty", () => {