Skip to content

Make automation PR reconciliation safe and effective - #619

Merged
GraciousGazelles merged 6 commits into
mainfrom
fix/automation-pr-reconciliation-safety-20260815
Aug 15, 2026
Merged

GraciousGazelles merged 6 commits into
mainfrom
fix/automation-pr-reconciliation-safety-20260815

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • authorize pull-request mutations through the matching GitHub permission and endpoint
  • make retries idempotent by suppressing duplicate reconciliation comments
  • compare only versions whose ordering is unambiguous, leaving uncertain groups open
  • restrict model-sync reconciliation to GitHub Actions branches in this repository
  • add focused whole-plan and workflow-contract regression coverage

Context

The scheduled model-sync reconciliation reached an actionable stale/current pair but failed while posting the stale pull request comment with Resource not accessible by integration. The workflow declared issue write access while mutating pull requests. Separately, the existing numeric-token comparator could rank a prerelease above the corresponding stable release.

This change uses pull-request write access, closes through the pull-request API, and checks for the exact existing comment before posting. Dependabot groups now reconcile only when one candidate provably supersedes every other candidate; unsupported or ambiguous version forms produce no close action.

Validation

  • just test-github-scripts (282 tests)
  • focused workflow permission and idempotency contract tests
  • focused whole-plan version-ordering and model-sync identity tests
  • Python bytecode compilation for the changed scripts
  • git diff --check

Hosted validation and an exact actionable-pair acceptance run will be recorded before this draft is marked ready.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request refactors the automation PR supersession script to support robust version parsing and comparison for Dependabot updates, and introduces dedicated handling for models-json PRs along with comprehensive unit tests. The review feedback highlights a logic bug in strictly_supersedes where a newer stable release does not supersede an older prerelease, and suggests adding a corresponding test case. Additionally, it is recommended to normalize the author and repository names to lowercase in models_key to ensure case-insensitive comparisons.

@GraciousGazelles
GraciousGazelles marked this pull request as ready for review August 15, 2026 05:21
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 15, 2026
Merged via the queue into main with commit 8cc7edb Aug 15, 2026
85 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/automation-pr-reconciliation-safety-20260815 branch August 15, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant