Skip to content

fix(sync): classify covered consumer drift - #2885

Merged
stranske merged 4 commits into
mainfrom
codex/issue-2878-covered-drift
Aug 1, 2026
Merged

fix(sync): classify covered consumer drift#2885
stranske merged 4 commits into
mainfrom
codex/issue-2878-covered-drift

Conversation

@stranske

@stranske stranske commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Source: Issue #2878

Closes #2878

Automated Status Summary

Scope

scripts/check_consumer_sync_drift.py:420-456 already records pending_sync_prs, but build_report() still sets top-level status to drift; main() then returns 1 for every non-converged state (scripts/check_consumer_sync_drift.py:841-860). The workflow runs on source pushes and at 05:10 UTC (.github/workflows/health-68-consumer-sync-drift.yml:6-17), before the 05:30 janitor, and comments on the durable issue for every failure (health-68-consumer-sync-drift.yml:81-201). Live evidence showed 249 runs with zero successes in 49 days and 223 comments on #2210. This is a current observability break: expected, covered propagation is reported as failure.

Context for Agent

Related Issues/PRs

Tasks

  • Extend scripts/check_consumer_sync_drift.py:358-495 to parse current sync provenance and classify repo-level remediation states.
  • Add desired plan/hash input from scripts/sync_manifest_compiler.py and require an open PR marker/branch to match it before state becomes covered.
  • Change scripts/check_consumer_sync_drift.py:841-860 so converged and fully covered reports exit zero; blocked, untracked_drift, lookup errors, and expired coverage exit non-zero.
  • Update .github/workflows/health-68-consumer-sync-drift.yml to run after Maint 71 and invoke issue mutation only for actionable failure states.
  • Update .github/scripts/consumer_sync_drift_issue_body.js so body/marker/comment output renders the five states and does not append an unchanged covered-state comment.
  • Extend tests/scripts/test_check_consumer_sync_drift.py with current, superseded, blocked, expired, and lookup-error fixtures.
  • Extend .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js with comment-suppression and actionable-state cases.
  • Update docs/ops/CONSUMER_REPO_MAINTENANCE.md and docs/ops/DURABLE_TRACKING_ISSUES.md with the state and SLO contract.

Acceptance criteria

  • python -m pytest tests/scripts/test_check_consumer_sync_drift.py -q and node --test .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js pass.
  • Drift in every affected repo with a current, unexpired generated PR produces top-level status covered and process exit 0.
  • Drift with no current PR, a superseded hash, a deterministic failed check, or an expired lease produces a non-zero exit and exact actionable repo list.
  • Repeated covered-state runs do not add comments to 🔄 Consumer repo drift detected #2210; a changed actionable fingerprint updates the durable tracker once.
  • Deliberate-break gate: temporarily make the PR hash differ from the compiler plan in the covered fixture; tests/scripts/test_check_consumer_sync_drift.py::test_current_sync_pr_covers_drift must fail or change the report to untracked_drift. Restore the fixture before review.

Summary by CodeRabbit

  • New Features

    • Added clearer synchronization drift classifications, including converged, covered, and unresolved states.
    • Reports now include remediation plans, matching branches, coverage leases, and repository-specific status details.
    • Successful checks now include both converged and covered repositories.
  • Bug Fixes

    • Prevented unnecessary issue comments when drift is already covered.
    • Improved timestamp handling and coverage expiration checks.
  • Documentation

    • Documented drift coverage states and failure behavior.
  • Chores

    • Updated health checks to run after successful synchronization workflows on the main branch.

@stranske stranske added agent:codex Agent-created issues from Codex agents:keepalive Use to initiate keepalive functionality with agents autofix Opt-in automated formatting & lint remediation labels Aug 1, 2026
Copilot AI review requested due to automatic review settings August 1, 2026 16:06
@stranske stranske added agent:retry Add to trigger agent retry after rate limit or pause agent:codex Agent-created issues from Codex agents:keepalive Use to initiate keepalive functionality with agents autofix Opt-in automated formatting & lint remediation labels Aug 1, 2026
@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 23 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5326da6d-8fba-4555-9cdd-db029b973740

📥 Commits

Reviewing files that changed from the base of the PR and between 5a9ddc7 and 5efffeb.

📒 Files selected for processing (1)
  • tests/scripts/test_check_consumer_sync_drift.py
📝 Walkthrough

Walkthrough

Health 68 now classifies consumer drift as converged, covered, or actionable drift. It matches current sync PR branches and leases, updates report data and exit handling, suppresses covered comments, documents the states, and triggers after successful merge-sync runs.

Changes

Health 68 drift classification

Layer / File(s) Summary
Remediation classification and report status
scripts/check_consumer_sync_drift.py
The checker matches sync PR branches to the compiler plan, evaluates a 36-hour lease, builds repository states, and treats converged and covered reports as successful.
Classification report validation
tests/scripts/test_check_consumer_sync_drift.py
Tests validate converged, covered, blocked, stale, and untracked-drift reports with current plan IDs, repository ownership, and timezone-aware timestamps.
Issue output and workflow integration
.github/scripts/consumer_sync_drift_issue_body.js, .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js, .github/workflows/health-68-consumer-sync-drift.yml, .github/workflows/maint-71-merge-sync-prs.yml, docs/ops/CONSUMER_REPO_MAINTENANCE.md
Issue output includes covered remediation details and suppresses covered comments. Health 68 runs after successful main-branch merge-sync completions. Documentation defines the state contract.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

  • stranske/Workflows issue 2210 — This PR changes Health 68 durable issue reporting for covered consumer drift.
  • stranske/Workflows issue 2879 — This PR updates consumer-sync workflow coordination and plan-based remediation reporting.

Suggested labels: maintenance, sync, verify:compare

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: classifying covered consumer synchronization drift.
Linked Issues check ✅ Passed The changes address #2878 through current-plan coverage checks, state classification, exit handling, workflow sequencing, comment suppression, tests, and documentation.
Out of Scope Changes check ✅ Passed The modified workflows, scripts, tests, and documentation directly support the linked issue objectives.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-2878-covered-drift

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Runner dispatch state for codex on PR #2885. Do not edit.

@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: 60a2250f58

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

Comment thread scripts/check_consumer_sync_drift.py Outdated
Comment thread scripts/check_consumer_sync_drift.py
Comment thread .github/scripts/consumer_sync_drift_issue_body.js

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
scripts/check_consumer_sync_drift.py (1)

967-977: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Distinguish the covered success message from converged.

A covered run exits 0 and prints "Consumer repos are in sync.". Drift exists in that state, and an open sync PR carries the remediation. The log then hides an actionable-adjacent condition. Print the status and the covered repository count so scheduled-run logs stay diagnostic.

♻️ Proposed change to differentiate the success paths
     if report["status"] not in {"converged", "covered"}:
         print("::warning::Consumer repo drift detected")
         return 1
 
-    print("Consumer repos are in sync.")
+    if report["status"] == "covered":
+        print("Consumer repo drift is covered by current sync PRs.")
+    else:
+        print("Consumer repos are in sync.")
     return 0
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/check_consumer_sync_drift.py` around lines 967 - 977, Update the
final status handling around report["status"] so the converged and covered
success paths use distinct messages. Preserve exit code 0 for covered runs, but
include the status and covered repository count in that message; keep the
existing drift warning and nonzero return for other statuses.
tests/scripts/test_check_consumer_sync_drift.py (1)

180-202: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Three of the five remediation states have no assertions. build_remediation_states now produces converged, covered, stale, blocked, and untracked_drift. The supplied tests assert only converged, covered, and untracked_drift. The unasserted branches are the ones that decide a nonzero exit, so a regression in them would pass CI.

  • tests/scripts/test_check_consumer_sync_drift.py#L180-L202: add cases for a branch that does not match the plan-derived branch, for an updated_at older than the 36-hour lease, and for a repository listed in sync_pr_lookup_errors.
  • scripts/check_consumer_sync_drift.py#L448-L484: keep the blocked and stale branches as written, and confirm the new tests reach both, including the "errors" in categories path.

As per path instructions: "Prioritize correctness, error handling, and test coverage."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/scripts/test_check_consumer_sync_drift.py` around lines 180 - 202, Add
tests covering the remaining remediation states in
test_build_report_marks_current_sync_pr_as_covered: a non-matching branch must
produce stale, an updated_at older than the 36-hour lease must produce stale,
and a repository in sync_pr_lookup_errors must produce blocked through the
"errors" in categories path. Keep the existing blocked and stale logic in
build_remediation_states unchanged in scripts/check_consumer_sync_drift.py; the
sibling site requires no direct code change beyond confirming these tests
exercise both branches.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/scripts/__tests__/consumer-sync-drift-issue-body.test.js:
- Around line 108-110: Extend the existing formatIssueComment test coverage
around formatIssueBody to assert rendering for covered status, expected_branch,
and coverage_lease_hours, while also asserting the actionable output remains
unchanged. Reuse the existing report fixture and expected body conventions
rather than introducing unrelated test setup.

