Skip to content

[codex] Fix sync review source regressions - #1909

Merged
stranske merged 1 commit into
mainfrom
codex/source-sync-review-fixes-20260426
Apr 26, 2026
Merged

[codex] Fix sync review source regressions#1909
stranske merged 1 commit into
mainfrom
codex/source-sync-review-fixes-20260426

Conversation

@stranske

@stranske stranske commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Source: Issue #1836

Related to campaign issue #1836

Automated Status Summary

Scope

Sync/Dependabot Campaign Queue

Remote GitHub Actions owns discovery for sync-generated and Dependabot PR rounds. Local Codex should only claim items from this issue when needs-local-codex work is queued.

Summary

Context for Agent

Related Issues/PRs

Tasks

  • Updated: 2026-04-26T17:56:29.528Z
  • Repos checked: 11/11
  • Open sync PRs: 538
  • Open Dependabot PRs: 0
  • Active review threads queued: 1140
  • Items needing local Codex: 4
  • Actionable local Codex items: 4
  • Claimable local Codex items: 4
  • Source-fixed candidates: 0
  • Superseded sync candidates: 116
  • Finished local results without published source changes: 0
  • Claimed local Codex items: 0
  • Next claim lease expires: -

Acceptance criteria

  • Kind: sync-review-comments
  • Source repo: stranske/Workflows
  • Preferred local workdir: Workflows
  • Head: sync/workflows-23b44c982516 (e40a0a5e8b72)
  • Source sync state: current (PR 23b44c982516 / current 23b44c982516)
  • Attempts: 0

Head SHA: f942484
Latest Runs: ✅ success — Gate
Required: gate: ✅ success

Workflow / Job Result Logs
Gate ✅ success View run
Health 40 Sweep ✅ success View run
Health 44 Gate Branch Protection ✅ success View run
Health 45 Agents Guard ✅ success View run
Health 50 Security Scan ✅ success View run
Health 73 Template Completeness ✅ success View run
Health 74 Template Drift ✅ success View run
Maint 52 Validate Workflows ✅ success View run
PR 11 - Minimal invariant CI ✅ success View run
Selftest CI ✅ success View run
Validate Sync Manifest ✅ success View run

@stranske-keepalive

stranske-keepalive Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 6ce80c3
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 93.12%
Baseline 85.00%
Delta +8.12%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
src/cli_parser.py 81.8% 4
src/percentile_calculator.py 95.0% 1
src/aggregator.py 95.0% 2
src/__init__.py 100.0% 0
src/ndjson_parser.py 100.0% 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

Sync/Dependabot Campaign Queue

Remote GitHub Actions owns discovery for sync-generated and Dependabot PR rounds. Local Codex should only claim items from this issue when needs-local-codex work is queued.

Summary

Context for Agent

Related Issues/PRs

Tasks

  • Updated: 2026-04-26T17:56:29.528Z
  • Repos checked: 11/11
  • Open sync PRs: 538
  • Open Dependabot PRs: 0
  • Active review threads queued: 1140
  • Items needing local Codex: 4
  • Actionable local Codex items: 4
  • Claimable local Codex items: 4
  • Source-fixed candidates: 0
  • Superseded sync candidates: 116
  • Finished local results without published source changes: 0
  • Claimed local Codex items: 0
  • Next claim lease expires: -

Acceptance criteria

  • Kind: sync-review-comments
  • Source repo: stranske/Workflows
  • Preferred local workdir: Workflows
  • Head: sync/workflows-23b44c982516 (e40a0a5e8b72)
  • Source sync state: current (PR 23b44c982516 / current 23b44c982516)
  • Attempts: 0

@stranske
stranske force-pushed the codex/source-sync-review-fixes-20260426 branch from 51a11f1 to f942484 Compare April 26, 2026 18:06
@stranske
stranske temporarily deployed to agent-high-privilege April 26, 2026 18:08 — with GitHub Actions Inactive
@stranske
stranske marked this pull request as ready for review April 26, 2026 18:12
Copilot AI review requested due to automatic review settings April 26, 2026 18:12
@stranske
stranske merged commit 2f8e368 into main Apr 26, 2026
79 of 80 checks passed
@stranske
stranske deleted the codex/source-sync-review-fixes-20260426 branch April 26, 2026 18:12
@stranske
stranske temporarily deployed to agent-high-privilege April 26, 2026 18:12 — with GitHub Actions Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f942484256

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

details[index] = replace(existing, line=None, count=existing.count + detail.count)
return

