Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion actions/setup/js/load_agent_output.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand Down
4 changes: 2 additions & 2 deletions actions/setup/js/load_agent_output.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
Loading