Skip to content

feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection - #569

Merged
don-petry merged 4 commits into
mainfrom
dev-lead/issue-553-20260611-1222
Jun 11, 2026
Merged

feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection#569
don-petry merged 4 commits into
mainfrom
dev-lead/issue-553-20260611-1222

Conversation

@don-petry

@don-petry don-petry commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Closes #553

Implemented by dev-lead agent. Please review.

Summary by CodeRabbit

  • Chores
    • Updated default AI model assignments for different processing tiers and optimized fallback chains for improved request routing.
    • Expanded test coverage with new validation suite for model configuration behavior under various conditions.
    • Refined security scanning to reduce false positive alerts in historical content.

… 4.8) in dev-lead + pr-review engines with capability-aware selection
@don-petry
don-petry requested a review from a team as a code owner June 11, 2026 12:38
Copilot AI review requested due to automatic review settings June 11, 2026 12:38
@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.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 77b17ba2-2628-4b95-87f4-7946c074b447

📥 Commits

Reviewing files that changed from the base of the PR and between 7d608fe and 524d63f.

📒 Files selected for processing (1)
  • .gitleaks.toml
📝 Walkthrough

Walkthrough

This PR enables Fable 5 and Opus 4.8 models in the Claude engine by updating tier-specific default model assignments and fallback chain sequencing, then validates the configuration with updated and new test suites covering defaults, chains, intent routing, and fallback behavior.

Changes

Claude model tier defaults and fallback chains

Layer / File(s) Summary
Claude tier model config and fallback chains
scripts/engine.sh, .gitleaks.toml
Rewrites ENGINE_DEEP_MODEL, ENGINE_AUDIT_MODEL, and ENGINE_SINGLE_MODEL to route audit/single to Fable 5 and deep to Opus 4.8; updates CLAUDE_*_MODEL_CHAIN fallback sequences with ordered precedence and adds explanatory comments on Fable 5 caching behavior. Adds gitleaks allowlist entry for historical bmad documentation.
Test environment isolation
tests/dev-lead/unit/test_engine_chain.bats, tests/dev-lead/unit/test_engine_new_models.bats
Both test suites clear pre-set CLAUDE_*_MODEL_CHAIN environment variables in setup to ensure chain defaults are evaluated fresh per test.
Existing test_engine_chain.bats updates
tests/dev-lead/unit/test_engine_chain.bats
Updates writer, agentic, and pinning test cases to validate revised fallback routes: action chain expects sonnet→opus-4-8, audit chain expects fable-5→opus-4-8; includes updated stubbed responses and exit-code assertions.
New model defaults and chain composition tests
tests/dev-lead/unit/test_engine_new_models.bats
Introduces assertions validating that tier default model variables are correct (audit/single→claude-fable-5, deep→claude-opus-4-8) and fallback chain structure matches spec (first/second elements, presence/absence of specific models per tier).
New behavioral and regression tests
tests/dev-lead/unit/test_engine_new_models.bats
Adds tests for model_for_intent dispatch, rate-limit and fallback exhaustion scenarios with stubbed model invocation tracking, and regression checks ensuring non-Claude engines remain unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • petry-projects/.github-private#410: Both PRs update Claude per-tier model fallback chains in scripts/engine.sh and adjust test_engine_chain.bats expectations to match the new chain behavior.
  • petry-projects/.github-private#334: Both PRs modify tier runner logic in scripts/engine.sh (e.g., run_triage, run_agentic, run_writer) related to model execution paths.
  • petry-projects/.github-private#111: Both PRs update Claude engine defaults by changing tier-specific ENGINE_* model selections and related label strings in scripts/engine.sh.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The PR implements most core objectives from #553: updates engine.sh with new model tier assignments (Fable 5 for audit/single, Opus 4.8 for deep), establishes fallback chains, updates test coverage, and suppresses false positives. However, critical requirements remain unmet or cannot be verified: request-surface compatibility (adaptive thinking, output_config.effort, omitting removed params), observability (logging model ID/tier/tokens/fallback hops), staged rollout/ring strategy, and rollout documentation are either absent from the reviewed files or unverifiable. Verify that adaptive-thinking + effort handling, parameter omission for Fable 5/Opus 4.8, logging/observability, and rollout notes are implemented in engine implementation files or documentation excluded from this review.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: enabling new Claude models (Fable 5 and Opus 4.8) in dev-lead and pr-review engines with capability-aware selection, directly aligning with issue #553.
