Skip to content

feat: implement issue #591 — Compliance: stub-surface-drift-pr-auto-review.yml-concurrency - #594

Merged
don-petry merged 9 commits into
mainfrom
dev-lead/issue-591-20260920-1928
Oct 11, 2026
Merged

don-petry merged 9 commits into
mainfrom
dev-lead/issue-591-20260920-1928

Conversation

@don-petry

@don-petry don-petry commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #591

Implemented by dev-lead agent. Please review.

Summary by CodeRabbit

  • Chores
    • Automated review runs for the same pull request now share a concurrency group, and newer runs cancel in-progress runs. Other runs continue independently without cancellation.

Problem

See the linked issue.

Risk

Medium — changes GitHub Actions workflow behavior, which is exercised only post-merge; verify via the affected workflow runs.

Test plan

No test files were added or updated. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the existing CI (bats + lint) guards the change.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

Watch the affected workflow run(s) in the Actions tab and this PR's Lint check for regressions.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@gemini-code-assist

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) September 20, 2026 19:31
Comment thread .github/workflows/pr-auto-review.yml Resolved
@don-petry
don-petry disabled auto-merge September 20, 2026 19:36
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
- ✅ Playwright UI Tests: success
The only "cancelled" conclusions are from earlier workflow runs (different run IDs) that were superseded. No Tier 1 blockers present.
## Summary
**No changes required.**
The PR is in good standing:
- Quality gate passed
- All CI checks passing
- No actionable findings from the bot
- No Tier 1 blockers blocking merge
The bot comment is confirmatory, not prescriptive — it's reporting that code quality checks passed cleanly.

@don-petry
don-petry enabled auto-merge (squash) September 20, 2026 19:37
donpetry-bot
donpetry-bot previously approved these changes Sep 20, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 99acb03d238047dd84415f2fd8da16354ba6c68f
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

PR #594 re-syncs the pr-auto-review.yml thin caller stub's centrally-owned concurrency block to resolve compliance drift finding #591. Byte-for-byte diff confirms the concurrency: block (comment, group expression, cancel-in-progress) is verbatim-identical to the canonical standards/workflows/pr-auto-review.yml — exactly what the issue's remediation demands. No third-party reusable added, no secret change, no CI weakening; no deterministic hard-stops.

