Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/agents-verify-to-new-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- name: Check PR is merged
id: check-merged
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ github.token }}
script: |
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Checkout repository
if: steps.check-merged.outputs.merged == 'true'
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
repository: stranske/Workflows
token: ${{ steps.select-token.outputs.token }}
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Collect verification and original issue data
id: collect
if: steps.check-merged.outputs.merged == 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ steps.select-token.outputs.token }}
script: |
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
- name: Check chain depth limit
id: chain-check
if: steps.check-merged.outputs.merged == 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
CHAIN_DEPTH: ${{ steps.collect.outputs.chain_depth }}
MAX_CHAIN_DEPTH: '2'
Expand Down Expand Up @@ -389,7 +389,7 @@ jobs:
steps.check-merged.outputs.merged == 'true' &&
steps.chain-check.outputs.exceeded != 'true' &&
steps.extract-verdict.outputs.needs_human == 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
LINKED_ISSUE: ${{ steps.collect.outputs.original_issue_number }}
NEEDS_HUMAN_REASON: ${{ steps.extract-verdict.outputs.needs_human_reason }}
Expand Down Expand Up @@ -505,7 +505,7 @@ jobs:
steps.check-merged.outputs.merged == 'true' &&
steps.chain-check.outputs.exceeded != 'true' &&
steps.extract-verdict.outputs.needs_human != 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
FOLLOW_UP_DEPTH: ${{ steps.chain-check.outputs.next_depth }}
EXTRACTED_VERDICT: ${{ steps.extract-verdict.outputs.verdict }}
Expand Down Expand Up @@ -677,7 +677,7 @@ jobs:
steps.check-merged.outputs.merged == 'true' &&
steps.chain-check.outputs.exceeded != 'true' &&
steps.extract-verdict.outputs.needs_human != 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
ISSUE_TITLE: >-
${{ steps.generate.outputs.issue_title ||
Expand Down Expand Up @@ -779,7 +779,7 @@ jobs:
steps.chain-check.outputs.exceeded != 'true' &&
steps.extract-verdict.outputs.needs_human != 'true' &&
steps.create-issue.outputs.issue_number != ''
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
ISSUE_NUMBER: ${{ steps.create-issue.outputs.issue_number }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
Expand Down Expand Up @@ -816,7 +816,7 @@ jobs:
steps.check-merged.outputs.merged == 'true' &&
steps.chain-check.outputs.exceeded != 'true' &&
steps.extract-verdict.outputs.needs_human != 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
ISSUE_NUMBER: ${{ steps.create-issue.outputs.issue_number }}
ISSUE_URL: ${{ steps.create-issue.outputs.issue_url }}
Expand Down Expand Up @@ -870,7 +870,7 @@ jobs:
FOLLOWUP_ISSUE_NUMBER: ${{ steps.create-issue.outputs.issue_number }}
FOLLOWUP_ISSUE_URL: ${{ steps.create-issue.outputs.issue_url }}
DISPATCH_AUTOPILOT_OUTCOME: ${{ steps.dispatch-autopilot.outcome }}
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ steps.select-token.outputs.token }}
script: |
Expand Down Expand Up @@ -1006,7 +1006,7 @@ jobs:

- name: Upload terminal disposition artifact
if: always() && steps.check-merged.outputs.merged == 'true'
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: verifier-terminal-disposition-${{ github.run_id }}
path: |
Expand All @@ -1017,7 +1017,7 @@ jobs:

- name: Remove trigger label
if: steps.check-merged.outputs.merged == 'true'
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
continue-on-error: true
with:
github-token: ${{ steps.select-token.outputs.token }}
Expand Down
12 changes: 11 additions & 1 deletion scripts/aggregate_agent_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,17 @@ def _append_parse_error_detail(
details[index] = replace(existing, count=existing.count + detail.count)
return

details.append(replace(detail, line=None))
for index, existing in enumerate(details):
if (
existing.path == detail.path
and existing.artifact == detail.artifact
and existing.artifact_family == detail.artifact_family
and existing.reason == detail.reason
):
details[index] = replace(existing, line=None, count=existing.count + detail.count)
return

details[-1] = replace(detail, line=None, count=details[-1].count + detail.count)
Comment on lines +205 to +207

Copilot AI Apr 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the detail_limit is reached and no matching existing entry is found, the fallback details[-1] = replace(detail, line=None, count=details[-1].count + detail.count) overwrites the last stored error’s identity (path/artifact/reason) and attributes its count to the new detail. This will corrupt downstream aggregations (e.g., counts by reason/artifact_family) by merging unrelated errors. Consider keeping the last element as a stable overflow bucket (increment its count without changing its fields), or add/update a dedicated sentinel ParseErrorDetail like reason=detail-limit-exceeded rather than replacing an arbitrary last entry with the new detail.

Copilot uses AI. Check for mistakes.


def _parse_error_count(parse_error_details: list[ParseErrorDetail]) -> int:
Expand Down
Loading