Conversation
|
/describe |
|
✅ PR description has been generated and updated! |
There was a problem hiding this comment.
Review Summary
Found 1 high-severity issue in the verbose logging implementation. The mktemp template format is incorrect, which could cause log file creation to fail silently or create files with unexpected names.
Critical Issue
The mktemp template uses an invalid format with X's before the file extension, which may cause failures or unpredictable behavior. Additionally, there's no validation that mktemp succeeded before using the file path.
e5d80a8 to
628b970
Compare
There was a problem hiding this comment.
Review Summary
Found several issues with the output filtering implementation:
Critical Issues:
- Empty code block extraction could silently delete all output
- Inconsistent regex anchoring could capture unintended content
- Overly broad tool block delimiter could skip legitimate output
Additional Concerns:
- No validation that filtering produces non-empty output
- Brittle awk patterns rely on specific cagent output format
The most serious issue is the lack of validation before overwriting OUTPUT_FILE with extracted code block content.
Signed-off-by: Derek Misler <derek.misler@docker.com>
628b970 to
1d7aa80
Compare
There was a problem hiding this comment.
Review Summary
All potential issues identified during the review were verified and determined to be either working as intended or based on incorrect assumptions about the code behavior. The changes correctly implement the debugging improvements described in the PR:
✅ Properly separates verbose logs from clean output
✅ Correctly validates file creation with appropriate error handling
✅ Implements sound logic for cagent-output extraction with fallback to awk filtering
✅ Uses appropriate regex patterns for filtering tool output blocks
The refactoring maintains backward compatibility while improving debuggability by always capturing full verbose logs to an artifact.
No issues found. This PR looks good! 🎉
|
/describe |
|
✅ PR description has been generated and updated! |
Summary
This PR improves the debugging experience for the
cagentGitHub Action by separating verbose agent output (including tool calls) from the clean output used by downstream steps. Instead of suppressing tool call output via aquietflag, all raw agent output is now captured to a dedicated verbose log file that is uploaded as a workflow artifact, while a clean version is produced viaawkfiltering for downstream consumption.Changes
action.yml– Removequietinput: Thequietinput (which passed--hide-tool-calls --hide-tool-resultstocagent) is removed entirely. Tool call output is no longer suppressed at the source.action.yml– Verbose log capture: Agent execution now redirects all stdout/stderr to a new temp file (/tmp/cagent-verbose-XXXXXX) instead of teeing to the console. Retry attempts append a timestamped separator to the verbose log rather than truncating it.action.yml–verbose-log-fileoutput: A newverbose-log-fileoutput exposes the path to the full verbose log for downstream steps or callers.action.yml–awkfiltering moved earlier: Theawkblock that strips thinking blocks, tool calls, and internal markers now runs immediately after agent execution to produce the cleanOUTPUT_FILE, rather than being a fallback in the sanitize step. Thecagent-outputcode block extraction remains as an override on top of this.action.yml– Artifact upload step: A newUpload verbose agent logstep (usingactions/upload-artifact@v4.6.2) always runs and uploads the verbose log ascagent-verbose-log-<run_id>-<run_attempt>with a 14-day retention.README.md: Removes thequietparameter from the example config and parameter table; addsverbose-log-fileto the outputs table.How to Test
cagent-verbose-log-*artifact should appear containing the full raw agent output including tool calls.output-filepath.quiet: falseline from existing workflow configs does not break anything, since the input no longer exists.Closes: https://github.com/docker/gordon/issues/181