Findings

  • info: codeant-ai flags that the group expression keys on pull_requests[0].number, so a commit belonging to multiple PRs could collapse two PRs' default-branch readiness runs into one group (Major/Rarely race). This behavior is inherited verbatim from the centrally-owned canonical standards/workflows/pr-auto-review.yml — the concurrency: block is explicitly not repo-adjustable (issue #591). Editing it in this per-repo stub would re-introduce the very drift being remediated and fail the compliance audit. The concern is legitimate but belongs upstream against petry-projects/.github; it does not block this verbatim sync. The standard also documents that superseding these head_branch=main runs is SAFE and readiness is re-evaluated on subsequent triggers, so the practical impact is self-healing.
  • info: PR body omits all 5 standard sections (problem/risk/test-plan/rollback/monitoring). Covered by the standards-sync carve-out: this is a workflow-only, bot-authored (dev-lead) caller-stub PR with a linked compliance issue (Closes #591) that fully explains the change, and SAFETY_CHECKS reports STANDARDS_SYNC_PR: true. A verbatim central-template re-sync does not warrant failing the description gate.

Reviewed by the PR-review cascade (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5). Reply if you need a human review.

@donpetry-bot

Copy link
Copy Markdown
Contributor

pr-review approved on PARTIAL advisory evidence: 4/6 required advisory bots reported before the gate's quiescence-timeout fallback proceeded. Recorded for the miss-rate metric (#1596).

@donpetry-bot

donpetry-bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 99acb03d238047dd84415f2fd8da16354ba6c68f — click to expand prior review.

Review — fix requested (cycle 2/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 99acb03d238047dd84415f2fd8da16354ba6c68f
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

PR #594 re-syncs the pr-auto-review.yml caller stub's concurrency: block to resolve compliance drift finding #591. I confirmed via diff that the added block (including its inline #1126 comment) is byte-for-byte identical to the canonical standards/workflows/pr-auto-review.yml — a legitimate verbatim standards-sync, exactly what the issue requested. The GHA concurrency expression is logically correct across all event paths, so no correctness defect is introduced. The sole blocker is the description gate: the body omits all 5 required sections and the deterministic layer flagged it [escalate]; the trusted-stub carve-out does not apply (TRUSTED_STUB_SYNC:false, not a secret-forwarding stub), so I escalate on that gate — no security-audit tier needed.

Findings

  • info: The added concurrency: block is a verbatim, byte-for-byte re-sync of the canonical petry-projects/.github standards/workflows/pr-auto-review.yml (confirmed with a diff — IDENTICAL, including the inline issue-#1126 comment). This correctly remediates issue Compliance: stub-surface-drift-pr-auto-review.yml-concurrency #591's stub-surface-drift finding. Traced the expression across all triggers: check_suite/workflow_run with an associated PR -> shared pr-auto-review-ready-check-pr- group with cancel-in-progress; pull_request/pull_request_review -> unique-per-run group, never cancels; fork/no-PR default-branch trigger -> unique fallback. Logic is sound.
  • info: CodeAnt's pull_requests[0] shared-commit race (one PR's readiness run cancelling another's when a commit belongs to multiple PRs) is real in principle but is inherited verbatim from the canonical standard. The stub header states the concurrency: block is centrally owned and NOT repo-adjustable ('open a PR against the reusable in the central repo'). Editing it here would re-introduce drift and fail the compliance audit, so this concern is out of scope for this sync PR and must be raised against petry-projects/.github's canonical template if pursued.
  • major: PR body ('Closes Compliance: stub-surface-drift-pr-auto-review.yml-concurrency #591\n\nImplemented by dev-lead agent. Please review.') omits all 5 required sections (problem, risk, test-plan, rollback, monitoring); the deterministic SAFETY_CHECKS layer flagged this [escalate]. The trusted-stub carve-out that waives terse descriptions does not apply here: TRUSTED_STUB_SYNC is false and this is a concurrency-block sync, not a secrets-forwarding stub. This gate failure is the reason for escalation. Note the informational 'why/risk' is otherwise well-documented via issue Compliance: stub-surface-drift-pr-auto-review.yml-concurrency #591 and the canonical block's inline comment, so a short structured description would clear this cleanly.

Reviewed by the PR-review cascade (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@donpetry-bot
donpetry-bot dismissed their stale review September 20, 2026 19:47

Superseded by automated re-review at 99acb03.

@donpetry-bot

donpetry-bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 99acb03d238047dd84415f2fd8da16354ba6c68f — click to expand prior review.

Review — fix requested (cycle 3/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 99acb03d238047dd84415f2fd8da16354ba6c68f
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

Workflow-only PR adds the concurrency: block to the pr-auto-review.yml caller stub to remediate compliance issue #591 (concurrency stub-surface drift). The added block is byte-identical to the org canonical standards/workflows/pr-auto-review.yml, so it is a correct verbatim re-sync and introduces no logic defect; CI is fully green. Escalating (not to security) solely because the PR description is missing all 5 required sections and the standards-sync carve-out does not strictly apply (TRUSTED_STUB_SYNC=false).

Findings

  • minor: PR description is missing all 5 required sections (problem, risk, test-plan, rollback, monitoring); body is only 'Closes Compliance: stub-surface-drift-pr-auto-review.yml-concurrency #591 / Implemented by dev-lead agent. Please review.' The secret-forwarding stub-sync carve-out that would waive a terse description does not cleanly apply here (this syncs a concurrency block, SECRET_FORWARDING=false, TRUSTED_STUB_SYNC=false), so the description gate fails. Add a short problem/risk/rollback note referencing the verbatim canonical sync.
  • minor: CodeAnt (Major, rare) flags that using pull_requests[0].number in the concurrency group can collide/cancel across PRs when one commit belongs to multiple PRs. This is real but NOT introduced by this PR: the added block is byte-identical to the org source-of-truth standards/workflows/pr-auto-review.yml (verified via gh api). The concurrency: surface of these thin caller stubs is centrally owned and explicitly not repo-adjustable (issue Compliance: stub-surface-drift-pr-auto-review.yml-concurrency #591); changing pull_requests[0] here would re-introduce the exact stub drift this PR closes. Correct venue is a PR against the central reusable/standard, not this stub. Do not modify the expression in this PR.

Reviewed by the PR-review cascade (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

donpetry-bot
donpetry-bot previously approved these changes Sep 20, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 99acb03d238047dd84415f2fd8da16354ba6c68f
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

This PR re-syncs the pr-auto-review.yml caller stub's concurrency: block to the canonical standard, which is exactly what compliance issue #591 (stub-surface-drift) requires. I verified the head file is byte-for-byte identical to petry-projects/.github standards/workflows/pr-auto-review.yml (diff: IDENTICAL) and the YAML parses. The CodeAnt 'Major race' and the missing-description signals that drove triage escalation both dissolve on inspection: the concurrency expression is centrally-owned and not repo-adjustable (editing it here would re-introduce the drift #591 exists to remove), and the terse description is waived for a workflow-only standards-sync stub that already links its driving issue. No security-surface change, no deterministic hard-stops, CI green.

Findings

  • info: The added concurrency: block is byte-for-byte identical to the canonical standards/workflows/pr-auto-review.yml in petry-projects/.github (verified via diff on the file at the head SHA). This is precisely the remediation compliance issue #591 asks for ('re-sync verbatim from canonical; do not generate from scratch'). Issue-addressed gate passes.
  • minor: CodeAnt Major finding: github.event.*.pull_requests[0].number uses only the first PR when a commit belongs to multiple PRs, allowing a rare cross-PR concurrency-group collision. This is real but (a) inherent to the centrally-owned canonical concurrency block, which this stub MUST match verbatim per issue #591 and the stub header ('MUST NOT change... trigger/permissions/concurrency; open a PR against the reusable/standard instead') — 'fixing' it here would re-introduce the exact drift #591 eliminates and fail the compliance audit; (b) rare (CodeAnt: Occurrence=Rarely); and (c) safe-by-fallback — when a PR number is not reliably resolvable the expression yields a unique-per-run group (…-unique-<run_id>) so unrelated PRs never collapse, and pull_request / pull_request_review triggers always use unique groups and re-evaluate, making the shared-commit case self-healing. The correct venue for any hardening (e.g. iterating all pull_requests) is a PR against petry-projects/.github, not this consumer stub. Not blocking here.
  • info: SAFETY_CHECKS reports 5/5 required description sections missing. Waived: this is a workflow-only (WORKFLOW_ONLY_CHANGE=true), standards-sync (STANDARDS_SYNC_PR=true) caller-stub re-sync that is byte-identical to canonical and already links its driving issue via 'Closes #591'. Per the trusted first-party stub / standards-sync carve-out, the terse description does not fail the gates for such a PR; the change is a self-documenting verbatim canonical copy.

Reviewed by the PR-review cascade (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot requested a review from a team September 20, 2026 20:04
@don-petry don-petry closed this Sep 23, 2026
auto-merge was automatically disabled September 23, 2026 02:59

Pull request was closed

@don-petry don-petry reopened this Sep 23, 2026
@don-petry

don-petry commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator Author
Resolved — the `needs-human-review` hold was lifted; dev-lead has picked this item up. Click to expand the prior hold notice.

dev-lead is withholding action on this item.

It is labeled needs-human-review (flagged for human review — this label is applied by automation as well as by people, so an item can become held without anyone noticing), so dev-lead will not pick it up while that label is present. This notice is posted once so the withhold is visible rather than looking like a stalled run.

To re-enable automated pickup: remove the needs-human-review label.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge October 9, 2026 22:59
@don-petry
don-petry enabled auto-merge (squash) October 9, 2026 22:59
@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 00:02
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 00:03
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 05:57
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 05:57
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 11:45
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 11:46
@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 13:04
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 13:04
@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Re-read the edited CodeRabbit summary: no actionable comments, and the architecture review reports Low risk with no concerns. No action needed.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Re-read the edited CodeAnt risk summary (assessed commit fcb71a86fc89). It still raises only the pull_requests[0] concurrency-key concern. That block in .github/workflows/pr-auto-review.yml is the org-canonical stub synced verbatim from petry-projects/.github standards/workflows/pr-auto-review.yml, so it is read-only here; the reusable workflow evaluates only the first open non-draft PR for the head SHA. Any change belongs in the template. No code change.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads. There were no open review threads, so I made no code changes and no commits.
- **CI and reviews:** every check passed or was skipped. No review has `CHANGES_REQUESTED`, so there are no Tier 1 blockers.
- **Issue comments:** the CodeAnt risk summary was edited after my earlier disposition, so I posted a new `invalid` disposition on it. The edited body still raises only the `pull_requests[0]` concurrency-key concern. That block in `.github/workflows/pr-auto-review.yml` is the org-canonical stub copied from petry-projects/.github, so it is read-only here and any change belongs in the template.
- **Other comments:** the rest are already minimized or dispositioned, or are our own automation comments.
Test verification: not run, since nothing changed.
Files changed: none.

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: fcb71a86fc89addeed193659af084ff66c10269a
Review mode: triage-approved (single reviewer)

Summary

Standards-sync PR for #591. It adds the canonical concurrency block to the pr-auto-review.yml caller stub, and the file at the head commit is byte-identical to petry-projects/.github standards/workflows/pr-auto-review.yml (checked with diff). The only change since the last cascade approval is a dev-dependency lockfile bump: handlebars 4.7.9 → 4.7.10 via npm audit fix, which clears a critical advisory. CI is green, both review threads are resolved, and no human questions are open. Risk is MEDIUM because the change alters workflow concurrency behavior and bumps a dependency; I agree with the triage assessment.

Linked issue analysis

#591 (compliance finding stub-surface-drift-pr-auto-review.yml-concurrency) asks to re-sync the concurrency: block from the canonical template. The stub now matches the template exactly, which resolves the finding. Closes #591 is appropriate.

Findings

  • info: .github/workflows/pr-auto-review.yml matches the canonical template byte for byte. check_suite/workflow_run events share one cancel-in-progress group per PR. pull_request and pull_request_review runs get a unique group per run and are never cancelled. Events with no associated PR fall back to a unique group. This is the intended design.
  • info: The pull_requests[0] keying concern (CodeAnt) and the local-drift concern (cubic) belong to the upstream template, not this stub. Both threads are resolved and deferred to #616 for upstream evaluation. No action needed here.
  • info: package-lock.json bumps handlebars 4.7.9 → 4.7.10 (dev-only, minimist floor ^1.2.8) from npm-registry URLs with integrity hashes. dependency-audit / npm audit now passes.
  • Secret-scanning MCP tool was not available in this run; gitleaks CI passed.

CI status

All required checks pass: build-and-test, Node.js Tests, Playwright UI Tests, coverage, CodeQL (actions/js-ts/python), SonarCloud, gitleaks, AgentShield, dependency-audit/npm audit, and pr-auto-review/check-and-dispatch. The cancelled entries are superseded dev-lead dispatch/relay/resume and review runs. Skipped entries are ecosystem audits that don't apply here. No failures.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.

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.

Compliance: stub-surface-drift-pr-auto-review.yml-concurrency

2 participants