Skip to content

chore: sync 4 org-standard workflow stub(s) from petry-projects/.github - #1378

Merged
don-petry merged 1020 commits into
mainfrom
standards-sync/workflows-20260727
Aug 14, 2026
Merged

chore: sync 4 org-standard workflow stub(s) from petry-projects/.github#1378
don-petry merged 1020 commits into
mainfrom
standards-sync/workflows-20260727

Conversation

@don-petry

@don-petry don-petry commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

User description

Syncs the following org-standard workflow stub(s) from petry-projects/.github (standards/workflows/), deployed verbatim:

  • dev-lead.yml
  • agent-shield.yml
  • dependabot-rebase.yml
  • pr-auto-review.yml

Opened by scripts/deploy-standard-workflows.sh. Stubs are thin callers; all behaviour lives in the reusables. See standards/ci-standards.md. Labeled standards-sync and left for the normal review/auto-merge pipeline — the deploy script never merges directly.

Summary by CodeRabbit

  • Workflow Improvements

    • Updated reusable workflow channels and pinned action versions for more consistent automation.
    • Added stronger authentication-scope checks and improved rate-limit handling in review workflows.
    • Improved pull request filtering, review feedback collection, and auto-rebase configuration.
  • Bug Fixes

    • Prevented duplicate validation, review, and security-check results.
    • Improved handling of engine credentials and workspace-trust checks.
  • Documentation

    • Simplified CI, triage, review, and initiative guidance.
    • Updated workflow and caller-reference documentation.
  • Maintenance

    • Added protection for known security-scan false positives and editor backup files.
    • Locked test tooling to a stable version.

CodeAnt-AI Description

Make automated PR reviews safer, more resilient, and better informed

What Changed

  • Review and fix runs can fall back across configured AI engines and model chains when an engine is unavailable or rate-limited, while avoiding repeated calls to exhausted engines.
  • Fix runs refuse to push changes that cancel out the PR’s entire diff, disable auto-merge, and request human attention instead.
  • Triage now includes current advisory-bot reviews, PR comments, and inline findings, while ignoring feedback from older commits.
  • Rate-limit and blocking-check messages now explain the actual cause, include retry timing, avoid duplicate acknowledgments, and let retry jobs continue when a new blocker appears.
  • PR branches are modified in isolated worktrees, session logs are redacted before persistence, and engine usage can be recorded without exposing credentials.
  • The Dev-Lead workflow now uses the stable v1 channel, and auto-rebase covers all eligible behind PRs by default.

Impact

✅ Fewer self-cancelling fixes
✅ More reliable automated review retries
✅ Current bot feedback reaches triage
✅ Safer review logs

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Jul 27, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed 0bdc72c Aug 13, 2026 · 21:04 21:05
✅ Incremental review completed 1746532 Aug 12, 2026 · 21:50 21:51
✅ Incremental review completed 31689c6 Aug 12, 2026 · 06:22 06:23
✅ Incremental review completed 299879a Aug 08, 2026 · 19:49 19:50
✅ Incremental review completed e25f347 Aug 07, 2026 · 00:55 00:57

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

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request updates workflow pins and checks, reorganizes engine execution, changes Dev-Lead and review scripts, removes duplicated prompt content, and adds repository maintenance rules and false-positive scan exclusions.

Changes

Review automation

Layer / File(s) Summary
Workflow pins and authentication checks
.github/workflows/dev-lead.yml, .github/workflows/pr-review.yml, .github/workflows/auto-rebase.yml, .github/workflows/dependabot-automerge.yml, .github/workflows/test-dev-lead.yml, package.json, AGENTS.md, tests/caller_stub_freeze.bats, tests/fixtures/caller-stub-freeze/dev-lead.block, tests/test_dependabot.bats
Dev-Lead references now use dev-lead/v1-stable. PR review adds Claude caching and authentication-scope validation. Bats moves to pinned devDependencies. Workflow pins and related tests are updated.
Engine execution and rate-limit handling
scripts/engine.sh, scripts/validate-engines.sh
Engine helpers are reorganized. Copilot duck runs remove the Google credential. Writer rate-limit detection occurs before output persistence. Duplicate Gemini trust validation is removed.
Dev-Lead review execution
scripts/dev-lead-fix-ci.sh, scripts/dev-lead-fix-reviews.sh, prompts/dev-lead/fix-ci.md, prompts/dev-lead/fix-reviews.md
CI prompt phases are removed. Review prompt phases are deduplicated. Dev-Lead scripts add duplicate function, worktree, marker, rate-limit, handler, and commit/push sections.
PR review processing and prompt cleanup
scripts/review-one-pr.sh, scripts/review-batch.sh, prompts/cascade-action.md, prompts/triage.md
Advisory feedback and downstream checks are duplicated. A third fallback status check is added. Cascade and triage prompt sections are changed.
Documentation and scan-maintenance updates
.gitleaksignore, .gitignore, docs/initiatives/idea-to-initiative-pipeline.md, scripts/list-prs.sh, prompts/shared.md
Known fixture fingerprints and backup files are ignored. Initiative documentation and repeated PR-list comments are changed. Prompt spacing is adjusted.

Estimated code review effort: 5 (Critical) | ~120 minutes

Mergeability Score: 🟠 High · up to 953fc

The current head changes shared workflow automation to add retries, broader review context, safer fixes, and broader rebasing, but it still contains unresolved duplicate or shadowed logic, a concurrency grouping bug, possible secret leakage into CI logs, insufficient verdict validation, and unsafe temporary-state writes. These could cause incorrect automated actions, concurrent processing, or credential exposure, so the PR is not merge-ready until the high-impact issues are fixed or explicitly accepted.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a summary but omits the required Summary, Interaction contract, and Checklist sections and does not explain the broader changeset. Use the repository template, add the required sections and checklist items, and document all significant changes beyond the four workflow stubs.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 85.45% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the workflow-stub synchronization, which matches the stated primary objective.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch standards-sync/workflows-20260727

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.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Jul 27, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Sync org-standard workflow stubs to latest next/stable channels

