Repository navigation
feat: implement issue #1525 — AGENTS_PAUSED first-class pause state + engine-token preflight - #1529
Conversation
… engine-token preflight
Makes a deliberate fleet pause visible and clean instead of presenting as a
fleet-wide outage (2026-08-16: maintainer disabled CLAUDE_CODE_OAUTH_TOKEN to
conserve quota; every dev-lead dispatch failed red at caller secrets
evaluation and diagnosis took a full steering arc):
- dev-lead-reusable.yml:
- CLAUDE_CODE_OAUTH_TOKEN declared required:false — required:true fails
the CALLER before any step can classify the absence.
- vars.AGENTS_PAUSED != 'true' gate on all three jobs (dispatch, ci-relay,
resume): a pause skips cleanly (neutral), never red. Variables are
visible where secrets are not.
- 'Engine token preflight' FIRST step in the engine-consuming jobs
(dispatch, resume): a genuinely missing secret now produces one
actionable error naming the secret and pointing at AGENTS_PAUSED /
claude setup-token, instead of a secrets-evaluation stack error.
- validate-engines.sh: recognizes AGENTS_PAUSED=true as a distinct,
deliberate state (notice + step summary), never conflating it with
missing/broken credentials.
- AGENTS.md: 'Pausing the agent fleet' section documenting the switch.
- tests/dev-lead/integration/test_agents_paused_preflight.py (+ job in
test-dev-lead.yml): offline contract test pinning required:false, the
pause gate on every job, and preflight-first ordering.
Rollout note: callers pin @dev-lead/v1-stable, so this takes effect on the
fleet only when the channel advances — cut-release.sh dev-lead 1.2.0
--channel stable after merge (called out in the PR).
Fleet-monitor AC: satisfied structurally — a paused run's jobs all skip, so
the run concludes neutral and never counts as a failure.
Closes #1525
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reached
Next review available in: 59 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
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. Comment |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
There was a problem hiding this comment.
Code Review
This pull request introduces support for pausing the agent fleet using the AGENTS_PAUSED variable, updating the documentation, skipping engine validation in validate-engines.sh when paused, and adding a Python contract test to verify workflow configurations. The review feedback suggests improving the robustness of the new Python test by defensively checking types and keys when parsing the YAML manifest to avoid generic TypeError or KeyError exceptions.
Dev-Lead — review-changes (applied)Changes committed and pushed. |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-08-18T16:37:30Z. |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #1529 |
|
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. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-08-18T23:41:20Z. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 1bdfbf2e12a4995cd2b64f496dc68a8016ed6247
Review mode: triage-approved (single reviewer)
Summary
Confirms the triage assessment: this PR makes a deliberate fleet pause (AGENTS_PAUSED=true Actions variable) a first-class, visible state instead of presenting as a fleet-wide outage. It relaxes CLAUDE_CODE_OAUTH_TOKEN to required:false in dev-lead-reusable.yml, adds a vars.AGENTS_PAUSED pause gate to all three jobs (skip neutral, never red), adds an Engine-token-preflight first step in the engine-consuming jobs (dispatch, resume) with a single actionable error, teaches validate-engines.sh to report the paused state distinctly, documents pause/resume in AGENTS.md, and pins the contract with a new offline YAML test wired into CI.
Linked issue analysis
Closes #1525 — all five acceptance criteria are substantively addressed: (1) the AGENTS_PAUSED variable gate skips dispatch/ci-relay/resume cleanly (neutral, not red); (2) a missing secret while unpaused fails fast in the preflight with one error naming the secret, the pause switch, and the issue; (3) validate-engines.sh reports the paused state distinctly (notice + step summary) without conflating it with broken credentials; (4) the fleet-monitor AC is satisfied structurally — paused runs skip and conclude neutral; (5) AGENTS.md gains the 'Pausing the agent fleet' section. The issue's dev note about caller-side secrets evaluation is correctly handled via required:false plus in-run preflight, and the new contract test pins exactly the three load-bearing properties (required:false, pause gate on every job, preflight-first ordering).
Findings
No blocking findings.
- Correctness verified: the unset-variable case evaluates `'' != 'true'` → jobs run normally; the resume job's OR condition is correctly re-parenthesized under the new pause gate; the preflight only tests emptiness (`-z`) and never echoes the token.
- Security posture: no secret exposure; the new agents-paused-preflight CI job uses minimal permissions (contents: read), persist-credentials: false, and SHA-pinned actions. Relaxing required:true → required:false does not weaken enforcement — presence is still enforced in-run with a clearer error. Frozen thin-caller stubs are untouched.
- Minor (non-blocking) observation: validate-engines.sh honors the `AGENTS_PAUSED` env var, but its consumers (e.g. workflows sourcing it via review-batch.sh) are not wired to pass `vars.AGENTS_PAUSED` into env in this PR — worth adding when the pause switch is expected to reach those paths. dev-lead itself is unaffected since its jobs gate at the job level.
- Advisory-bot context: CodeRabbit/Codex/Qodo were rate-/billing-limited at this SHA (a prior cycle posted a withhold marker), but advisory coverage is substantial — Gemini reviewed (all 3 threads resolved by follow-up commits), plus CodeAnt, SonarCloud quality gate passed, CodeQL, and AgentShield all green.
- Secret scan: the run_secret_scanning MCP tool is unavailable in this environment; the gitleaks CI check passed and manual diff inspection found no credentials.
- Rollout note per the PR body: this reaches the fleet only when the stable channel advances via cut-release.sh — a deliberate post-merge steering action, not a review blocker.
CI status
All checks green at 1bdfbf2: agents-paused-preflight, shellcheck, actionlint, bats, unit/integration tests, CodeQL (actions + python), gitleaks secret scan, SonarCloud quality gate, AgentShield, caller-stub-freeze, reusable-pin-compliance, and all validators SUCCESS; only ecosystem-specific audit jobs skipped as expected.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