Out of Scope Changes check ✅ Passed All changes directly support issue #553: .gitleaks.toml suppresses false positives in documentation, engine.sh implements model tier config and fallback chains, and tests validate the new behavior. No extraneous changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-553-20260611-1222

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 and usage tips.

@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 updates the Claude model tier assignments and fallback chains in scripts/engine.sh to use the new claude-opus-4-8 and claude-fable-5 models, adds pricing details for claude-fable-5 in model-pricing.tsv, and updates existing tests while introducing a new test suite (test_engine_new_models.bats) to verify these changes. The review feedback suggests optimizing the new test suite by replacing external process calls (printf, cut, tr) with pure Bash parameter expansion when parsing model chains to improve execution speed.

Comment thread tests/dev-lead/unit/test_engine_new_models.bats
Comment thread tests/dev-lead/unit/test_engine_new_models.bats
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 11, 2026 12:44

Copilot AI 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.

Pull request overview

Updates the Claude engine configuration to introduce the new Anthropic model IDs (claude-fable-5, claude-opus-4-8) and extends unit tests/pricing data so dev-lead + pr-review can reference these models in tier selection and cost reporting.

Changes:

  • Updates scripts/engine.sh Claude tier defaults/labels and in-Claude fallback chains to use Fable 5 (audit/single) and Opus 4.8 (deep/action fallbacks).
  • Adds Fable 5 pricing to scripts/lib/model-pricing.tsv for cost/ET calculations.
  • Adds/updates Bats unit tests asserting new tier assignments and chain fallback behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/engine.sh Updates Claude tier defaults/labels and fallback chains to include Fable 5 + Opus 4.8.
scripts/lib/model-pricing.tsv Adds a priced entry for claude-fable-5* effective 2026-06-11.
tests/dev-lead/unit/test_engine_chain.bats Updates existing chain tests to expect Opus 4.8 in relevant Claude fallback paths.
tests/dev-lead/unit/test_engine_new_models.bats Adds a new test suite asserting new Claude tier defaults and chain composition.

Comment thread scripts/engine.sh
Comment thread scripts/engine.sh
Comment thread tests/dev-lead/unit/test_engine_new_models.bats
@don-petry
don-petry disabled auto-merge June 11, 2026 12:51
@don-petry

Copy link
Copy Markdown
Collaborator Author

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

PR: #569
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-06-11T13:37:49Z

@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-06-11T13:37:49Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 11, 2026 16:30
@don-petry
don-petry disabled auto-merge June 11, 2026 16:31

@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: 1

🤖 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 `@scripts/engine.sh`:
- Around line 68-71: Update scripts/engine.sh to stop relying on the claude CLI
to auto-handle model-specific params and explicitly omit unsupported fields per
model: detect when model name contains "fable-5" and remove/skip sending
thinking, budget_tokens, temperature, top_p, and top_k; for "opus-4-8" ensure
min cacheable prefix handling and allow the removed params if supported, and for
other models fall back to current behavior. Modify the request-building logic
(where payload is assembled / send_request or similar in scripts/engine.sh) to
branch on the model string and filter out incompatible keys before calling the
CLI/API, and update the comment block to reflect the new explicit handling.
🪄 Autofix (Beta)

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

Run ID: 287a15a3-b163-46df-8d69-bb28c8287bb3

📥 Commits

Reviewing files that changed from the base of the PR and between 803e63f and 7d608fe.