In @.github/workflows/health-68-consumer-sync-drift.yml:
- Line 16: Update the Health 68 schedule and coordination so it explicitly waits
for Maint 71 janitor completion rather than relying on the 05:40 cron offset;
use a workflow completion signal if supported, otherwise validate and enforce
that the janitor’s worst-case duration fits within the interval before running
the drift check.

In `@docs/ops/CONSUMER_REPO_MAINTENANCE.md`:
- Around line 16-24: The “Drift coverage states” paragraph omits documented
failure conditions. Update it to explicitly include lookup-error and expired
coverage as actionable failures, clarifying that expired coverage is represented
by stale and lookup-error is a separate failure reason while preserving the
existing state and exit behavior.

In `@scripts/check_consumer_sync_drift.py`:
- Around line 548-554: Update the status calculation around remediation_states
so repo-agnostic errors and an empty repository set produce a failing “drift”
status, while preserving “covered” for repository-attributed covered states and
the existing “converged” result only when all repositories are validly
converged. Use the existing report/error data symbols to detect unattributed
errors before applying the state_values classification.

---

Outside diff comments:
In `@scripts/check_consumer_sync_drift.py`:
- Around line 967-977: Update the final status handling around report["status"]
so the converged and covered success paths use distinct messages. Preserve exit
code 0 for covered runs, but include the status and covered repository count in
that message; keep the existing drift warning and nonzero return for other
statuses.

In `@tests/scripts/test_check_consumer_sync_drift.py`:
- Around line 180-202: Add tests covering the remaining remediation states in
test_build_report_marks_current_sync_pr_as_covered: a non-matching branch must
produce stale, an updated_at older than the 36-hour lease must produce stale,
and a repository in sync_pr_lookup_errors must produce blocked through the
"errors" in categories path. Keep the existing blocked and stale logic in
build_remediation_states unchanged in scripts/check_consumer_sync_drift.py; the
sibling site requires no direct code change beyond confirming these tests
exercise both branches.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6fc819b9-cd94-42b5-8e94-139ffd594588

📥 Commits

Reviewing files that changed from the base of the PR and between 5084eb7 and 60a2250.

📒 Files selected for processing (6)
  • .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js
  • .github/scripts/consumer_sync_drift_issue_body.js
  • .github/workflows/health-68-consumer-sync-drift.yml
  • docs/ops/CONSUMER_REPO_MAINTENANCE.md
  • scripts/check_consumer_sync_drift.py
  • tests/scripts/test_check_consumer_sync_drift.py

Comment thread .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js
Comment thread .github/workflows/health-68-consumer-sync-drift.yml Outdated
Comment thread docs/ops/CONSUMER_REPO_MAINTENANCE.md
Comment thread scripts/check_consumer_sync_drift.py

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 updates the consumer-sync drift health signal (Health 68) to distinguish actionable drift from drift that is already covered by a current compiler-plan sync PR, reducing false failures and tracker noise.

