feat(#505): post comment on issue when agent takes no-op exit path - #508
Conversation
When the code agent determines no changes are needed and post-code.sh takes a no-op exit path, the source issue previously received no feedback. Users had to dig into workflow logs to understand why no PR was created, leading to confusion and unnecessary /fs-code re-triggers. Add a post_noop_comment() helper that posts an informational comment on the source issue at each of the three no-op exit paths: 1. No feature branch — agent stayed on main/master or detached HEAD 2. No changed files — agent committed nothing 3. All agent artifacts — only .agentready/.fullsend-workspace/ files The comment includes the specific reason, a workflow run link, and agent context from the result file (pr_body) when available. The agent context is sanitized via sanitize_failure_detail to strip tokens and workflow commands. Comment posting is best-effort — a failure does not change the exit code. Closes #505
|
🤖 Finished Review · ✅ Success · Started 4:35 PM UTC · Completed 4:49 PM UTC |
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsMedium
Low
Labels: PR modifies the code agent post-script infrastructure (scripts/post-code.sh, scripts/post-code.src.sh, scripts/post-code-test.sh) |
|
/fs-fix - Rebase and fix all of the review issues, both inline and in the stick comment. Also resolve all conversations that you have fixed. |
|
🤖 Fix · ❌ Terminated · Started 4:55 PM UTC · Ended 5:01 PM UTC |
|
🤖 Retro · |
Pre-sanitize ISSUE_NUMBER via _sanitize_workflow_value before interpolating it in the gha_echo warning message, consistent with report_post_failure_to_issue. Addresses review feedback on #508
|
🤖 Finished Fix · ✅ Success · Started 4:55 PM UTC · Completed 5:01 PM UTC |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 5:08 PM UTC · Completed 5:25 PM UTC |
|
/fs-fix - Rebase and fix all of the review issues, both inline and in the stick comment. Also resolve all conversations that you have fixed. |
|
🤖 Finished Fix · ✅ Success · Started 5:28 PM UTC · Completed 5:35 PM UTC |
…ale context - Use safe_issue_number in the no-op comment body text for defense-in-depth consistency with gha_echo messages (addresses [injection] review finding) - Add comment documenting that RESULT_FILE may point to a prior iteration's output at no-op exit paths; context is sanitized and best-effort so this is acceptable (addresses [error-handling] review finding) Addresses review feedback on #508
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 5:53 PM UTC · Completed 6:12 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 6:21 PM UTC · Completed 6:33 PM UTC |
Retro: PR #508 — post comment on issue when agent takes no-op exit pathTimelineIssue #505 (opened May 8 by ascerra) requested that
Total time issue-to-merge: ~2h 37m. The extra review+fix cycle (steps 5–6) added ~1 hour. What went well
What could go betterThe primary rework driver was Review 1 missing two medium-severity findings that Review 2 subsequently caught on essentially the same code. The injection finding (raw Evidence for existing issues
Proposals filed
|
Summary
When post-code.sh takes a no-op exit path (agent determined no changes needed), the source issue now receives an informational comment explaining why no PR was created. Previously, the issue got zero feedback — users had to dig into workflow logs.
Adds a
post_noop_comment()helper called at each of the three no-op exits:.agentready//.fullsend-workspace/files were presentThe comment includes the specific reason, a workflow run link, and sanitized agent context from the result file when available. Posting is best-effort — failure does not change the exit code.
Testing
build_noop_commenthelper)detect_nooptests continue to pass (no behavioral change to detection logic)make check-bundle) passesscript-has-noop-commentcheck verifies the function is present in the bundled scriptCloses #505
Post-script verification
agent/505-noop-issue-comment)8b770c4c19ceed8548eb75281e40eb59709a1b34..HEAD)