Repository navigation
feat: implement issue #1896 — [Phase 1] Price claude-opus-5-5 in model-pricing.tsv and lock it with a regression test - #1904
Conversation
…l-pricing.tsv and lock it with a regression test
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
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 |
There was a problem hiding this comment.
Code Review
This pull request adds pricing details for the new claude-opus-5-5* model in scripts/lib/model-pricing.tsv and includes corresponding tests in tests/model_pricing.bats. Feedback suggests improving the test coverage by verifying the exact boundary date (2026-09-22) when the pricing takes effect, rather than just testing the day after.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-23T04:24:13Z. |
|
Skipping the failing
This PR's diff is confined to |
Dev-Lead — review-changes (applied)Changes committed and pushed. Requested items addressed:
|
|
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-23T04:48:40Z. |
Superseded by automated re-review at
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 2528764fdff726ee660139ca20ae2faf9737b40e
Review mode: triage-approved (single reviewer)
Summary
Adds a date-versioned claude-opus-5-5* pricing row (effective 2026-09-22: 4.00 / 0.20 / 5.00 / 20.00 USD/MTok) to scripts/lib/model-pricing.tsv and two boundary regression tests in tests/model_pricing.bats. Data-plus-tests only — no engine or workflow changes, zero runtime blast radius. Functionally verified by this reviewer against the head files: the row is properly TAB-separated, price_for claude-opus-5-5 returns 4.00 0.20 5.00 20.00 at and after the 2026-09-22 boundary, empty before it (no retroactive guess), and the claude-opus-4-* rows are unaffected. Confirms the triage tier's low-risk assessment.
Linked issue analysis
Linked issue #1896 is substantively addressed — all four acceptance criteria verified: (1) the exact TAB-separated row is appended in the Anthropic Claude block (raw-byte inspection confirms tabs, append-only convention preserved); (2) price_for claude-opus-5-5 returns the pinned rate — tests sample the exact 2026-09-22 effective_from boundary, stricter than the AC's 2026-09-23, adopted from review-bot feedback; (3) no collision with claude-opus-4-*: verified price_for claude-opus-4-8 2026-06-07 still returns 5.00 0.50 6.25 25.00 and the more-specific opus-4-1 legacy row still wins — existing tests lock both behaviors; (4) bats and shellcheck are green on the head SHA.
Findings
No blocking findings. Prior cycle-1 review at this same SHA (2528764) had verified the content and escalated solely over the red template-drift check; that escalation is superseded here per org policy #1795, which explicitly established that a failing NON-required check — naming template-drift — must not block review (the CI gate covers required checks only, with the failure named, never silently ignored). All 4 bot review threads (gemini, codeant, cubic ×2) are resolved — the dev-lead fix commit moved the tests to the exact effective_from boundary as requested. No unanswered human-reviewer questions; the maintainer's template-drift skip note is informational and its out-of-scope claim was independently verified (scripts/template_stub_drift.sh audits the external petry-projects/repo-template repo against the standards baseline — this PR's pricing/test diff cannot cause or cure that drift; remedy is a repo-template re-seed outside this PR). Secret scan: the run_secret_scanning MCP tool is not available in this environment; the gitleaks CI check passed and the diff contains only pricing numbers and test assertions.
CI status
All 5 REQUIRED checks green on head 2528764 (verified live via the rollup's isRequired): CodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, duplicate-decl-gate. Non-required failure, named per #1795: template-drift = FAILURE — pre-existing external drift in petry-projects/repo-template, out of scope for this PR (see Findings). All other checks green: bats, unit-tests, shellcheck/ShellCheck/Lint, gitleaks, SonarCloud Quality Gate passed (0 new issues, 0 hotspots), holdout-guard, sync-scope-guard. CANCELLED entries are superseded duplicates from the prior commit, each with a SUCCESS/SKIPPED counterpart on head.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
|
pr-review approved on PARTIAL advisory evidence: 4/7 required advisory bots reported before the gate's head-age-timeout fallback proceeded. Recorded for the miss-rate metric (#1596). |
Dismissing approval due to a PR issue comment lacking a verified disposition (#1813)
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 2528764fdff726ee660139ca20ae2faf9737b40e
Review mode: triage-approved (single reviewer)
Summary
Adds a date-versioned claude-opus-5-5 pricing row (effective 2026-09-22: 4.00 / 0.20 / 5.00 / 20.00 USD/MTok) to scripts/lib/model-pricing.tsv and locks it with two bats regression tests (exact effective_from boundary + no-retroactive-pricing). Pure data + test change — no engine, workflow, or shell-logic edits. Triage's low-risk assessment is confirmed.
Linked issue analysis
Closes #1896. All acceptance criteria substantively met: (AC-1) the TAB-separated row is appended in the Claude block, preserving the append-only effective-dated convention (no existing row mutated); (AC-2) a regression test pins price_for at the exact effective_from boundary 2026-09-22 — stronger than the AC's 2026-09-23 sample, per reviewer feedback — plus a 2026-09-21 test asserting empty output (no retroactive guess); (AC-3) the existing 'opus 4.7 at a 2026 date' test confirms the claude-opus-4-* glob still returns 5.00 0.50 6.25 25.00 (issue allows add/confirm; different major digit, no shadowing); (AC-4) bats and shellcheck are green in CI.
Findings
No blocking findings.
- All 4 inline review threads (gemini-code-assist, codeant-ai, cubic-dev-ai ×2) are resolved; the dev-lead follow-up commit applied the requested boundary-date tightening.
- Secret scan: the run_secret_scanning MCP tool is not available in this environment; the gitleaks CI check is green, and the diff contains only pricing data and test assertions.
- Advisory-bot coverage was partial (4/7, head-age-timeout fallback per #1596) — recorded by the gate; no advisory bot reported an unresolved defect.
CI status
Green across the board (shellcheck, bats, unit-tests, CodeQL, SonarCloud quality gate, gitleaks, agent-shield, and all structural guards) with one exception: template-drift is FAILING. That check validates petry-projects/repo-template's stub workflows against the standards baseline; the drifted/missing files it names are not in this PR's diff, the failure predates this PR, and the repository owner explicitly documented it in a PR comment as out-of-scope infrastructure drift (remedy: re-seed via scripts/seed-repo-template.sh), deliberately leaving it red. Not caused by, nor fixable within, this change.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



Problem
[Phase 1] Price claude-opus-5-5 in model-pricing.tsv and lock it with a regression test
From the issue: As a cost-observability maintainer, I want add a date-versioned claude-opus-5-5 pricing row and a regression test that pins its rate, so that deep-tier token-cost reports price Opus 5.5 calls correctly the moment the model is invoked, instead of falling through to no matching glob.
Risk
Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.
Test plan
Tests added/updated:
tests/model_pricing.bats. Verification:bash scripts/dev-lead-lint.sh(shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.Rollback
Revert this PR. No non-revertible side effects (no tags, migrations, or external state).
Monitoring
This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.
Closes #1896