Skip to content

feat: implement issue #1125 — Fleet pr-review callers pin legacy bare pr-review/stable and are unmanaged — no pr-review release can reach the fleet - #1279

Merged
don-petry merged 5 commits into
mainfrom
dev-lead/issue-1125-20261010-1210
Oct 10, 2026
Merged

don-petry merged 5 commits into
mainfrom
dev-lead/issue-1125-20261010-1210

Conversation

@don-petry

@don-petry don-petry commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Fleet pr-review callers pin legacy bare pr-review/stable and are unmanaged — no pr-review release can reach the fleet

From the issue: No pr-review release can reach the fleet through the normal path. Every fleet pr-review caller pins the legacy bare channel @pr-review/stable. Promotion moves only the major-scoped pr-review/v1-* channels. There is no standards/workflows/pr-review.yml template and pr-review.yml is not in DEPLOYABLE_WORKFLOWS, so the sweep never re-pins these callers.

Risk

Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.

Test plan

Tests added/updated: test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats,test/scripts/lib/ring-pins.bats test/scripts/standards-templates/vform-pins.bats. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.

Rollback

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

Monitoring

This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.

Closes #1125

View guided diff Turn on auto-fix

@don-petry
don-petry requested a review from a team as a code owner October 10, 2026 12:27
@don-petry don-petry added the auto-rebase:ready Opts a non-draft PR into auto-rebase without an approval (auto-rebase ready_label) label Oct 10, 2026
@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.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@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

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f68c1ffd-8b3a-4afe-8c66-354b6066c83c

📥 Commits

Reviewing files that changed from the base of the PR and between 155466b and 960b4da.


📒 Files selected for processing (8)
  • scripts/deploy-standard-workflows.sh
  • scripts/lib/ring-pins.sh
  • sonar-project.properties
  • standards/ci-standards.md
  • standards/workflows/pr-review.yml
  • test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats
  • test/scripts/lib/ring-pins.bats
  • test/scripts/standards-templates/vform-pins.bats

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e17fccbe-7dd0-4b39-b43f-13f5303a885c



📥 Commits

Reviewing files that changed from the base of the PR and between 142b4f2 and 155466b.




📒 Files selected for processing (2)
  • scripts/deploy-standard-workflows.sh
  • sonar-project.properties



Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.





📝 Summary

Summary by CodeRabbit

  • New Features
    • Added an automated pull request review workflow that runs for selected pull request and review events, completed checks, manual runs, and review-mention events. Manual runs can specify a pull request URL, use dry-run mode, or force a review.
  • Updates
    • Existing review workflow callers are replaced when their content or reusable workflow pin differs from the tier-specific template. Repositories without an existing caller remain unchanged, and the private workflow engine is excluded from deployment.
📝 Summary
📝 Summary

Walkthrough

The PR adds a PR review caller template and updates the deployment sweep to replace existing callers with tier-specific content. It also updates compliance checks and reusable pin handling to support complete-body comparison and registered legacy filenames.

Changes

PR review caller deployment

Layer / File(s) Summary
Caller template and replace-if-present deployment
standards/workflows/pr-review.yml, scripts/deploy-standard-workflows.sh, standards/ci-standards.md, test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats, sonar-project.properties
The sweep replaces existing callers with the tier-rendered template. It does not seed missing callers and skips .github-private. The template defines its triggers, inputs, permissions, reusable workflow call, and secrets. Tests cover deployment guards, replacement, and repeat-run behavior. The SonarCloud ignore list includes pr-review.yml.
Caller compliance and legacy pin handling
scripts/deploy-standard-workflows.sh, scripts/lib/ring-pins.sh, test/scripts/lib/ring-pins.bats, test/scripts/standards-templates/vform-pins.bats
Compliance compares the full caller body with the tier-rendered template. Reusable filename lookup and repinning support registry-defined legacy filenames. Tests cover body and pin drift, channel repinning, ref extraction, and leaving unrelated pins unchanged.