User description
Closes #1525
Maintainer-approved steering implementation. Makes a deliberate fleet pause a visible, clean state instead of the 2026-08-16 presentation (token withheld to conserve quota → every dispatch failed red at caller secrets evaluation → full diagnostic arc to rediscover a decision already made).
dev-lead-reusable.yml:CLAUDE_CODE_OAUTH_TOKEN→required: false(arequired: truefails the caller before any step can classify the absence);vars.AGENTS_PAUSED != 'true'gate on all three jobs so a pause skips neutral, never red; an Engine token preflight first step in the engine-consuming jobs (dispatch,resume) so a genuinely missing secret yields one actionable error naming the secret and the pause switch.validate-engines.sh: reportsAGENTS_PAUSED=trueas a distinct deliberate state (notice + step summary) — never conflated with broken credentials.AGENTS.md: "Pausing the agent fleet" section — pause via the variable, not by withholding the secret.tests/dev-lead/integration/test_agents_paused_preflight.py(+agents-paused-preflightjob): pinsrequired:false, the pause gate on every job, and preflight-first ordering. (Local bats note:test_validate_engines.batscase 3 fails identically on unmodified main in the local env — pre-existing flake, CI is authority.)Rollout (steering action after merge): callers pin
@dev-lead/v1-stable(currently6d362318), so this reaches the fleet only when the channel advances:scripts/cut-release.sh dev-lead 1.2.0 --ref main --channel stable --push. That release also ships the restored trunk (#1487/#1519), the #1496 integrity detector, and the #1497 registry to the fleet. pr-review-side pause gating is deliberately deferred: it already degrades without the token (ran throughout the outage), and its channel tags are mid-migration under #1493.🤖 Generated with Claude Code
CodeAnt-AI Description
Treat deliberate agent-fleet pauses as a neutral state and report missing engine credentials clearly
What Changed
AGENTS_PAUSED=truecleanly skips dispatch, relay, and resume jobs instead of producing failed runs.Impact
✅ Paused runs no longer appear as fleet outages✅ Clearer missing-token errors✅ Safer quota-conservation pauses💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.