⛔ Files ignored due to path filters (1)
  • scripts/lib/model-pricing.tsv is excluded by !**/*.tsv
📒 Files selected for processing (4)
  • .gitleaks.toml
  • scripts/engine.sh
  • tests/dev-lead/unit/test_engine_chain.bats
  • tests/dev-lead/unit/test_engine_new_models.bats

Comment thread scripts/engine.sh
@don-petry

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resolve

@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-06-11T17:05:27Z

@don-petry
don-petry enabled auto-merge (squash) June 11, 2026 16:35
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@don-petry
don-petry disabled auto-merge June 11, 2026 16:36
@don-petry
don-petry enabled auto-merge (squash) June 11, 2026 16:38
@don-petry
don-petry disabled auto-merge June 11, 2026 20:33
@don-petry

Copy link
Copy Markdown
Collaborator Author

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

PR: #569
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-06-11T21:07:00Z

@don-petry
don-petry enabled auto-merge (squash) June 11, 2026 20:37
@don-petry
don-petry disabled auto-merge June 11, 2026 20:37
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: fix-reviews)

PR: #569
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-06-11T21:10:18Z

@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry disabled auto-merge June 11, 2026 21:31
@don-petry

Copy link
Copy Markdown
Collaborator Author

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

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 11, 2026 21:34

@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: LOW
Reviewed commit: 524d63fdccdf23e2ef957f339f9faaf7b19fa4d0
Review mode: triage-approved (single reviewer)

Summary

Implements #553 by wiring claude-fable-5 / claude-opus-4-8 into the audit, single-reviewer, and deep tiers of the Claude engine, with opus-4-7 retained as terminal fallback in the audit/single chains. Adds fable-5 pricing and 22 new bats tests covering tier defaults, chain composition, intent dispatch, and fallback behavior. Gitleaks change is scoped to a single historical commit SHA. Triage assessment confirmed: low-risk config + test PR by repo owner, all CI green, all review threads resolved.

Linked issue analysis

Closes #553. The issue asks for Fable 5 / Opus 4.8 wired into dev-lead + pr-review engines with capability-aware selection and per-tier fallback. The PR delivers: per-tier defaults updated (audit/single → fable-5, deep → opus-4-8, action/triage unchanged), chains updated (CLAUDE_AUDIT/SINGLE_MODEL_CHAIN start with fable-5 then opus-4-8 then opus-4-7), pricing row added, comments document the fable-5 API surface constraints (adaptive thinking only, omit thinking param, cache prefix sizes), and tests assert non-claude engines are untouched.

Findings

  • engine.sh tier swaps look correct and symmetric with the test assertions; opus-4-7 remains in CLAUDE_AUDIT_MODEL_CHAIN and CLAUDE_SINGLE_MODEL_CHAIN as a stable terminal fallback so the chain still has a safe path if newer model IDs are unavailable on a runner.
  • New test file unsets pre-existing CLAUDE_*_MODEL_CHAIN env vars in setup (and the same hardening was added to test_engine_chain.bats setup), so the defaults from set_engine_config are exercised cleanly without env contamination from the runner.
  • Gitleaks allowlist is correctly scoped to a single historical commit SHA (bda766b — verified as the legitimate BMAD v6.8.0 framework install commit with tutorial-content API key patterns); it does not suppress future findings.
  • Copilot raised a concern about non-rate-limit failures terminating the chain if fable-5 is unavailable. Author response is reasonable: the chain semantics are intentional to avoid masking config errors, and env-override (CLAUDE_*_MODEL_CHAIN) is the documented opt-out for runners without access. Not a blocker.
  • Gemini's nit on subshell perf in tests was implemented (pure Bash parameter expansion).
  • No HIGH-risk surfaces touched: no auth/secrets/crypto, no migrations, no GH Actions security smells, no CODEOWNERS/AGENTS.md violations.

CI status

All 30+ checks SUCCESS or SKIPPED (CodeQL actions/python, ShellCheck, Lint, bats, gh-aw-compile, validate-agent-profiles, Agent Security Scan, Secret scan/gitleaks, SonarCloud quality gate passed with 0 new issues, dev-lead dispatch, AgentShield, etc.). mergeStateStatus is BLOCKED only due to the open REVIEW_REQUIRED from the org-leads team request, not a check failure.


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

@don-petry
don-petry merged commit 598534f into main Jun 11, 2026
35 checks passed
@don-petry
don-petry deleted the dev-lead/issue-553-20260611-1222 branch June 11, 2026 21:37
don-petry added a commit that referenced this pull request Jun 12, 2026
… 4.8) in dev-lead + pr-review engines with capability-aware selection (#569)

* feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 14, 2026
… 4.8) in dev-lead + pr-review engines with capability-aware selection (#569)

* feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
… 4.8) in dev-lead + pr-review engines with capability-aware selection (#569)

* feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
… 4.8) in dev-lead + pr-review engines with capability-aware selection (#569)

* feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
… 4.8) in dev-lead + pr-review engines with capability-aware selection (#569)

* feat: implement issue #553 — Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable new Claude models (Fable 5 / Opus 4.8) in dev-lead + pr-review engines with capability-aware selection

3 participants