details[-1] = replace(detail, line=None, count=details[-1].count + detail.count)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve counts when compaction bucket is missing

When the detail buffer is full and a new error reason appears that is not already compacted, this branch overwrites details[-1] with the new reason while adding the overwritten row's count. That reassigns existing counts to the wrong reason/path bucket instead of just accounting for the new overflow event. A concrete case is many invalid-json rows followed by legacy-json-fallback-buffer-limit: the code can shift one invalid-json count into the legacy reason, which corrupts by_reason/detail reporting.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes regressions impacting sync PR review sources by restoring action SHA pinning and tightening parse-error detail compaction so stored error details remain within configured limits.

Changes:

  • Update _append_parse_error_detail to compact/merge parse-error details when the storage cap is reached, and add/adjust tests for the new behavior.
  • Re-pin previously-floated GitHub Actions in agents-verify-to-new-pr.yml back to commit SHAs (with inline tag comments) in both source + consumer template workflows.
  • Minor formatting cleanup in repo_review_evaluator.py.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/aggregate_agent_metrics.py Changes parse-error detail compaction logic when the stored-detail limit is reached.
templates/consumer-repo/scripts/aggregate_agent_metrics.py Mirrors the same parse-error compaction changes for consumer-synced script parity.
tests/scripts/test_aggregate_agent_metrics.py Adds coverage for compaction-at-limit behavior and updates legacy fallback buffer assertions.
.github/workflows/agents-verify-to-new-pr.yml Re-pins key actions (github-script/checkout/upload-artifact) to SHAs in the source workflow.
templates/consumer-repo/.github/workflows/agents-verify-to-new-pr.yml Mirrors the same action SHA pins in the consumer template workflow.
scripts/repo_review_evaluator.py Simplifies a list comprehension (no behavioral change intended).

details[index] = replace(existing, line=None, count=existing.count + detail.count)
return

details[-1] = replace(detail, line=None, count=details[-1].count + detail.count)

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 parse-error detail list is at the storage limit and the incoming detail does not match any existing entry, the fallback details[-1] = replace(detail, ..., count=details[-1].count + detail.count) reassigns the previous last entry’s count to the new detail’s (path/artifact/reason). This can corrupt the by-reason/by-artifact counters (e.g., a large invalid-json count can be shifted into legacy-json-fallback-buffer-limit just because it was appended last). Consider aggregating the overflow count into an existing entry without changing its key, or using a dedicated sentinel/overflow bucket, so existing counts aren’t reclassified when the limit is hit.

Suggested change
details[-1] = replace(detail, line=None, count=details[-1].count + detail.count)
details[-1] = replace(details[-1], line=None, count=details[-1].count + detail.count)

Copilot uses AI. Check for mistakes.
details[index] = replace(existing, line=None, count=existing.count + detail.count)
return

details[-1] = replace(detail, line=None, count=details[-1].count + detail.count)

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 parse-error detail list is at the storage limit and the incoming detail does not match any existing entry, the fallback details[-1] = replace(detail, ..., count=details[-1].count + detail.count) reassigns the previous last entry’s count to the new detail’s (path/artifact/reason). This can corrupt the by-reason/by-artifact counters (e.g., a large invalid-json count can be shifted into legacy-json-fallback-buffer-limit just because it was appended last). Consider aggregating the overflow count into an existing entry without changing its key, or using a dedicated sentinel/overflow bucket, so existing counts aren’t reclassified when the limit is hit.

Suggested change
details[-1] = replace(detail, line=None, count=details[-1].count + detail.count)
details[-1] = replace(details[-1], line=None, count=details[-1].count + detail.count)

Copilot uses AI. Check for mistakes.
- name: Check PR is merged
id: check-merged
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9

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.

This workflow now pins some actions by commit SHA, but actions/setup-python@v6 is still referenced by a floating tag later in the job. The repo’s action-pinning policy calls for SHA pinning to avoid tag retags changing workflow behavior (docs/ci/ACTIONS_PINNING.md). Please pin setup-python to a commit SHA as well for consistency and supply-chain integrity.

Copilot uses AI. Check for mistakes.
- name: Check PR is merged
id: check-merged
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9

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.

This workflow now pins some actions by commit SHA, but actions/setup-python@v6 is still referenced by a floating tag later in the job. The repo’s action-pinning policy calls for SHA pinning to avoid tag retags changing workflow behavior (docs/ci/ACTIONS_PINNING.md). Please pin setup-python to a commit SHA as well for consistency and supply-chain integrity.

Copilot uses AI. Check for mistakes.
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