Skip to content

fix: add generate-firewall-summary.ts script for CI step summaries#121

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/fix-log-step-summary
Closed

fix: add generate-firewall-summary.ts script for CI step summaries#121
Copilot wants to merge 4 commits intomainfrom
copilot/fix-log-step-summary

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

The gh-aw workflow's inline parseFirewallLogLine function doesn't strip ports from the Host header field, causing domains to appear as api.github.com:443 instead of api.github.com in step summaries.

Changes

  • Added scripts/ci/generate-firewall-summary.ts: TypeScript script that generates GitHub Actions step summaries from Squid firewall logs
  • Reuses existing parseLogLine from src/logs/log-parser.ts: Leverages the extractDomain function which properly strips ports from domains
  • Proper error handling: Graceful handling of file read/write failures with fallback to stdout

Usage

The gh-aw workflow can replace its inline implementation with:

- name: Parse firewall logs for step summary
  run: npx tsx scripts/ci/generate-firewall-summary.ts ${{ env.FIREWALL_LOGS_DIR }}

Output

### 🔥 Firewall Activity

<details>
<summary>📊 5 requests | 3 allowed | 2 blocked | 4 unique domains</summary>

| Domain | Allowed | Denied |
|--------|---------|--------|
| api.github.com | 2 | 0 |
| registry.npmjs.org | 1 | 0 |
| malicious.example.com | 0 | 1 |

</details>
Original prompt

This section details on the original issue you should resolve

<issue_title>Log step summary broken</issue_title>
<issue_description>See https://github.com/githubnext/gh-aw/actions/runs/20011060883/job/57380782967#step:41:1</issue_description>

<agent_instructions>investigate and fix</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 19, 2025 09:06
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix broken log step summary fix: add generate-firewall-summary.ts script for CI step summaries Dec 19, 2025
Copilot AI requested a review from Mossaka December 19, 2025 09:16
@Mossaka Mossaka added the smoke label Dec 19, 2025
@github-actions
Copy link

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions
Copy link

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@Mossaka Mossaka marked this pull request as ready for review December 19, 2025 17:52
@github-actions
Copy link

Smoke Test Results

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP (reviewed last 2 PRs)
  • ✅ File writing (created test file)
  • ✅ Bash tool (verified file content)

Overall Status: PASS

📰 BREAKING: Report filed by Smoke Copilot fer issue #121 🗺️

@github-actions
Copy link

Smoke Test Results (Claude)

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP (list PRs)
  • ✅ File Writing
  • ✅ Bash Tool
  • ❌ Playwright MCP (connection failed)

Status: FAIL

💥 [THE END] — Illustrated by Smoke Claude fer issue #121 🗺️

@github-actions
Copy link

Test Coverage Report

Metric Coverage Covered/Total
Lines 66.1% 708/1071
Statements 66.27% 729/1100
Functions 70.73% 87/123
Branches 60.89% 232/381
Coverage Thresholds

The project has the following coverage thresholds configured:

  • Lines: 38%
  • Statements: 38%
  • Functions: 35%
  • Branches: 30%

Coverage report generated by `npm run test:coverage`

@Mossaka Mossaka closed this Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log step summary broken

2 participants