Repository navigation
fix(ci): migrate privileged PR automation - #551
Merged
Merged
Conversation
Document the workflow-specific policy required for fork PR metadata automation and align caller permissions with the shared workflow. Related: AAP-103650 Assisted-by: OpenAI Codex
This was referenced Dec 3, 2026
shvenkat-rh
marked this pull request as ready for review
December 3, 2026 13:44
Split read-only ACK checks from trusted workflow-run labeling and bot automation. Add API-validated coverage processing with trusted scanner settings and isolated artifacts, while retaining legacy interfaces for other teams. Related: AAP-103650 Assisted-by: OpenAI Codex
sudhirverma
reviewed
Dec 4, 2026
sudhirverma
left a comment
Contributor
There was a problem hiding this comment.
Deep review (Security / Functionality / Quality)
Critical and important blocking findings only. Inline comments are on the cited lines.
Note: tox.yml / finalize.yml caller wiring is not in this diff — rollout gap called out on coverage.yml.
Reject failed ACK runs, bound extra-label matching, guard legacy auto-merge by SHA, and add the in-repository trusted coverage caller. Test classifier parity and caller-event boundaries; reject ambiguous coverage identity while skipping superseded runs. Related: AAP-103650 Assisted-by: OpenAI Codex
sudhirverma
reviewed
Dec 4, 2026
Guard legacy auto-merge by bot type, disambiguate compatibility workflow naming, test the direct ACK source-path default, and record the scoped Sonar control review. Related: AAP-103650 Assisted-by: OpenAI Codex
sudhirverma
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate PR classification to a read-only
pull_requestACK check and a trustedworkflow_runupdater. The updater re-fetches the source run and current PR through GitHub's API, validates repository/workflow/branch/head SHA, and authorizes writes only after a successful ACK run. Nopull_request_targetevent trigger remains in this repository.The new
ack-check.ymlreusable interface and directack-pr.ymlentry use identical classification logic, enforced by a parity test. Privileged labeling never checks out PR code or consumes PR artifacts. Extra-label regex rules have type/count/size limits and a 100 ms evaluation limit before any mutation. Both the new and compatibility bot auto-merge paths use a head-SHA guard. The reusable updater deliberately retains the caller'sworkflow_run/issuesevent boundary; ordinary PR/manual callers cannot authorize writes.Add
coverage.ymlfor API-validated Sonar processing andcoverage-run.ymlto connect this repository's completedtestruns to it. Artifacts come only from the validated source run and are isolated from checkout. Scanner settings are allowlisted from the default branch; credentials are not persisted and dependency/SCA execution is disabled. Missing, ambiguous, closed, superseded, or changed PR identity now fails before scanning or publishing a source check, avoiding green no-analysis wrapper results. Trusted non-PR source events and optional source-commit checks remain supported.Retain the legacy reusable ACK/finalize contracts and
pr_numberproducer for existing external consumers. This repository's new coverage caller does not consume the legacy PR-number artifact. The audit records affected external consumers beyond the 13 coordinated PRs; it does not claim their migrations are complete.Validation: full-tree
tox -e lintpasses. Full CI-modetox -e pypasses: 114 passed, 102 live GitHub-mutating cases skipped, coverage threshold met. Actionlint passes for every changed/new workflow. Regression coverage includes failed-run rejection, head guards, malformed/oversized/pathological regexes, classification parity, caller event context, missing/ambiguous/changed identities and the direct in-repository ACK source-path default, and own-repository coverage wiring.Rollout: merge this shared implementation before the caller PRs. Re-pin all coordinated callers to the final reviewed shared revision before merging them. Trusted follow-ups only run once their definitions exist on the default branch. Verify same-repository and fork PR classification/label writes, stale-head rejection, optional project/bot credentials, required-check names, merge queues, and Sonar/default-branch behavior. Production smoke evidence remains pending; local tests and pre-migration green runs do not establish live permissions or secret configuration.
The compatibility ACK display name is now
ack compatibility, with a Bot-type and head-SHA guard on legacy auto-merge. The migration guide records the scoped Sonar privileged-checkout control review, exact pinned action sources inspected, controls, residual analyzer risk, and conditions requiring renewed review. CodeQL alert #66 was dismissed as a false positive for that data-only scanner path; this does not waive live rollout verification.Related: AAP-103650