Skip to content

Harden sync review and drift telemetry contracts - #1910

Merged
stranske merged 1 commit into
mainfrom
codex/workflows-system-review-slice-98
Apr 26, 2026
Merged

Harden sync review and drift telemetry contracts#1910
stranske merged 1 commit into
mainfrom
codex/workflows-system-review-slice-98

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-26T18:17:01.274Z
  • Repos checked: 11/11
  • Open sync PRs: 549
  • Open Dependabot PRs: 0
  • Active review threads queued: 1151
  • Items needing local Codex: 2
  • Actionable local Codex items: 2
  • Claimable local Codex items: 2
  • Source-fixed candidates: 0
  • Superseded sync candidates: 118
  • 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-a038a7cee71c (91b8235d3374)
  • Source sync state: current (PR a038a7cee71c / current a038a7cee71c)
  • Attempts: 0
    • scripts/aggregate_agent_metrics.py:207 (copilot-pull-request-reviewer): When the detail limit is reached and no existing entry matches, the fallback details[-1] = replace(detail, ...) overw...

Head SHA: d333fef
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

Copilot AI review requested due to automatic review settings April 26, 2026 18:09
@stranske
stranske had a problem deploying to agent-high-privilege April 26, 2026 18:09 — with GitHub Actions Error
@stranske-keepalive

stranske-keepalive Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: e3dc515
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 temporarily deployed to agent-high-privilege April 26, 2026 18:10 — with GitHub Actions Inactive
@stranske
stranske force-pushed the codex/workflows-system-review-slice-98 branch from fd35780 to e9d9dbf Compare April 26, 2026 18:11
@stranske
stranske temporarily deployed to agent-high-privilege April 26, 2026 18:12 — with GitHub Actions Inactive

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

This PR hardens consumer sync/review automation by tightening supply-chain integrity for a consumer-facing workflow, improving parse-error telemetry compaction while preserving total counts, and making drift-issue mutation more resilient when GitHub REST rate limits are exhausted.

Changes:

  • Pin agents-verify-to-new-pr workflow actions to commit SHAs (with version comments) in both source and consumer template copies.
  • Update parse-error detail aggregation to cap stored details deterministically while keeping accurate total counts (plus new/updated tests).
  • Adjust Health 68 drift workflow to skip issue lookup/update/comment/create when rate-limited, while preserving the drift artifact as the durable output.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/scripts/test_aggregate_agent_metrics.py Adds/updates tests to validate capped parse-error detail storage and retained total counts.
scripts/aggregate_agent_metrics.py Refines _append_parse_error_detail to cap stored details and aggregate overflow into a stable marker entry.
templates/consumer-repo/scripts/aggregate_agent_metrics.py Mirrors the same parse-error aggregation changes for consumer-synced script parity.
.github/workflows/agents-verify-to-new-pr.yml Pins commonly used actions to SHA for workflow supply-chain hardening.
templates/consumer-repo/.github/workflows/agents-verify-to-new-pr.yml Mirrors the SHA pinning for consumer template parity.
.github/workflows/health-68-consumer-sync-drift.yml Adds rate-limit detection and early-exit behavior to avoid mutating drift issues when REST core is exhausted.

@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: fd35780a58

ℹ️ 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".

return

details.append(replace(detail, line=None))
details[-1] = ParseErrorDetail(

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 fallback marker when compacting overflow details

When details is at capacity and a new reason is appended, this replacement can erase both the incoming detail and the displaced tail detail into a generic additional-parse-errors-after-detail-limit bucket. In _read_ndjson, that means legacy-json-fallback-buffer-limit can disappear if the tail entry is a one-off reason (for example a single non-object-json in a very large malformed file), even though the fallback buffer limit was actually hit. This breaks the parse-error contract for consumers that key on the fallback marker reason.

Useful? React with 👍 / 👎.

@stranske
stranske force-pushed the codex/workflows-system-review-slice-98 branch from e9d9dbf to d333fef Compare April 26, 2026 18:16
@stranske
stranske temporarily deployed to agent-high-privilege April 26, 2026 18:16 — with GitHub Actions Inactive
@stranske
stranske merged commit ffb5480 into main Apr 26, 2026
93 of 94 checks passed
@stranske
stranske deleted the codex/workflows-system-review-slice-98 branch April 26, 2026 18:22
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