⚙️ Configuration changes 📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Update org-standard workflow stubs to newer moving-channel refs (v1/v2-next).
• Align dev-lead stub’s agent_ref with the selected channel.
• Fix pr-auto-review stub guidance comment to reference the correct channel.
Diagram

graph TD
  E([GitHub event]) --> AS["agent-shield.yml stub"] --> R1[["petry-projects/.github\nagent-shield-reusable@agent-shield/v2-next"]]
  E --> DR["dependabot-rebase.yml stub"] --> R2[["petry-projects/.github\ndependabot-rebase-reusable@dependabot-rebase/v2-next"]]
  E --> DL["dev-lead.yml stub"] --> R3[["petry-projects/.github-private\ndev-lead-reusable@dev-lead/v1-next"]]
  E --> PAR["pr-auto-review.yml stub"] --> R4[["petry-projects/.github\npr-auto-review reusable (channel doc) "]]
Loading
High-Level Assessment

The approach (thin stubs that delegate to centrally managed reusables via moving-channel tags) is consistent with org-standard workflow management. Alternatives like pinning to SHAs or version tags would reduce drift but conflict with the stated compliance/audit model that requires centrally movable channel refs.

Files changed (4) +5 / -5

Documentation (1) +1 / -1
pr-auto-review.ymlCorrect pr-auto-review channel guidance comment +1/-1

Correct pr-auto-review channel guidance comment

• Updates the stub’s guidance comment to reference '@pr-auto-review/v1-stable' instead of '@pr-auto-review/v1-next', clarifying the expected channel pinning policy.

.github/workflows/pr-auto-review.yml

Other (3) +4 / -4
agent-shield.ymlAdvance agent-shield reusable channel to v2-next +1/-1

Advance agent-shield reusable channel to v2-next

• Updates the 'uses:' reference from the 'agent-shield/stable' channel to 'agent-shield/v2-next', keeping the stub as a thin caller.

.github/workflows/agent-shield.yml

dependabot-rebase.ymlAdvance dependabot-rebase reusable channel to v2-next +1/-1

Advance dependabot-rebase reusable channel to v2-next

• Updates the 'uses:' reference from the 'dependabot-rebase/stable' channel to 'dependabot-rebase/v2-next' without changing local job configuration.

.github/workflows/dependabot-rebase.yml

dev-lead.ymlMove dev-lead reusable and agent_ref to v1-next +2/-2

Move dev-lead reusable and agent_ref to v1-next

• Switches the reusable workflow ref from 'dev-lead/stable' to 'dev-lead/v1-next' and updates 'with.agent_ref' to match, keeping the channel consistent through the caller.

.github/workflows/dev-lead.yml

@qodo-code-review

qodo-code-review Bot commented Jul 27, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 48 rules

Grey Divider


Action required

1. Caller-stub-freeze will fail ✓ Resolved 🐞 Bug ☼ Reliability
Description
.github/workflows/dev-lead.yml is covered by the ring-0 caller-stub-freeze guard, but this PR
changes the pinned uses: ref and agent_ref without regenerating the frozen baseline fixture and
updating the associated bats assertions, so caller-stub-freeze will report DRIFTED and fail CI.
Code

.github/workflows/dev-lead.yml[R64-66]

+    uses: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml@dev-lead/v1-next  # NOSONAR(githubactions:S7637) first-party channel ref
    with:
-      agent_ref: dev-lead/stable
+      agent_ref: dev-lead/v1-next
Relevance

●●● Strong

Stub-freeze drift guard is enforced; when refs change, fixtures/tests are updated to match.

PR-#1268
PR-#1195

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
lint.yml runs the caller-stub-freeze checks; after this PR, dev-lead.yml’s forwarding block
contains @dev-lead/v1-next, but the committed baseline fixture and the bats test assertions still
require @dev-lead/stable, so the byte-identity comparison will fail.

.github/workflows/dev-lead.yml[57-67]
tests/fixtures/caller-stub-freeze/dev-lead.block[1-20]
tests/caller_stub_freeze.bats[74-85]
.github/workflows/lint.yml[32-127]
AGENTS.md[201-214]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The PR repins the ring-0/self-host dev-lead caller stub to `dev-lead/v1-next`, but the caller-stub-freeze guard expects the extracted forwarding block to match a committed baseline under `tests/fixtures/caller-stub-freeze/`. Because the baseline and its bats test expectations still reference the old `@dev-lead/stable` pin, the `caller-stub-freeze` job will fail with DRIFTED.

### Issue Context
This repo’s `lint.yml` runs both `tests/caller_stub_freeze.bats` and `scripts/caller_stub_freeze.sh`, which compare the current extracted block against `tests/fixtures/caller-stub-freeze/dev-lead.block`.

### Fix
1. Regenerate the freeze fixtures:
  - Run: `bash scripts/caller_stub_freeze.sh --update`
  - Commit the updated `tests/fixtures/caller-stub-freeze/dev-lead.block` (and any other changed `.block` files).
2. Update `tests/caller_stub_freeze.bats` assertions to match the new `@dev-lead/v1-next` + `agent_ref: dev-lead/v1-next` strings.
3. (Optional but recommended) Update the inline comment in `.github/workflows/dev-lead.yml` that still describes the pin as `dev-lead/v1-stable`, so the stub documentation matches the actual pin.

### Fix Focus Areas
- .github/workflows/dev-lead.yml[57-67]
- tests/fixtures/caller-stub-freeze/dev-lead.block[1-20]
- tests/caller_stub_freeze.bats[74-85]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. pr-auto-review comment violates stub rules ✓ Resolved 📘 Rule violation § Compliance
Description
This PR modifies .github/workflows/pr-auto-review.yml beyond the documented allowed customization
(only workflow_run.workflows names), by editing the header guidance. The updated comment now
claims the reusable must remain on @pr-auto-review/v1-stable while the actual uses: line still
calls @pr-auto-review/v1-next, creating contradictory and potentially misleading in-file
instructions.
Code

