Skip to content

chore(root): write iyarc-prune agent report to job summary - #9451

Merged
zahin-mohammad merged 1 commit into
masterfrom
iyarc-prune-job-summary
Aug 7, 2026
Merged

chore(root): write iyarc-prune agent report to job summary#9451
zahin-mohammad merged 1 commit into
masterfrom
iyarc-prune-job-summary

Conversation

@rashadjnizar

Copy link
Copy Markdown
Contributor

Summary

The agent prompt instructs it to report results — including the "Still blocked" breakdown — in the job summary, but the workflow never wrote to $GITHUB_STEP_SUMMARY. The report was only visible by expanding the final step's logs, and disappears with log retention. This adds a Write agent report to job summary step that renders the agent's report as markdown, so tables (removed exclusions, "Still blocked") display properly, with run metadata in a collapsed <details>.

Ticket: HSM-429

@zahin-mohammad

Copy link
Copy Markdown
Contributor

@claude

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @zahin-mohammad's task —— View job


Code Review Progress

  • Analyze PR context and changes
  • Review workflow file modifications
  • Check job summary implementation
  • Provide comprehensive feedback

Code Review

This PR adds a valuable improvement to the iyarc-prune workflow by implementing GitHub job summary output. The changes look solid overall with good attention to error handling and security practices.

Positive Aspects

  1. Addresses Real Need: Solves the issue of agent reports being buried in logs that disappear with retention
  2. Robust Error Handling: Uses set -uo pipefail instead of set -e to ensure reporting failures don't break the job
  3. Security Conscious:
    • Uses allowlist approach for metadata fields rather than del(.result)
    • Handles potential upstream schema changes gracefully
  4. Good UX: Collapsible metadata section keeps the summary clean while providing debugging info
  5. Proper Conditional Logic: Handles missing execution files and empty reports gracefully

🔍 Technical Implementation Review

JSON Processing (.github/workflows/iyarc-prune.yml:104-116):

  • The jq pipeline correctly normalizes arrays and extracts text content
  • Metadata extraction uses safe navigation with // empty
  • Good use of with_entries(select(.value != null)) to clean up null values

Output Generation (.github/workflows/iyarc-prune.yml:118-138):

  • Clear markdown structure with proper heading hierarchy
  • Fallback messages provide helpful guidance when content is missing
  • Metadata is appropriately hidden in collapsible section

Error Resilience (.github/workflows/iyarc-prune.yml:100-101):

  • Comment explicitly explains why set -e is avoided
  • 2>/dev/null redirects prevent jq errors from cluttering output

📝 Minor Suggestions

  1. Line 119: Consider making the heading dynamic to reflect actual workflow name:

    echo "## ${{ github.workflow }} report"
  2. Line 112-116: The jq command is quite complex. Consider adding a comment explaining the allowlist approach:

    # Extract only audited metadata fields (allowlist approach for security)
    META="$(printf '%s' "$EVENTS" | jq -S 'map(select(.type=="result"))[-1] // empty

Security & Best Practices

  • ✅ No secrets exposed in job summary
  • ✅ Proper error handling prevents workflow failures
  • ✅ Uses if: always() to ensure reporting happens even on failure
  • ✅ Allowlist approach for metadata extraction is security-conscious

🎯 Overall Assessment

This is a well-implemented feature that significantly improves the visibility and auditability of the iyarc-prune agent reports. The code demonstrates good understanding of GitHub Actions, bash scripting best practices, and security considerations.

Recommendation: ✅ Approve - Ready to merge as-is. The minor suggestions above are optional enhancements, not blockers.


Job run | Branch: iyarc-prune-job-summary

@zahin-mohammad
zahin-mohammad merged commit 8e1f0fc into master Aug 7, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants