Skip to content

Fix log parser empty array handling causing false success#5981

Merged
mnkiefer merged 6 commits into
mainfrom
copilot/fix-agent-log-summary-issue
Dec 9, 2025
Merged

Fix log parser empty array handling causing false success#5981
mnkiefer merged 6 commits into
mainfrom
copilot/fix-agent-log-summary-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 9, 2025

Log parsing silently succeeded with empty arrays instead of returning null, causing the error check if (!logEntries) to pass incorrectly (empty arrays are truthy in JavaScript).

Changes

  • log_parser_shared.cjs: Check array length before returning from parseLogEntries()

    if (!Array.isArray(logEntries) || logEntries.length === 0) {
      throw new Error("Not a JSON array or empty array");
    }
  • parse_copilot_log.cjs: Add empty array check to error condition

    if (!logEntries || logEntries.length === 0) {
      return { markdown: "## Agent Log Summary\n\nLog format not recognized...", logEntries: [] };
    }
  • parse_copilot_log.test.cjs: Add test case for empty JSON array []

  • .github/workflows/*.lock.yml: Recompiled 93 workflows with fixes

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/gh-aw/actions/runs/20075011165/jobs
    • Triggering command: /usr/bin/curl curl -s -H Authorization: token REDACTED (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login super-linter.git GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -uns�� ef/tags/v0.20.10 /tmp/go-build2180867831/b049/vet.cfg 1/x64/bin/npm GOSUMDB bnext/gh-aw/pkg/-1 /usr/bin/sh 1/x64/bin/npm (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login by.git /tmp/go-build2180867831/b010/vet.cfg 0867831/b364/styles.test GOSUMDB GOWORK de_modules/.bin/user 0867831/b364/sty--jq e=/t�� tags/93cb6efe18208431cddfb8368fd83d5badbf9bfd /tmp/go-build2180867831/b101/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login 61/update_issue.test-logs/run-12346 v0.0.0-test 07c4ca4694e7b3bc273c547a6e49a8b87a7/log.json version grep 64/pkg/tool/linu"mcp-server-playwright" --help /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linufeature-branch -uns�� -unreachable=false /tmp/go-build2180867831/b244/vet.cfg e/git _.a parsing to handl-namespace 64/pkg/tool/linumoby e/git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Analyze actions run https://github.com/githubnext/gh-aw/actions/runs/20075011165 and fix issue for Agent Log Summary: Log format not recognized as Copilot JSON array or JSONL.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Changeset

  • Type: patch
  • Description: Fix Copilot log parsing so empty JSON arrays are handled correctly. Prevents "Log format not recognized as Copilot JSON array or JSONL" in the Agent Log Summary and includes a regression test and recompiled workflows.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 3 commits December 9, 2025 19:14
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Fix parseLogEntries to return null for empty JSON arrays
- Fix parseCopilotLog to check for empty arrays
- Add test case for empty JSON array
- Recompile all affected workflows

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer added the smoke label Dec 9, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

https://github.com/githubnext/gh-aw/tree/copilot/fix-agent-log-summary-issue

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

Smoke Test Results - Run 20076258542

PRs: #5977 ([WIP] Fix issues in existing test cases), #5983 ([WIP] Fix issues in test cases)

  • ✅ GitHub MCP
  • ✅ File Writing
  • ✅ Bash Tool
  • ✅ Playwright MCP (title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")
  • ✅ Cache Memory

Status: PASS

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

Copilot Engine Smoke Test Results (Run 20076258445)

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP Testing
  • ✅ File Writing Testing
  • ✅ Bash Tool Testing
  • ✅ get_me Tool Verification (correctly unavailable with default toolsets)
  • ✅ Cache Memory Testing

Overall Status: PASS

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

Smoke Test Results (Run 20076258435)

Playwright MCP: Successfully navigated to GitHub and verified title contains "GitHub"
Cache Memory: Created and verified test file at /tmp/gh-aw/cache-memory/smoke-test-20076258435.txt
safeinputs-gh Tool: Failed with HTTP/HTTPS client error

Overall Status: FAIL

The safeinputs-gh tool encountered a network configuration issue (HTTP response to HTTPS client).

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

Recent merged PRs: Add continue-on-error to firewall logs upload step; [WIP] Fix issues in existing test cases
GitHub MCP: ✅
File write/read (/tmp/gh-aw/agent): ✅
Playwright title check: ✅
Cache memory write/read: ✅
safeinputs-gh (gh issues list): ❌ tool unavailable in env
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex fer issue #5981 🗺️

Copilot AI changed the title [WIP] Fix issue with agent log summary format recognition Fix log parser empty array handling causing false success Dec 9, 2025
Copilot AI requested a review from mnkiefer December 9, 2025 19:50
@mnkiefer mnkiefer marked this pull request as ready for review December 9, 2025 19:54
@mnkiefer mnkiefer merged commit dd2bd37 into main Dec 9, 2025
22 of 23 checks passed
@mnkiefer mnkiefer deleted the copilot/fix-agent-log-summary-issue branch December 9, 2025 19:54
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.

2 participants