Changes:

  • Add per-repo remediation classification (converged / covered / blocked / untracked_drift / stale) and compute top-level status as converged / covered / drift, with exit-0 for fully converged or covered.
  • Move the scheduled Health 68 run later (05:40 UTC) to occur after the janitor window.
  • Update durable-tracker formatting/tests and maintenance docs to reflect the new “covered drift” semantics.

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/check_consumer_sync_drift.py Adds sync-plan-aware remediation states and changes status/exit-code behavior to treat fully covered drift as success.
tests/scripts/test_check_consumer_sync_drift.py Updates expectations for new status/sync_remediation shape and adds a covered-state fixture.
.github/workflows/health-68-consumer-sync-drift.yml Reschedules the daily run to 05:40 UTC (post-janitor).
.github/scripts/consumer_sync_drift_issue_body.js Updates issue body wording for covered drift and suppresses covered-state comments.
.github/scripts/__tests__/consumer-sync-drift-issue-body.test.js Adds a regression test for covered-state comment suppression.
docs/ops/CONSUMER_REPO_MAINTENANCE.md Documents remediation states and the coverage lease contract.

Comment thread .github/scripts/consumer_sync_drift_issue_body.js
Comment thread scripts/check_consumer_sync_drift.py
Comment thread scripts/check_consumer_sync_drift.py
Comment thread docs/ops/CONSUMER_REPO_MAINTENANCE.md Outdated
@agents-workflows-bot

agents-workflows-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🤖 Bot Comment Handler

  • Agent: codex
  • Bot comments to address: 10

The agent has been assigned to this PR to address the bot review comments.

Instructions for agent

  1. Implement suggested fixes that improve the code
  2. Skip suggestions that don't apply (note why in your response)

The bot comment handler workflow has prepared context in the artifacts.

@stranske
stranske temporarily deployed to agent-high-privilege August 1, 2026 16:26 — with GitHub Actions Inactive
@stranske

stranske commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Addressed all current inline findings in 4651719: trusted same-repo sync provenance; global/empty-input errors now block rather than report convergence; covered reports skip empty tracker comments; schedule now follows successful Maint 71 completion; docs and focused coverage cover coverage lease, stale/untrusted candidates, naive timestamps, and body rendering. Local validation: 29 focused Python tests, 8 Node tests, Ruff, YAML parse, and Actionlint.

@stranske

stranske commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Runner dispatch state for autofix on PR #2885. Do not edit.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • tests/scripts/test_check_consumer_sync_drift.py

@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 1, 2026 16:31 Inactive

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/scripts/test_check_consumer_sync_drift.py`:
- Around line 206-225: Add a test case for build_report with a registered
repository, no attributed drift (drift=set()), and a non-empty global errors
set; assert that the repository's sync_remediation repo state is "blocked" while
preserving the existing global error assertion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 17ad6fa6-49a1-43be-a9e1-ed40f018d682

📥 Commits

Reviewing files that changed from the base of the PR and between 60a2250 and 5a9ddc7.

📒 Files selected for processing (6)
  • .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js
  • .github/workflows/health-68-consumer-sync-drift.yml
  • .github/workflows/maint-71-merge-sync-prs.yml
  • docs/ops/CONSUMER_REPO_MAINTENANCE.md
  • scripts/check_consumer_sync_drift.py
  • tests/scripts/test_check_consumer_sync_drift.py

Comment thread tests/scripts/test_check_consumer_sync_drift.py
A global comparison error must outrank the "no attributed gaps"
branch in build_remediation_states; without a case that has no local
drift, an unattributable failure could silently read as converged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@stranske

stranske commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Closer review-thread audit (post-5efffeb6)

Audited the three still-unresolved threads against the live branch rather than dismissing them as outdated. Two were already satisfied by 4651719d; the third was a real coverage gap and is now fixed.

1. codex P1 — "Require sync PRs to originate from the consumer repo" (scripts/check_consumer_sync_drift.py) — satisfied.
fetch_open_sync_prs now retains head provenance ("head_repo": head_repo.get("full_name", "")), and the coverage filter requires it to match the consumer repo:

current = [
    pr
    for pr in prs_by_repo[repo]
    if pr.get("branch") == expected_branch and pr.get("head_repo") == repo
]

A fork PR whose branch is named after the predictable current plan has head_repo = <forker>/<repo>, so it can no longer suppress actionable drift. test_build_report_rejects_stale_or_untrusted_coverage covers the untrusted-head case.

2. copilot — scheduled vs. push/manual gating (docs/ops/CONSUMER_REPO_MAINTENANCE.md) — satisfied.
The section now reads exactly as requested: "Scheduled Health 68 runs are triggered only after a successful Maint 71 janitor; push and manual runs are intentionally immediate."

3. CodeRabbit — missing "global error on a repo with no local drift" case — valid, fixed in 5efffeb6.
The claim was accurate: in build_remediation_states the if global_errors: branch precedes the if not categories:converged branch, but every existing case paired the global error with attributed drift, so that ordering was never pinned. Added a case with drift=set() asserting the repo is still blocked.

Verified the new assertion is load-bearing rather than tautological: with the two branches swapped, the state becomes converged and the test fails at the new assertion; the source was then reverted clean.

Validation on the pushed head: python3.12 -m pytest tests/scripts/test_check_consumer_sync_drift.py -q29 passed; ruff check clean; ruff format --check clean; git diff --check clean.

@stranske
stranske temporarily deployed to agent-high-privilege August 1, 2026 16:42 — with GitHub Actions Inactive
@stranske
stranske enabled auto-merge (squash) August 1, 2026 16:45
@stranske
stranske merged commit 79db012 into main Aug 1, 2026
52 checks passed
@stranske
stranske deleted the codex/issue-2878-covered-drift branch August 1, 2026 16:46
@stranske stranske added the verify:compare Compare multiple LLM evaluations label Aug 1, 2026
@stranske
stranske temporarily deployed to agent-high-privilege August 1, 2026 16:48 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Provider Comparison Report

Provider Summary

Provider Model Verdict Confidence Summary
openai gpt-5.6-terra PASS 86% The change set addresses the covered-versus-actionable drift distinction across the checker, durable-issue rendering, workflow scheduling/mutation behavior, documentation, and focused Python/JavaSc...
anthropic claude-sonnet-5 CONCERNS 50% The PR modifies check_consumer_sync_drift.py substantially (+153/-5) and expands its test file (+104/-36), which aligns with the core classification/exit-code acceptance criteria, and CI (including...
📋 Full Provider Details (click to expand)

openai

  • Model: gpt-5.6-terra
  • Verdict: PASS
  • Confidence: 86%
  • Scores:
    • Correctness: 9.0/10
    • Completeness: 9.0/10
    • Quality: 8.0/10
    • Testing: 9.0/10
    • Risks: 8.0/10
  • Summary: The change set addresses the covered-versus-actionable drift distinction across the checker, durable-issue rendering, workflow scheduling/mutation behavior, documentation, and focused Python/JavaScript tests. The checker now has provenance-based remediation classification and distinguishes current plan/hash-matching, unexpired generated PR coverage from superseded, missing, blocked, expired, and lookup-error cases. Fully covered drift is treated as a successful state, while actionable states retain non-zero behavior and repo-level reporting. The issue-body changes suppress unchanged covered-state comments while retaining actionable fingerprint updates. Tests cover the requested current, superseded, blocked, expired, lookup-error, and comment-suppression paths, including the plan/hash mismatch behavior required by the deliberate-break gate. The implementation appears readable and scoped to the stated observability problem, with no material security, compatibility, or performance concern evident from the changes.

anthropic

  • Model: claude-sonnet-5
  • Verdict: CONCERNS
  • Confidence: 50%
  • Scores:
    • Correctness: 6.0/10
    • Completeness: 5.0/10
    • Quality: 6.0/10
    • Testing: 6.0/10
    • Risks: 5.0/10
  • Summary: The PR modifies check_consumer_sync_drift.py substantially (+153/-5) and expands its test file (+104/-36), which aligns with the core classification/exit-code acceptance criteria, and CI (including the referenced pytest and node test suites) passed on the merge commit. However, completeness is questionable: docs/ops/DURABLE_TRACKING_ISSUES.md, explicitly required by the task list, was not updated at all, and the issue-body JS/test changes are quite small relative to the requirement to render five distinct states and suppress redundant comments. The deliberate-break gate test's correctness cannot be confirmed from the available diff. Overall the PR appears to implement the primary classification and exit-code logic but likely falls short on full documentation and issue-body rendering completeness, warranting a CONCERNS verdict rather than an outright PASS or FAIL.
  • Concerns:
    • Task list explicitly requires updating both docs/ops/CONSUMER_REPO_MAINTENANCE.md and docs/ops/DURABLE_TRACKING_ISSUES.md, but the diff only touches CONSUMER_REPO_MAINTENANCE.md (+11/-0). DURABLE_TRACKING_ISSUES.md is not modified at all, leaving the SLO contract documentation for the durable-issue side incomplete.
    • The scope calls for the issue-body script to render five distinct states and suppress unchanged covered-state comments, but consumer_sync_drift_issue_body.js only changed by +15/-1 lines, which seems small for handling five states, comment suppression, and actionable-state logic comprehensively; risk that some state-rendering paths are stubbed or incompletely covered.
    • Corresponding JS test file only grew by +23 lines, which is a thin increment to validate 'comment-suppression and actionable-state cases' as required — coverage depth for all five states is uncertain from the diff size alone.
    • The deliberate-break gate acceptance criterion requires a specific temporary-fixture-mutation test that must be verified and then restored before merge; without visibility into the full diff of test_check_consumer_sync_drift.py, it cannot be confirmed this negative-path assertion was correctly implemented (versus just having more fixtures added).
    • maint-71-merge-sync-prs.yml was modified (+2/-2) without being called out in the task list, so its correctness/relevance to the ordering requirement (running health-68 after maint-71) needs closer scrutiny; from the summary it's unclear if this achieves genuine sequencing or just a minor tweak.
    • Given the file-level diff was truncated, several nuanced correctness aspects (exact exit-code logic changes, hash/plan comparison logic, lease-expiry handling) could not be independently verified beyond the stated line-count changes.

Agreement

  • No clear areas of agreement.

Disagreement

Dimension openai anthropic
Verdict PASS CONCERNS
Correctness 9.0/10 6.0/10
Completeness 9.0/10 5.0/10
Quality 8.0/10 6.0/10
Testing 9.0/10 6.0/10
Risks 8.0/10 5.0/10

Unique Insights

  • openai: The change set addresses the covered-versus-actionable drift distinction across the checker, durable-issue rendering, workflow scheduling/mutation behavior, documentation, and focused Python/JavaScript tests. The checker now has provenance-based remediation classification and distinguishes curren...
  • anthropic: Task list explicitly requires updating both docs/ops/CONSUMER_REPO_MAINTENANCE.md and docs/ops/DURABLE_TRACKING_ISSUES.md, but the diff only touches CONSUMER_REPO_MAINTENANCE.md (+11/-0). DURABLE_TRACKING_ISSUES.md is not modified at all, leaving the SLO contract documentation for the durable-issue side incomplete.; The scope calls for the issue-body script to render five distinct states and suppress unchanged covered-state comments, but consumer_sync_drift_issue_body.js only changed by +15/-1 lines, which seems small for handling five states, comment suppression, and actionable-state logic comprehensively; risk that some state-rendering paths are stubbed or incompletely covered.; Corresponding JS test file only grew by +23 lines, which is a thin increment to validate 'comment-suppression and actionable-state cases' as required — coverage depth for all five states is uncertain from the diff size alone.; The deliberate-break gate acceptance criterion requires a specific temporary-fixture-mutation test that must be verified and then restored before merge; without visibility into the full diff of test_check_consumer_sync_drift.py, it cannot be confirmed this negative-path assertion was correctly implemented (versus just having more fixtures added).; maint-71-merge-sync-prs.yml was modified (+2/-2) without being called out in the task list, so its correctness/relevance to the ordering requirement (running health-68 after maint-71) needs closer scrutiny; from the summary it's unclear if this achieves genuine sequencing or just a minor tweak.; Given the file-level diff was truncated, several nuanced correctness aspects (exact exit-code logic changes, hash/plan comparison logic, lease-expiry handling) could not be independently verified beyond the stated line-count changes.

🔍 LangSmith Traces

@stranske

stranske commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Closer verifier disposition — split verdict audited; one claim is real and is now fixed

Background: this PR had no verifier report at all until now. The label-triggered run 30708952636 crashed inside scripts/langchain/pr_verifier.py — Anthropic returned structured (list) content while raw_content was typed as str, Pydantic rejected it, comparison.json was never written, and no durable comment was posted. #2887 fixed the parser and merged at 17:49:22Z. This round re-dispatched agents-verifier.yml in compare mode against this PR: run 30713009619 completed success at 18:41:07Z and produced report 5152844552. That is also the end-to-end confirmation that the #2887 fix works on the exact payload that broke it.

Verdict: openai gpt-5.6-terra PASS 86% (correctness 9, completeness 9, quality 8, testing 9, risks 8) / anthropic claude-sonnet-5 CONCERNS 50%.

The anthropic claim that is correct

docs/ops/DURABLE_TRACKING_ISSUES.md, explicitly required by the task list, was not updated at all

Verified against the merged commit, not the PR body. 79db0126 touches seven files — check_consumer_sync_drift.py, its tests, consumer_sync_drift_issue_body.js, its tests, health-68-consumer-sync-drift.yml, maint-71-merge-sync-prs.yml, and docs/ops/CONSUMER_REPO_MAINTENANCE.md. The task list said "Update docs/ops/CONSUMER_REPO_MAINTENANCE.md and docs/ops/DURABLE_TRACKING_ISSUES.md with the state and SLO contract." The second was missed.

This is not a cosmetic omission. DURABLE_TRACKING_ISSUES.md is the page that tells readers how to interpret tracker #2210, and three of its statements became wrong when this PR merged:

  • the cadence cell said "Daily 05:10 UTC", but Health 68 now has no schedule: block — it fires on workflow_run after Merge Sync PRs, on qualifying pushes, and on dispatch;
  • "creates or refreshes it when drift is detected" — covered drift no longer touches the tracker, which was the whole point;
  • "A red signal (… drift count > 0 in 🔄 Consumer repo drift detected #2210 …)" — a raw drift count is no longer red, since covered drift is the expected in-flight state.

Leaving that text in place would have preserved exactly the false alarm #2878 set out to remove (249 runs, zero successes, 223 tracker comments in 49 days).

Fixed in bounded follow-up #2891, which adds the five-state table with exit codes and tracker reach, notes that a quiet tracker no longer proves the workflow is alive, and adds tests/docs/test_durable_tracker_drift_states.py pinning the doc to the states the checker actually emits (deliberate-break demonstrated: renaming one row fails the gate; restored → 3 passed).

The anthropic claims that do not survive the audit

"The issue-body JS/test changes are quite small relative to the requirement to render five distinct states." That is a diff-size observation, not a behavioural one. consumer_sync_drift_issue_body.js renders from the report's state fields rather than branching per state, so five states need no five-way switch, and .github/scripts/__tests__/consumer-sync-drift-issue-body.test.js already covers comment suppression and the actionable states. Its 50% confidence is consistent with an incomplete read rather than a found defect.

The openai PASS specifically confirms the deliberate-break gate, the plan/hash-mismatch behaviour, and the current/superseded/blocked/expired/lookup-error fixtures the acceptance criteria named.

Disposition

Source issue #2878 stays closed: the implementation criteria are satisfied on main, and the only surviving gap is documentation now carried by #2891. No new follow-up issue is warranted — the debt is a single open PR, and this PR's review threads were all resolved before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:codex Agent-created issues from Codex agent:retry Add to trigger agent retry after rate limit or pause agents:keepalive Use to initiate keepalive functionality with agents autofix:patch autofix Opt-in automated formatting & lint remediation verify:compare Compare multiple LLM evaluations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dependency/Sync] Make Health 68 distinguish covered drift from actionable drift

3 participants