Priority: ⬆️ High

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature · Severity of issue fixed: High

Sequence Diagram(s)

sequenceDiagram
  participant DeploymentSweep
  participant RingRegistry
  participant WorkflowTemplate
  participant TargetRepository
  DeploymentSweep->>TargetRepository: Check engine host and existing caller
  DeploymentSweep->>RingRegistry: Resolve repository tier and reusable filename
  RingRegistry-->>DeploymentSweep: Return registered filename and channel
  DeploymentSweep->>WorkflowTemplate: Render caller with channel pin
  DeploymentSweep->>TargetRepository: Replace existing caller when its body differs
Loading




Merge Risk: ⚪ Minimal · up to 15546

No concrete issue remains identified that would prevent merging after normal checks.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the legacy pinning and fleet management problem addressed by the changes. It is longer than preferred but remains specific and relevant.
Description check Passed The description directly explains the fleet pinning problem, the proposed workflow and deployment changes, testing, risk, rollback, and monitoring.
Linked Issues check Passed Issue #1125 requirements are met. standards/workflows/pr-review.yml contains the required header, workflow name, review job, triggers, inputs, permissions, Dependabot guard, reusable call, and mat…
Out of Scope Changes check Passed The changes remain within issue #1125. Deployment logic, ring-pin and filename handling, template documentation, SonarQube exemption, and tests support the caller migration and its validation. The cha…
Docstring Coverage Passed Docstring coverage is 84.21% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 5 files. (1 skipped: 1 …





  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

pull_request_review:
types: [submitted, dismissed]
pull_request:
types: [ready_for_review, reopened, synchronize]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Replacing existing callers removes the opened trigger, so newly created PRs do not start a review and may wait indefinitely for another event.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** standards/workflows/pr-review.yml
**Line:** 34:34
**Comment:**
	*Logic Error: Replacing existing callers removes the `opened` trigger, so newly created PRs do not start a review and may wait indefinitely for another event.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@don-petry don-petry Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing: dropping the opened trigger is intentional. An existing test asserts the template has no opened trigger, and the engine covers new PRs via check_suite. Per the stub's AGENTS header, trigger types must not change. Left for a human.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Customized review instruction saved!

Instruction:

Do not recommend changing the configured trigger types in the PR review workflow; they are constrained by repository instructions and tests.

Applied to:

  • standards/workflows/pr-review.yml

💡 To manage or update this instruction, visit: CodeAnt AI Settings

initiative-driver.yml
pr-auto-review.yml
feature-ideation.yml
pr-review.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Deploying this template removes the legacy pull_request: opened trigger, so a newly opened PR without a completed check suite will not start a review.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** scripts/deploy-standard-workflows.sh
**Line:** 133:133
**Comment:**
	*Logic Error: Deploying this template removes the legacy `pull_request: opened` trigger, so a newly opened PR without a completed check suite will not start a review.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@don-petry don-petry Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing: same as the template thread. The opened trigger is deliberately absent, and a test asserts it. Left for a human.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Customized review instruction saved!

Instruction:

Do not flag the deliberate absence of the pull_request: opened trigger in this workflow; its omission is intentional and covered by a test.

Applied to:

  • scripts/deploy-standard-workflows.sh

💡 To manage or update this instruction, visit: CodeAnt AI Settings

Comment on lines +623 to +625
if [[ -z "$existing_sha" ]]; then
skip "$repo/$workflow (replace-if-present: no existing caller — never seeded)"
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: fetch_existing returns empty for API failures as well as 404s, so a transient read error skips this caller without marking the sweep failed.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** scripts/deploy-standard-workflows.sh
**Line:** 623:625
**Comment:**
	*Logic Error: `fetch_existing` returns empty for API failures as well as 404s, so a transient read error skips this caller without marking the sweep failed.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@don-petry don-petry Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing here: fetch_existing is a shared helper used by every workflow, and changing its error semantics is out of scope for this PR. The failure mode here is safe, because nothing is added or overwritten on a read error. Left for a human.

@codeant-ai

codeant-ai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

CodeAnt PR Risk: Medium Risk

  • The PR needs attention before merging because existing callers are replaced with a workflow that omits the pull_request opened trigger.
  • Verify that the engine’s check_suite path reliably starts reviews for newly opened PRs; that behavior is not shown in the supplied code.
  • A transient API read failure can look like a missing caller and silently skip its replacement, leaving the fleet update incomplete until a later sweep.

Assessed commit: 960b4daaf7ae

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

Code Review

This pull request introduces a 'replace-if-present' deployment mode for standard workflows, specifically targeting pr-review.yml to prevent seeding it in repositories where it is not already present and protecting the engine host repository (.github-private). It updates the deployment scripts, documentation, and adds comprehensive BATS tests. Review feedback focuses on optimizing Bash performance by replacing here-strings and external commands with native parameter expansions, and improving BATS test reliability by avoiding generic negations and ensuring target files exist before executing grep assertions.

Comment on lines +191 to +192
local -a hosts
read -r -a hosts <<< "${ENGINE_HOST_REPOS[$w]:-}"

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.

medium

Avoid using here-strings (<<<) inside loops or frequently called functions to parse single-line delimited strings in Bash, as it introduces subprocess and setup/teardown overhead on every iteration. Since ENGINE_HOST_REPOS contains simple space-separated values, we can use native Bash parameter expansion and array assignment to parse the string in-process.

Suggested change
local -a hosts
read -r -a hosts <<< "${ENGINE_HOST_REPOS[$w]:-}"
local -a hosts=(${ENGINE_HOST_REPOS[$w]:-})
References
  1. Avoid using here-strings (<<<) inside loops to parse single-line delimited strings in Bash, as it introduces subprocess and setup/teardown overhead on every iteration. Use native Bash parameter expansion instead to parse the string in-process.

@don-petry don-petry Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping: the suggested unquoted array assignment triggers ShellCheck SC2206 (word-splitting/globbing). read -r -a is the lint-clean form, and the lookup runs once per repo, so the overhead is negligible.

Comment thread test/scripts/standards-templates/vform-pins.bats
Comment thread test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats Outdated
Comment thread test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats Outdated
Comment thread test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats Outdated
Comment thread test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats Outdated

@don-petry don-petry left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer note on the two CodeAnt threads that ask for the opened trigger to come back. That suggestion is declined; see the inline comment.

Comment thread standards/workflows/pr-review.yml
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (partial)

A commit was pushed, but not every requested change was applied. Per requested item:

  • standards/workflows/pr-review.yml:34 — not applied
  • scripts/deploy-standard-workflows.sh:133 — not applied
  • scripts/deploy-standard-workflows.sh:625 — not applied
  • scripts/deploy-standard-workflows.sh:192 — not applied
  • test/scripts/standards-templates/vform-pins.bats:30 — applied
  • test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats:110 — applied
  • test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats:126 — applied
  • test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats:128 — applied
  • test/scripts/deploy-standard-workflows/pr-review-replace-if-present.bats:245 — applied

The unaddressed items above still need work.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 10, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Fixed in sonar-project.properties: added S7637 exemption for pr-review.yml. The new pr-review.yml is a thin caller stub with an intentional first-party mutable channel ref (@pr-review/v1-stable), following the same exemption pattern as other first-party caller stubs (pr-review-mention, pr-auto-review, etc.). This is a required mutable ref per AGENTS.md for the canary-ring release model.

@don-petry don-petry left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer finding on commit 5051ffa (the S7637 exemption for pr-review.yml). The exemption itself is consistent with the other first-party stubs. It does not take effect; see inline.

Comment thread sonar-project.properties
@don-petry
don-petry disabled auto-merge October 10, 2026 13:32
@don-petry

Copy link
Copy Markdown
Contributor Author

Fixed in sonar-project.properties: registered the s7637_prreview exemption key in the sonar.issue.ignore.multicriteria list. The exemption rule was defined but never registered, so SonarQube reported S7637 violations on pr-review.yml instead of suppressing them.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 13:41
@don-petry
don-petry disabled auto-merge October 10, 2026 14:08
@don-petry

Copy link
Copy Markdown
Contributor Author

S7637 exemption for pr-review.yml has been addressed: the exemption was registered in sonar-project.properties multicriteria list in commit ef5ed3f, activating the suppression rule that was previously defined but inactive.

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

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 16:23
@don-petry

Copy link
Copy Markdown
Contributor Author

CodeRabbit rate-limit notice with no actionable findings. Recent review explicitly states: 'No actionable comments were generated in the recent review.' All CI checks passing. No code changes required.

@don-petry

Copy link
Copy Markdown
Contributor Author

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

Agent reasoning
**Bot:** coderabbitai[bot]  
**Issues addressed:** 0 (no actionable findings)  
**Status:** Disposition posted
The CodeRabbit comment is a **rate-limit service notice** combined with a **recent review that found no actionable issues**. The recent review section explicitly states: *"No actionable comments were generated in the recent review."*
**Analysis:**
- ✅ All 5 pre-merge checks passed
- ✅ All CI checks passing (success)
- ✅ Recent review: no actionable comments
- ✅ No specific code defects identified
**Action taken:** Posted disposition reply (`informational`) on the original comment. The rate-limit is a service capacity notice unrelated to code quality, and the actual code review found no issues. The harness will resolve this as an informational status notice.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 16:24
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 10, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 17:10

@don-petry don-petry left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer request: clear the one SonarQube issue this PR introduces (S1192 on the .github-private literal), the same way it was cleared on PR #1278.

Comment thread scripts/deploy-standard-workflows.sh Outdated
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 17:16
@don-petry

Copy link
Copy Markdown
Contributor Author

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved.

dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention.

To resolve manually instead:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

@don-petry
don-petry disabled auto-merge October 10, 2026 17:50
don-petry and others added 4 commits October 10, 2026 17:50
… pr-review/stable and are unmanaged — no pr-review release can reach the fleet
The new pr-review.yml is a first-party caller stub with an intentional mutable
channel ref (@pr-review/v1-stable), following the same exemption pattern as
other first-party caller stubs (pr-review-mention, pr-auto-review, etc).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…ia list

The pr-review.yml exemption rule was defined but never registered in the
sonar.issue.ignore.multicriteria list, so SonarQube reported S7637 violations
instead of suppressing them. Added s7637_prreview to the multicriteria
registration to activate the exemption.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — rebase (applied)

Rebase completed and pushed; PR is no longer conflicting.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 17:51
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 18:02
…uplication

Replace multiple occurrences of the '.github-private' string literal with a
readonly ENGINE_HOST_REPO constant. This reduces code duplication and resolves
the SonarQube S1192 issue flagged on this PR.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@don-petry

Copy link
Copy Markdown
Contributor Author

Fixed in scripts/deploy-standard-workflows.sh: extracted the '.github-private' string literal into a readonly ENGINE_HOST_REPO constant to eliminate duplication and resolve the S1192 string duplication issue.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 18:11
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 18:42
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 18:42
@don-petry
don-petry disabled auto-merge October 10, 2026 20:05
@don-petry
don-petry merged commit 564cd15 into main Oct 10, 2026
32 checks passed
@don-petry
don-petry deleted the dev-lead/issue-1125-20261010-1210 branch October 10, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-rebase:ready Opts a non-draft PR into auto-rebase without an approval (auto-rebase ready_label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fleet pr-review callers pin legacy bare pr-review/stable and are unmanaged — no pr-review release can reach the fleet

2 participants