.github/workflows/pr-auto-review.yml[11]

+#   • You MUST NOT change: the `@pr-auto-review/v1-stable` channel in the `uses:`
Relevance

●●● Strong

Same comment/ref mismatch in pr-auto-review was fixed and accepted previously.

PR-#1351

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
In .github/workflows/pr-auto-review.yml, the header text explicitly states that the stub is only
meant to be customized via workflow_run.workflows names and that the uses: channel must not be
changed; however, this PR edits that header guidance and the new wording references v1-stable
while the executable uses: reference in the same file remains pinned to v1-next. The presence of
these two conflicting statements in one workflow file demonstrates the “comment/ref skew” mismatch
pattern (previously called out as a maintenance hazard) and makes it unclear which ref is actually
intended.

Rule 2238422: Restrict changes to thin caller workflow files to documented inputs only
.github/workflows/pr-auto-review.yml[6-15]
.github/workflows/pr-auto-review.yml[53-53]
.github/workflows/pr-auto-review.yml[6-16]
.github/workflows/pr-auto-review.yml[47-55]
tests/test_safety_checks.bats[596-605]
PR-#1351

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`.github/workflows/pr-auto-review.yml` is intended to be a thin caller stub where only `workflow_run.workflows` names may be changed, but this PR edits the header comment/guidance. The edited comment also contradicts the workflow’s actual `uses:` ref by stating `@pr-auto-review/v1-stable` while the job still pins `@pr-auto-review/v1-next`, creating misleading guidance and reintroducing the known “comment/ref skew” hazard.

## Issue Context
The stub’s header explicitly restricts what is allowed to change and indicates the `uses:` channel should not be modified; keeping the comment guidance consistent with the actual pinned ref is important to prevent accidental drift and confusion for future edits. This PR changed only the comment line and not the `uses:` ref, producing the inconsistency.

Align on one intent and make both lines agree:
- If this repo should pin stable: change the `uses:` ref to `@pr-auto-review/v1-stable`.
- If this repo should pin next: revert the comment back to `@pr-auto-review/v1-next` (and keep the header within the allowed customization guidance).

## Fix Focus Areas
- .github/workflows/pr-auto-review.yml[6-16]
- .github/workflows/pr-auto-review.yml[47-55]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

3. dependabot-rebase reusable ref changed ✓ Resolved 📘 Rule violation § Compliance
Description
.github/workflows/dependabot-rebase.yml is documented as a thin caller stub whose reusable-workflow
uses: ref must not be changed (and is described as pinned to dependabot-rebase/v2-stable), but
this PR repoints it to dependabot-rebase/v2-next. This violates the stub’s documented constraints,
makes its own guidance misleading, and can introduce unreviewed behavior changes.
Code

.github/workflows/dependabot-rebase.yml[53]

+    uses: petry-projects/.github/.github/workflows/dependabot-rebase-reusable.yml@dependabot-rebase/v2-next  # NOSONAR(githubactions:S7637) first-party channel ref
Relevance

● Weak

Team recently introduced/updated dependabot workflow stubs and repinned refs as part of standards
changes.

PR-#1355
PR-#1195

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow’s header comment explicitly instructs maintainers that they “MUST NOT change” the
reusable-workflow uses: reference and describes the expected pinned channel as
dependabot-rebase/v2-stable, yet the PR changes the executable uses: line to point at
dependabot-rebase/v2-next. Because the code that actually runs is the uses: ref in the job
configuration, this mismatch shows the documented constraints have been violated and the
documentation is now stale relative to the workflow behavior.

Rule 2238422: Restrict changes to thin caller workflow files to documented inputs only
.github/workflows/dependabot-rebase.yml[6-17]
.github/workflows/dependabot-rebase.yml[48-56]
.github/workflows/dependabot-rebase.yml[6-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`dependabot-rebase.yml` is intended to be a thin caller stub with a centrally managed `uses:` reference that the file’s header explicitly says must not be changed, but the PR repoints the reusable-workflow call from the documented `dependabot-rebase/v2-stable` channel to `dependabot-rebase/v2-next`, creating both a policy violation and misleading guidance for future maintainers.

## Issue Context
The header comment documents that this caller stub is pinned to a specific moving channel and instructs maintainers not to repoint the `uses:` ref. The current change updates the actual job `uses:` line to a different channel (`v2-next`) than what the header claims (`v2-stable`), so either the change should be reverted to comply with the documented “must not change” constraint, or the documentation/policy needs to be updated to match the intended channel.

## Fix Focus Areas
- .github/workflows/dependabot-rebase.yml[6-17]
- .github/workflows/dependabot-rebase.yml[48-56]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. agent-shield reusable ref changed 📘 Rule violation § Compliance
Description
.github/workflows/agent-shield.yml is documented as a thin caller stub where the uses: line must
not be changed, but this PR repoints the reusable ref to a different channel. This can cause drift
from the approved stub contract and unexpected behavior changes outside the allowed with: inputs.
Code

.github/workflows/agent-shield.yml[33]

+    uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@agent-shield/v2-next  # NOSONAR(githubactions:S7637) first-party channel ref
Relevance

● Weak

Repo frequently repins workflow stub uses: refs (e.g., agent-shield) during standards/ring
migrations.

PR-#923
PR-#1195

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow header states You MUST NOT change: trigger events, the uses: line, or the job name,
but the PR changes the uses: ref for the agent-shield job.

Rule 2238422: Restrict changes to thin caller workflow files to documented inputs only
.github/workflows/agent-shield.yml[6-13]
.github/workflows/agent-shield.yml[31-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`agent-shield.yml` is a thin caller stub whose header explicitly disallows changes to the `uses:` line, but the PR changes it from the previous channel.

## Issue Context
Per the workflow header, only specific `with:` inputs may be customized; triggers/job name/`uses:` must remain unchanged.

## Fix Focus Areas
- .github/workflows/agent-shield.yml[6-13]
- .github/workflows/agent-shield.yml[31-33]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread .github/workflows/pr-auto-review.yml Outdated
Comment thread .github/workflows/dev-lead.yml Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

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

Agent reasoning
Issues addressed: 0
Files changed: .github/workflows/agent-shield.yml, .github/workflows/dev-lead.yml, .github/workflows/pr-auto-review.yml, AGENTS.md, scripts/seed-repo-template.sh, tests/test_seed_repo_template.bats
Skipped (informational): 0
Status: Quality Gate passed with 0 new issues — no action required
```
The SonarCloud Quality Gate passed with zero actionable issues. No code changes are needed at this time.

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 02:47
@don-petry
don-petry disabled auto-merge August 3, 2026 02:54
@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 02:56
@don-petry
don-petry disabled auto-merge August 3, 2026 03:00
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (applied)

Changes committed and pushed.

@don-petry

don-petry commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Dependency Advisory

Package Change Ecosystem Risk Notes
bats added @ 1.13.0 npm LOW Well-maintained shell testing framework; devDependency only, no transitive deps

Risk Legend

  • LOW — Patch/minor bump, lockfile regeneration, well-maintained package
  • MEDIUM — Minor bump with new APIs, new direct dependency, deprecation notice
  • HIGH — Major version bump, package with recent CVE, unusual transitive deps
  • CRITICAL — Active CVE, known supply-chain risk, abandoned package

Details

All dependency changes appear low-risk. No action required.

Additional context: This PR introduces the first package.json and package-lock.json to this repo. A few low-friction observations for the reviewer:

  • bats (Bash Automated Testing System) is the de-facto standard for shell unit testing, actively maintained under the bats-core org, MIT licensed, and has no transitive dependencies in this lockfile. Appropriate choice for a repo centered on shell scripts.
  • The lockfile integrity hash (sha512-giSYKGTOcPZyJDbfbTtzAedLcNWdjCLbXYU3/MwPnjyvDXzu6Dgw8d2M+8jHhZXSmsCMSQqCp+YBsJ603UO4vQ==) is the correct format (base64-encoded SHA-512); reviewers should confirm it matches the published npm registry value if this repo enforces supply-chain integrity checks (e.g., via npm audit or a provenance step in CI).
  • "private": true in package.json prevents accidental publishing to the npm registry — correct for this use case.
  • If CI does not yet run npm ci before invoking bats, a workflow step will be needed to install the dependency.

@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

1 similar comment
@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1378
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-08-12T22:43:35Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-08-12T22:43:35Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

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

Agent reasoning
Issues addressed: 0
- Quality Gate Passed (0 new issues, 0 hotspots, 0% duplication)
Files changed: n/a
Skipped (informational): 0
```

@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

1 similar comment
@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 12, 2026

@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 (6)
scripts/dev-lead-fix-reviews.sh (1)

2735-2883: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove duplicate helper definitions.

scripts/dev-lead-fix-reviews.sh still contains seven definitions of post_reviews_rate_limited and multiple definitions of the other helpers. Keep one definition of each helper, then rerun the repository ShellCheck command. ShellCheck currently reports zero warnings.

🤖 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/dev-lead-fix-reviews.sh` around lines 2735 - 2883, Remove the
duplicate definitions of post_reviews_rate_limited and the other helper
functions in the script, retaining exactly one canonical definition of each
helper and preserving its current behavior. Then rerun the repository’s
ShellCheck command and resolve any warnings introduced by the cleanup, keeping
the result warning-free.

Source: Coding guidelines

.github/workflows/pr-review.yml (1)

106-119: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Key check_suite concurrency by head_sha, not the first PR number.

CHECK_SUITE_PRS reviews every associated PR, but concurrency.group uses only pull_requests[0]. A suite containing PR A and PR B is keyed to A, while a direct event for B uses B's group. Both runs can process B concurrently. Use a common head_sha group for SHA-bearing events, or create per-PR jobs with per-PR concurrency.

🤖 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 @.github/workflows/pr-review.yml around lines 106 - 119, Update the
concurrency group expression around the PR URL and SHA fallbacks so check_suite
events are keyed by github.event.check_suite.head_sha rather than
pull_requests[0].number. Ensure SHA-bearing check_suite and direct pull_request
events resolve to the same group for the same commit, while preserving the
existing client_payload and PR URL fallbacks.
scripts/engine.sh (4)

3061-3073: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Redact engine output before it reaches the workflow log

run_writer streams raw output through tee, and the workflow invokes the dev-lead scripts directly. Therefore, secrets can reach the Actions log before the later redaction step. Redact stdout before publishing it while retaining the raw capture for rate-limit detection.

🤖 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/engine.sh` around lines 3061 - 3073, Update run_writer so streamed
stdout is passed through the same secret-redaction patterns before tee publishes
it to the workflow log, while preserving the unredacted capture used for
rate-limit detection. Keep the existing redaction behavior anchored to
redact_secrets and ensure only published output is sanitized, not the raw
diagnostic data.

2778-2792: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Clear the rate-limit reset sidecar before fallback attempts.

run_writer_with_fallback can return 2 after skipping every engine without updating /tmp/dev-lead-rate-limit-reset. Clear this sidecar at wrapper entry so retry markers do not use a timestamp from an earlier attempt.

🤖 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/engine.sh` around lines 2778 - 2792, Update the
run_writer_with_fallback wrapper to remove or reset
/tmp/dev-lead-rate-limit-reset immediately on entry, before any fallback engine
attempts or early returns. Preserve the existing failure-reason handling and
return codes.

2004-2031: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Validate the verdict schema in both fast paths.

jq empty accepts null, arrays, and objects without decision, so malformed verdicts can pass extraction. Use an object-and-decision predicate in both fast paths. extract_verdict_json is defined twice at lines 2004 and 3244; update the active definition or remove the duplicate.

🤖 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/engine.sh` around lines 2004 - 2031, Update both fast-path
validations in extract_verdict_json to require a JSON object containing the
decision field, rather than accepting any jq-valid JSON. Apply the same
predicate to the duplicate extract_verdict_json definition or remove the
duplicate, ensuring the active implementation rejects null, arrays, and objects
without decision.

2046-2058: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Protect the fixed sidecar paths from symlink writes.

The fixed /tmp paths use shell redirection after rm -f. A process with runner access can race these operations or pre-create a symlink before the first write. This affects reset, failure, timeout, and session-output sidecars.

Use an owner-only state directory with atomic, no-follow writes. Update all readers while preserving their contract.

🤖 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/engine.sh` around lines 2046 - 2058, Replace the fixed /tmp sidecar
files used by the reset, failure, timeout, and session-output flows with files
inside an owner-only state directory, creating it securely if needed. Update
every corresponding reader and writer to use the new paths, and perform writes
atomically with no symlink following rather than shell redirection after rm -f;
preserve each existing reader’s contract and sidecar contents.

Source: Linters/SAST tools

🤖 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/workflows/dependabot-automerge.yml:
- Line 38: Remove the NOSONAR annotation from the reusable workflow reference in
the thin caller stub, leaving the first-party channel reference
dependabot-automerge/v2-next unchanged.

In @.github/workflows/pr-review.yml:
- Around line 428-496: Remove two of the three duplicate “Verify auth scopes”
steps in the job, keeping exactly one complete self-contained step with the
existing auth and scope validation logic. Ensure the remaining step still runs
once and preserve its current behavior and diagnostics.
- Around line 422-426: In the review job, remove the duplicate Claude CLI cache
steps surrounding “Cache claude-code CLI,” leaving exactly one cache step for
~/.npm-global with the existing key. Ensure the retained actions/cache reference
uses version v6.1.0.

In `@scripts/dev-lead-fix-reviews.sh`:
- Around line 1084-1169: Remove the duplicated appended blocks: in
scripts/dev-lead-fix-reviews.sh#L1084-L1169 delete the duplicate commit_and_push
while retaining post_reviews_terminal; in
scripts/dev-lead-fix-reviews.sh#L1423-L1720 delete the shadowed
NOOP_MARKER_PREFIX, pr_nets_to_zero, flag_noop_pr,
expire_stale_terminal_markers, expire_stale_rate_limited_marker,
post_reviews_rate_limited, and handle_rate_limit; in
scripts/dev-lead-fix-reviews.sh#L2045-L2276 delete the shadowed expire_*,
post_reviews_rate_limited, handle_rate_limit, and detect_conflicting_paths
definitions; and in scripts/dev-lead-fix-ci.sh#L192-L231 delete the duplicate
post_rate_limited, preserving the earlier definitions. Inspect the rest of the
PR for any other appended duplicate blocks.

---

Outside diff comments:
In @.github/workflows/pr-review.yml:
- Around line 106-119: Update the concurrency group expression around the PR URL
and SHA fallbacks so check_suite events are keyed by
github.event.check_suite.head_sha rather than pull_requests[0].number. Ensure
SHA-bearing check_suite and direct pull_request events resolve to the same group
for the same commit, while preserving the existing client_payload and PR URL
fallbacks.

In `@scripts/dev-lead-fix-reviews.sh`:
- Around line 2735-2883: Remove the duplicate definitions of
post_reviews_rate_limited and the other helper functions in the script,
retaining exactly one canonical definition of each helper and preserving its
current behavior. Then rerun the repository’s ShellCheck command and resolve any
warnings introduced by the cleanup, keeping the result warning-free.

In `@scripts/engine.sh`:
- Around line 3061-3073: Update run_writer so streamed stdout is passed through
the same secret-redaction patterns before tee publishes it to the workflow log,
while preserving the unredacted capture used for rate-limit detection. Keep the
existing redaction behavior anchored to redact_secrets and ensure only published
output is sanitized, not the raw diagnostic data.
- Around line 2778-2792: Update the run_writer_with_fallback wrapper to remove
or reset /tmp/dev-lead-rate-limit-reset immediately on entry, before any
fallback engine attempts or early returns. Preserve the existing failure-reason
handling and return codes.
- Around line 2004-2031: Update both fast-path validations in
extract_verdict_json to require a JSON object containing the decision field,
rather than accepting any jq-valid JSON. Apply the same predicate to the
duplicate extract_verdict_json definition or remove the duplicate, ensuring the
active implementation rejects null, arrays, and objects without decision.
- Around line 2046-2058: Replace the fixed /tmp sidecar files used by the reset,
failure, timeout, and session-output flows with files inside an owner-only state
directory, creating it securely if needed. Update every corresponding reader and
writer to use the new paths, and perform writes atomically with no symlink
following rather than shell redirection after rm -f; preserve each existing
reader’s contract and sidecar contents.
🪄 Autofix

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 62281d96-7a51-4012-84fb-f25da4123e46

📥 Commits

Reviewing files that changed from the base of the PR and between 4d43d12 and 953fc1a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • .github/workflows/dependabot-automerge.yml
  • .github/workflows/pr-review.yml
  • .github/workflows/test-dev-lead.yml
  • .gitignore
  • prompts/shared.md
  • scripts/dev-lead-fix-ci.sh
  • scripts/dev-lead-fix-reviews.sh
  • scripts/engine.sh
  • scripts/review-one-pr.sh
  • tests/test_dependabot.bats

Comment thread .github/workflows/dependabot-automerge.yml Outdated
Comment thread .github/workflows/pr-review.yml Outdated
Comment thread .github/workflows/pr-review.yml Outdated
Comment thread scripts/dev-lead-fix-reviews.sh Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1378
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-08-12T23:11:32Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-08-12T23:11:32Z

@donpetry-bot

donpetry-bot commented Aug 12, 2026

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

Review — fix requested (cycle 1/3)

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

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 9094e3126ed9a8f6f27631f936076052c7af24bf
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

This PR is labeled a verbatim sync of 4 thin caller-stub workflows but is actually a 3609+/563- change across 26 files that rewrites core automation. It INTRODUCES large-scale function-definition duplication into two security-adjacent scripts: scripts/engine.sh goes from 29 defs (0 duplicates) on main to 64 defs with 13 names redefined up to 7x, and scripts/dev-lead-fix-reviews.sh from 22 defs (0 dup) to 47 with ~10 names redefined up to 5x, and prompts/cascade-action.md gains duplicate 'Cross-engine agreement' sections (2 -> 4) -- classic generation/concatenation artifacts that shellcheck and CI do not catch (bash last-definition-wins). Escalating on a structural gate failure, not a security exposure: triage's two security signals do not hold up -- pr-review.yml did NOT remove the 'Verify auth scopes' guardrail (main had it TWICE, this PR de-duplicates to one, still present at line 278), and evals/validate-cases.py duplication was actually FIXED here; no secrets/injection/auth vulns found, PAT redaction and API-key handling in engine.sh are intact, so the Tier-3 security audit is not needed. Note: 8 downstream consumer repos pin the changed dev-lead-reusable.yml/pr-review.yml (.github, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets, and this repo), so the corrupt scripts would propagate on the next channel promotion. run_secret_scanning MCP tool was not available in this environment; relied on the passing gitleaks CI check.

Downstream impact

This change is consumed by 8 downstream repo(s) that pin the affected reusable workflow / lib / prompt. Impacted consumers:

Impacted shared surfaces:
  - .github/workflows/dev-lead-reusable.yml
  - .github/workflows/pr-review.yml

Impacted consumers (8, fetching up to 10):
  - petry-projects/.github (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/.github-private (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review-canary.yml
      .github/workflows/pr-review-trigger.yml
      .github/workflows/test-dev-lead.yml
  - petry-projects/ContentTwin (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/TalkTerm (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/bmad-bgreat-suite (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/broodly (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/google-app-scripts (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/markets (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml

Findings

  • MAJOR: scripts/engine.sh introduces duplicate function definitions absent on main (base: 29 defs, 0 duplicate names; head: 64 defs, 13 names redefined -- parse_reset_time x7, parse_reset_time_files x7, _emit_reset_iso x6, _claude_chain_invoke/_gemini_invoke/_gemini_chain_invoke/copilot_chat/_record_engine_tokens/_mcp_review_flags/is_transient_failure/run_writer x3, extract_verdict_json/run_writer_with_fallback x2). This is a generation/concatenation artifact in the engine-invocation script that handles credentials and PAT redaction. Bash last-definition-wins keeps it from failing CI/shellcheck, but the file is corrupt: ~half is redundant, and if any copy diverges the effective (last) version silently wins. Must be regenerated cleanly before merge. (scripts/engine.sh)
  • MAJOR: scripts/dev-lead-fix-reviews.sh introduces duplicate function definitions absent on main (base: 22 defs, 0 duplicate names; head: 47 defs). handle_rate_limit, post_reviews_rate_limited, expire_stale_terminal_markers, expire_stale_rate_limited_marker each defined 5x; detect_conflicting_paths, pr_nets_to_zero, flag_noop_pr 3x; commit_and_push, post_reviews_terminal, has_reviews_rate_limited_marker 2x. This script has contents:write and posts PR reviews / commits / pushes, so a wrong-version-wins outcome is behavior-affecting. Same concatenation-artifact root cause as engine.sh; regenerate cleanly. (scripts/dev-lead-fix-reviews.sh)
  • MINOR: prompts/cascade-action.md adds duplicate '### Cross-engine agreement (if deep+duck)' sections: main has 2 occurrences, head has 4 (two identical blocks added at ~line 62). Another artifact of the same broken generation pass; dedupe to a single section. (prompts/cascade-action.md:62)
  • MINOR: PR title/body claim a verbatim sync of 4 thin caller-stub workflows (dev-lead.yml, agent-shield.yml, dependabot-rebase.yml, pr-auto-review.yml) 'deployed verbatim', but the actual diff is 3609 additions / 563 deletions across 26 files and rewrites core scripts (engine.sh +2073, dev-lead-fix-reviews.sh +1261) plus new scripts (list-prs.sh, review-one-pr.sh). The description materially understates scope, which undermines review integrity and suggests scripts/deploy-standard-workflows.sh (or the upstream standards/ source) produced corrupt, duplicated output.
  • INFO: Triage signal 'pr-review.yml removes 75-line Verify auth scopes step' does NOT hold: main/pr-review.yml contains the 'Verify auth scopes' step TWICE (pre-existing duplicate); this PR removes one copy, and the guardrail remains present at head (line 278), including fine-grained-PAT detection and repo/read:org + contents/pull_requests:write scope validation. This is a de-duplication, not a guardrail removal. Likewise evals/validate-cases.py duplicate validate_file/validate_directory functions were REMOVED (fixed) by this PR (head is clean, single defs). (.github/workflows/pr-review.yml:278)
  • INFO: .gitleaksignore re-fingerprints the same framework test-fixture files (dummy/sample API keys in the git-subtree) from commit 68ab310 to 95fe0d4 -- no new real-secret suppression is added; the gitleaks CI check passed. .gitignore adds '.backup' (comment references chore: sync 4 org-standard workflow stub(s) from petry-projects/.github #1378), plausibly to hide backup artifacts left by the generation pass; benign but worth confirming no '.backup' files were committed. (.gitleaksignore)
  • INFO: CI is fully green (shellcheck, ShellCheck, SonarCloud, CodeQL python+actions, gitleaks secret scan, actionlint, bats, caller-stub-freeze all SUCCESS). CANCELLED checks are superseded prior runs, not failures. Note the green status is misleading here: no linter flags bash function redefinition, so the duplication corruption passes all gates -- this is exactly why it needs human/deep review before merge.
  • INFO: Downstream impact (informational): 8 consumer repos pin the changed shared surfaces .github/workflows/dev-lead-reusable.yml and/or pr-review.yml -- petry-projects/.github, .github-private, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets. No caller-input interface break detected (stub with:/uses: forwarding unchanged; caller-stub-freeze passed), but the corrupt engine.sh/dev-lead-fix-reviews.sh would reach these consumers on the next channel-tag promotion, so fixing the duplication before merge matters org-wide.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + 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 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 9094e3126ed9a8f6f27631f936076052c7af24bf — 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: 9094e3126ed9a8f6f27631f936076052c7af24bf
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

Triage's top signal (auth-scope deletion from pr-review.yml) is a FALSE ALARM: the head file retains one complete 'Verify auth scopes' step with full FGPAT + scope logic; the diff only removed a duplicated block. However, scripts/dev-lead-fix-reviews.sh at head is malformed — it contains 5 diverging copies of post_reviews_rate_limited/handle_rate_limit/expire_stale_terminal_markers/expire_stale_rate_limited_marker (and 2-3 copies of others); in bash only the last definition runs, so the rest are dead, divergent code. This is a corrupted/mis-generated file that ships to 8 downstream consumers via the dev-lead reusable workflow, so it should be fixed before merge even though CI (shellcheck/bats) passes. Not a security issue — no Tier 3 audit needed.

Downstream impact

This change is consumed by 8 downstream repo(s) that pin the affected reusable workflow / lib / prompt. Impacted consumers:

Impacted shared surfaces:
  - .github/workflows/dev-lead-reusable.yml
  - .github/workflows/pr-review.yml

Impacted consumers (8, fetching up to 10):
  - petry-projects/.github (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/.github-private (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review-canary.yml
      .github/workflows/pr-review-trigger.yml
      .github/workflows/test-dev-lead.yml
  - petry-projects/ContentTwin (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/TalkTerm (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/bmad-bgreat-suite (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/broodly (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/google-app-scripts (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/markets (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml

Findings

  • MAJOR: scripts/dev-lead-fix-reviews.sh (2523 lines) contains massive top-level function duplication at PR head: post_reviews_rate_limited x5, handle_rate_limit x5, expire_stale_terminal_markers x5, expire_stale_rate_limited_marker x5, pr_nets_to_zero/flag_noop_pr/detect_conflicting_paths x3, post_reviews_terminal/has_reviews_rate_limited_marker/commit_and_push x2. The copies DIVERGE (e.g. copy 1 of post_reviews_rate_limited includes an '' marker copy 2 lacks). In bash the last definition wins, so earlier copies are dead code and the effective behavior is whatever the final copy contains. shellcheck does not flag redefinition, so CI green does not clear this. Strongly indicates a broken merge/generation. Fix before merge. (scripts/dev-lead-fix-reviews.sh:772)
  • INFO: Triage signal 'deletes auth scope verification (75 lines) from pr-review.yml' is a FALSE ALARM. The head pr-review.yml retains exactly one 'Verify auth scopes' step (line 278) containing the full fine-grained-PAT detection and read:org/contents/pull_requests scope validation (15 auth markers present). The diff's deletion at old-line 344 removed a DUPLICATE block; the PR de-duplicated the workflow rather than removing auth verification. No security regression. (.github/workflows/pr-review.yml:278)
  • MINOR: PR title 'chore: sync 4 org-standard workflow stub(s)' understates the change: the diff includes +2073/-230 in scripts/engine.sh, +1261/-11 in scripts/dev-lead-fix-reviews.sh, and new scripts (review-one-pr.sh, list-prs.sh). The body's CodeAnt/CodeRabbit sections do describe engine-fallback/rate-limit work, but the CodeRabbit summary claim 'Added stronger authentication-scope checks' is misleading given the auth step was de-duplicated, not strengthened.
  • INFO: .gitleaksignore change re-fingerprints the same dummy/test API keys in framework subtree fixtures to a new subtree-import commit SHA (95fe0d4). Same files, same non-credential test data — benign suppression update, not new secret exposure. (.gitleaksignore)
  • INFO: Informational: this PR changes shared surfaces .github/workflows/dev-lead-reusable.yml and pr-review.yml, pinned by 8 consumer repos (.github, .github-private, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets). dev-lead-fix-reviews.sh feeds the dev-lead reusable workflow, so its malformed state (see major finding) would propagate to these consumers. Downstream impact alone is not an escalation trigger, but it raises the stakes on fixing the duplicated-function defect first.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + 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 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 0bdc72cb7991ccce81988f9c7bd48027335d82ac — 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: 9094e3126ed9a8f6f27631f936076052c7af24bf
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

This standards-sync PR introduces catastrophic wholesale duplication into two shared shell libraries consumed by dev-lead-reusable.yml (8 downstream consumers): scripts/dev-lead-fix-reviews.sh nearly doubled (1273 to 2523 lines) with functions like post_reviews_rate_limited and expire_stale_terminal_markers defined 5x each, and scripts/engine.sh (1583 to 3426 lines) with parse_reset_time defined 7x. This is not a runtime parse error as triage suggested (bash allows redefinition; ShellCheck/bats/SonarCloud all pass), but at least one duplicate diverges (post_reviews_rate_limited copy at line 1200 drops the dev-lead rate-limit-ack marker), so behavior depends on source ordering under last-wins semantics -- a botched merge/generation and a correctness+maintainability blocker on a shared surface. No security issues found: the pr-review.yml -75 lines is a de-duplication that preserves auth-scope verification, the .gitleaksignore change only re-points existing fake-key test fixtures to a new subtree SHA, and workflow ref/version changes are benign; MCP run_secret_scanning was unavailable but gitleaks CI passed.

Downstream impact

This change is consumed by 8 downstream repo(s) that pin the affected reusable workflow / lib / prompt. Impacted consumers:

Impacted shared surfaces:
  - .github/workflows/dev-lead-reusable.yml
  - .github/workflows/pr-review.yml

Impacted consumers (8, fetching up to 10):
  - petry-projects/.github (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/.github-private (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review-canary.yml
      .github/workflows/pr-review-trigger.yml
      .github/workflows/test-dev-lead.yml
  - petry-projects/ContentTwin (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/TalkTerm (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/bmad-bgreat-suite (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/broodly (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/google-app-scripts (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/markets (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml

Findings

  • CRITICAL: scripts/dev-lead-fix-reviews.sh: top-level function definitions duplicated wholesale by this PR (file grew 1273->2523 lines). post_reviews_rate_limited, handle_rate_limit, expire_stale_terminal_markers, expire_stale_rate_limited_marker each defined 5x; has_reviews_rate_limited_marker 2x; pr_nets_to_zero/flag_noop_pr/detect_conflicting_paths 3x. Base file had exactly 1 definition each, so the duplication is introduced here (botched merge/regeneration).
  • MAJOR: Divergent duplicate: the post_reviews_rate_limited copy at line 1200 omits the '' HTML marker present in the other 4 copies. Because bash uses last-definition-wins, runtime behavior is decided by accidental source ordering, and the divergent copy is silent dead code that could mask an intended edit.
  • CRITICAL: scripts/engine.sh: same wholesale duplication (file grew 1583->3426 lines). parse_reset_time and parse_reset_time_files defined 7x, _emit_reset_iso 6x, run_writer/is_transient_failure/copilot_chat/_record_engine_tokens/_gemini_invoke and others 3x. Base had 1 definition each. This is a shared engine library invoked by dev-lead-reusable.yml and pr-review.yml, both pinned by 8 downstream consumer repos.
  • MINOR: PR title claims a 4-stub thin-caller sync, but the diff carries 3609 additions dominated by 1261+ and 2073+ line changes to two shell libraries. The size/label (XXL) and description are misaligned with the actual (defective) content; the duplication was not caught by ShellCheck, bats, or SonarCloud because none flag same-file bash function redefinition.
  • INFO: Impacted shared surfaces: .github/workflows/dev-lead-reusable.yml and .github/workflows/pr-review.yml, pinned by 8 consumers (petry-projects/.github, .github-private, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets). These consumers execute the duplicated engine.sh/dev-lead-fix-reviews.sh, so the defect propagates org-wide once merged. Informational only; the escalation is driven by the structural defect itself, not by fan-out.
  • INFO: No security regression found. pr-review.yml's removed 75 lines were a duplicated 'Cache claude-code CLI' + 'Verify auth scopes' step pair (base had both at 272/278 and 347/353); auth-scope + fine-grained-PAT verification is preserved at line 278. .gitleaksignore only migrates existing frameworks test-fixture fake-key fingerprints to subtree commit 95fe0d4. MCP run_secret_scanning tool was not available in this environment; gitleaks CI check passed.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + 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.

@codeant-ai

codeant-ai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1378
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-08-13T21:36:10Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-08-13T21:36:10Z

@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

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

Agent reasoning
Issues addressed: 0
- Quality Gate passed with 0 new issues, 0 hotspots, 0 duplications
Files changed: None
Skipped (informational): 0
```

@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: 0bdc72cb7991ccce81988f9c7bd48027335d82ac
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

Standards-sync PR (XXL) updating org workflows and review-pipeline scripts. Triage's primary concern — removal of the auth-scope verification block from pr-review.yml — is a false alarm: the PR base (remote main) contained two byte-identical 'Verify auth scopes' blocks and this PR removes one duplicate; the full check remains intact in the head (line ~278) and the workflow_call interface is byte-identical base-vs-head, so the 8 downstream consumers are unaffected. The .gitleaksignore edit merely re-fingerprints the same known fake test-fixture keys against a new subtree-import commit SHA (not a new secret), and the large engine.sh/dev-lead-fix-reviews.sh refactors show no security anti-patterns; all CI (shellcheck, CodeQL, SonarCloud, gitleaks, CodeRabbit) is green.

Downstream impact

This change is consumed by 8 downstream repo(s) that pin the affected reusable workflow / lib / prompt. Impacted consumers:

Impacted shared surfaces:
  - .github/workflows/dev-lead-reusable.yml
  - .github/workflows/pr-review.yml

Impacted consumers (8, fetching up to 10):
  - petry-projects/.github (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/.github-private (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review-canary.yml
      .github/workflows/pr-review-trigger.yml
      .github/workflows/test-dev-lead.yml
  - petry-projects/ContentTwin (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/TalkTerm (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/bmad-bgreat-suite (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/broodly (pins .github/workflows/dev-lead-reusable.yml)
      .github/workflows/dev-lead.yml
  - petry-projects/google-app-scripts (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml
  - petry-projects/markets (pins .github/workflows/dev-lead-reusable.yml,.github/workflows/pr-review.yml)
      .github/workflows/dev-lead.yml
      .github/workflows/pr-review.yml

Findings

  • INFO [security] .github/workflows/pr-review.yml:278: pr-review.yml removes a DUPLICATE inlined 'Verify auth scopes' step (base had 2 identical blocks; head retains 1 complete block at ~line 278). Fine-grained-PAT detection and repo/read:org + contents/pull_requests scope validation are fully preserved. Not a security regression.
  • INFO [compatibility] .github/workflows/pr-review.yml: Reusable workflow_call interface (inputs/secrets) is byte-identical between base and head; the 8 downstream consumer repos pinning pr-review.yml/dev-lead-reusable.yml (petry-projects/.github, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets, .github-private) remain backward compatible. Downstream impact is informational only.
  • INFO [secret] .gitleaksignore: .gitleaksignore change re-fingerprints the same 5 known fake test-fixture API keys (same files/lines/rule generic-api-key) against subtree re-import commit 95fe0d4; not masking any new/real credential. gitleaks CI passed.
  • INFO [maintainability]: Large refactor of scripts/engine.sh (+2073) and scripts/dev-lead-fix-reviews.sh (+1261) plus new list-prs.sh/review-one-pr.sh orchestration. Added lines contain no eval/curl|bash/token-echo smells; shellcheck, CodeQL(actions,python), SonarCloud, CodeRabbit all green.
  • INFO [process]: run_secret_scanning MCP tool not available in this environment; skipped per instructions. Advisory bots yielded no actionable findings (Codex usage-limited, Gemini unsupported file types, SonarCloud quality gate passed).

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). 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

size:XXL This PR changes 1000+ lines, ignoring generated files standards-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants