Skip to content

feat: implement issue #2050 — dev-lead-retry runs from main but dispatches to the stable-pinned harness: every fix-bot-comment retry has failed since #2017 merged (17 failures in 3 h) - #2083

Merged
don-petry merged 6 commits into
mainfrom
dev-lead/issue-2050-20261009-0135
Oct 9, 2026
Merged

don-petry merged 6 commits into
mainfrom
dev-lead/issue-2050-20261009-0135

Conversation

@don-petry

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

Copy link
Copy Markdown
Collaborator

Problem

dev-lead-retry runs from main but dispatches to the stable-pinned harness: every fix-bot-comment retry has failed since #2017 merged (17 failures in 3 h)

From the issue: .github/workflows/dev-lead-retry.yml checks out and runs scripts/dev-lead-retry.sh from main. The runs it dispatches execute the harness at the pinned channel, dev-lead/v139-stable. When a change to the sweep and the matching change to the harness merge together, the sweep starts sending a payload the pinned harness cannot read, and every such run fails until the channel catches up.

Risk

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

Test plan

Tests added/updated: tests/dev-lead/unit/test_dev_lead_retry_channel.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

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

Closes #2050

View guided diff Turn on auto-fix

…tches to the stable-pinned harness: every fix-bot-comment retry has failed since #2017 merged (17 failures in 3 h)
@don-petry
don-petry requested a review from a team as a code owner October 9, 2026 01:59
@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 9, 2026 •

Copy link
Copy Markdown

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 30 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: 4f0413c8-0829-474d-8e8a-493d39fef259
📥 Commits

Reviewing files that changed from the base of the PR and between df4bb51 and f2b0c33.

📒 Files selected for processing (3)
  • .github/workflows/dev-lead-retry.yml
  • AGENTS.md
  • tests/dev-lead/unit/test_dev_lead_retry_channel.bats
  • Autopilot · 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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds documentation to AGENTS.md regarding the ordering of new client_payload fields from dispatching sweeps to prevent channel skew, and introduces a new BATS test suite (test_dev_lead_retry_channel.bats) to validate the channel-skew guard. The review feedback recommends replacing generic non-zero exit code checks (-ne 0) in the BATS tests with assertions for specific expected exit codes (such as -eq 1) to prevent tests from falsely passing on unexpected errors like syntax or command-not-found issues.

Comment thread tests/dev-lead/unit/test_dev_lead_retry_channel.bats Outdated
Comment thread tests/dev-lead/unit/test_dev_lead_retry_channel.bats Outdated
Comment thread tests/dev-lead/unit/test_dev_lead_retry_channel.bats Outdated
@codeant-ai

codeant-ai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; the retry sweep checks out its scripts at the channel pinned by the default-branch workflow stub.
  • The workflow fails on missing or malformed channel pins, and the added tests cover pin parsing and checkout order.

Assessed commit: 0984364d5b79

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread tests/dev-lead/unit/test_dev_lead_retry_channel.bats
Comment thread AGENTS.md Outdated
Comment thread .github/workflows/dev-lead-retry.yml
Comment thread tests/dev-lead/unit/test_dev_lead_retry_channel.bats Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

Existing test changed without justification — human attention needed

The review-changes pass changed, deleted, or skipped existing test(s) to go with its fix: tests/dev-lead/unit/test_dev_lead_retry_channel.bats. A previously-passing test that disagrees with a change is a reason to question the change, not to edit the test, so dev-lead did not push this pass (#2013).

If the test really is wrong, a human should make that call, or the fix should carry a Test-Change-Justification: commit trailer that cites the reason (for example, the review comment that asked for it). Auto-merge has been disabled.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-09T03:13:13Z.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Existing test changed without justification — human attention needed

The fix-bot-comment pass changed, deleted, or skipped existing test(s) to go with its fix: tests/dev-lead/unit/test_dev_lead_retry_channel.bats. A previously-passing test that disagrees with a change is a reason to question the change, not to edit the test, so dev-lead did not push this pass (#2013).

If the test really is wrong, a human should make that call, or the fix should carry a Test-Change-Justification: commit trailer that cites the reason (for example, the review comment that asked for it). Auto-merge has been disabled.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

This is a CodeRabbit OSS review rate-limit notice. No code findings are present in this comment — it is purely an operational notice that the free review quota has been exhausted and will reset after the specified time window.

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

Copy link
Copy Markdown
Collaborator Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 9, 2026 03:38
@don-petry

Copy link
Copy Markdown
Collaborator Author

CodeRabbit rate-limit notice: this is an operational notice indicating the OSS review limit was reached. The actual code findings are from cubic-dev-ai and have been addressed in commit 5697f22.

- tests: assert the exact failure status (exit 1) instead of any non-zero,
  so grep or resolve-step errors cannot pass the negative tests; skip the
  file locally when yq is missing, but fail in CI.
- AGENTS.md: describe the #2017 skew as the pre-backstop failure and note
  the ordering still matters for target repos pinned to an older channel.
- dev-lead-retry.yml: document that one pin covers the whole sweep
  (per-target-repo resolution tracked in #2086).

Test-Change-Justification: review threads on #2083 (gemini-code-assist and cubic) asked for exact exit-status assertions and a yq guard in this PR's own new test file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019K6UsD7r25pAcRjJL3G6Kx
@don-petry

Copy link
Copy Markdown
Collaborator Author

dev-lead is withholding action on this item.

It is labeled dev-lead:hands-off (deliberately kept off-limits to dev-lead (e.g. changes to the dev-lead automation itself)), so dev-lead will not pick it up while that label is present. This notice is posted once so the withhold is visible rather than looking like a stalled run.

To re-enable automated pickup: remove the dev-lead:hands-off label.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@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: c7f6133e3b62048adaa627d7d06c4e5d9551b9eb
Review mode: triage-approved (single reviewer)

Summary

Pins the dev-lead retry sweep to the release it dispatches to. dev-lead-retry.yml now sparse-checks-out dev-lead.yml from the default branch, reads its agent_ref, checks it against ^dev-lead/v[0-9]+-(next|ring0|ring1|stable)$, and checks out scripts/ at that channel instead of main. The PR also adds the payload-field ordering rule to AGENTS.md and a 9-case bats suite. Risk is MEDIUM because this changes GitHub Actions workflow behaviour that only runs after merge. The change adds no new secret handling: the checkout token expression and persist-credentials: false match the existing checkout step. The resolved ref goes only into a with: input, never into a run: script, and the regex check rules out injection.

Linked issue analysis

Closes #2050.

  • AC1 (main fix): done. The sweep now runs at the channel that dev-lead.yml pins. Nothing hard-codes v139, the job fails on an empty or malformed pin, and a bats test checks that the checkout ref comes from agent_ref. This is exactly the plan in the issue's budget guard.
  • AC3: done. AGENTS.md now states the ordering rule for new client_payload fields, placed next to the existing channel-pin input-forwarding rule.
  • AC2: not done, which the issue allows. The budget guard marks it optional. AC1 removes the skew within this repo. The remaining cross-repo case (a target repo pinning an older channel) is documented in the workflow comment and AGENTS.md, and tracked in open follow-up #2086.

Findings

No blocking findings.

Verified locally

  • I pulled the channel step's script out of the workflow and ran it against the live dev-lead.yml. It resolved to dev-lead/v139-stable, exited 0, and wrote the expected GITHUB_OUTPUT line. It also passes shellcheck.
  • It rejects main and dev-lead/v139-stable;x, both with exit 1 and no output.
  • It accepts quoted values and values followed by a trailing # comment.
  • Comment lines in the stub that mention agent_ref start with #, so the sed anchor skips them.

Prior bot review threads: all resolved. Gemini's exit-status thread and cubic's thread about the yq call failing every test are fixed in c7f6133. The AGENTS.md wording is fixed, and the per-repo pin concern is documented and deferred to #2086.

Test-tamper notices: earlier dev-lead passes were held back for editing tests. The final commit c7f6133 carries a Test-Change-Justification: trailer that cites those review threads. Its edits are confined to the new test file this PR adds, and they make the assertions stricter (-ne 0 became -eq 1, plus a yq guard that fails in CI).

Non-blocking notes

  • github.event.repository.default_branch may be empty on schedule events. If it is, actions/checkout falls back to the triggering ref, which for a schedule is the default branch, so behaviour is unchanged.
  • The second, root-level checkout deletes .channel-pin/. That is harmless because the pin has already been read by then.
  • Bug fixes to scripts/dev-lead-retry.sh on main now take effect only after the channel is promoted. The issue accepts this trade-off on purpose.

Secret scan: the MCP run_secret_scanning tool is not available in this run. The gitleaks CI check passed.

CI status

All required checks are green on c7f6133: Lint/bats, Test Dev-Lead Agent/unit, shellcheck, actionlint, CodeQL, SonarCloud (quality gate passed), gitleaks, AgentShield, and the stub/permission guards. The unit job ran all 9 new tests in test_dev_lead_retry_channel.bats (ok 458–466), none skipped. The CANCELLED and SKIPPED entries are runs on superseded commits and conditional jobs, not failures.


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

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@don-petry
don-petry merged commit e36fada into main Oct 9, 2026
64 of 67 checks passed
@don-petry
don-petry deleted the dev-lead/issue-2050-20261009-0135 branch October 9, 2026 04:07
don-petry pushed a commit that referenced this pull request Oct 9, 2026
…-parsing the parser; check every channel

The text-pattern scanner kept missing cases (nine findings on #2085):
comments counted as field reads, commas and brackets inside quoted values
broke the key count, and a failed tag fetch silently used a stale tag.

- Sent side: every function in the sweep (and the libs it sources) whose
  body POSTs to /dispatches is executed with `gh` stubbed to capture the
  request; the top-level client_payload keys come from the real JSON via
  jq. Both the --input JSON form and the -f/-F client_payload[key]= form
  are captured. A dispatcher that sends nothing for the probe call is a
  setup error (exit 2), never a pass.
- Read side: the intent parser, and the libs it sources, at each channel
  tag are parsed by bash first (wrapped in a function and printed with
  declare -f), which drops comments and keeps strings verbatim, before
  client_payload.<key> reads are collected.
- Channels: since #2083 the sweep runs at this repo's pin, so the skew left
  is a target repo on an older channel (#2086). The check now compares
  against every dev-lead/v<N>-{next,ring0,ring1,stable} tag. The pinned tag
  must resolve; a missing other channel is skipped with a warning. In CI an
  unfetchable tag fails closed instead of falling back to a stale local
  copy.
- Merged main (AGENTS.md conflict with #2083's rewrite of the same rule:
  kept main's text and added the check's reference).

Tests: 13 cases, including one per review finding; 11 of them fail on the
previous scanner.

Test-Change-Justification: tests/test_retry_payload_fields.bats is new in this PR (#2085) and is rewritten for the reworked check the maintainer asked for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019K6UsD7r25pAcRjJL3G6Kx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-lead:hands-off Exclude from dev-lead agent automation

Projects

None yet

2 participants