feat: implement issue #1096 — [Phase 1] Add effective-dated claude-sonnet-5 pricing rows + lock them with a regression test - #1109
Conversation
…nnet-5 pricing rows + lock them with a regression test
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 entries for the claude-sonnet-5-* model, defining an introductory price starting on 2026-06-30 and a standard price starting on 2026-09-01. It also introduces corresponding unit tests to verify the pricing during both periods. There are no review comments, and I have no feedback to provide.
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Pull request overview
Adds effective-dated pricing data for Claude Sonnet 5 to the central pricing table and validates date-based selection with Bats regression tests, ensuring cost reporting automatically switches from the intro discount to standard pricing without any script changes.
Changes:
- Appends two effective-dated
claude-sonnet-5-*rows toscripts/lib/model-pricing.tsv(2026-06-30 intro rate; 2026-09-01 standard rate). - Adds Bats coverage in
tests/model_pricing.batsassertingprice_forselects the correct Sonnet 5 row before vs. after the effective date.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/model_pricing.bats | Adds Sonnet 5 price_for regression tests for intro vs. standard effective-date windows. |
| scripts/lib/model-pricing.tsv | Adds effective-dated pricing rows for claude-sonnet-5-* in the Anthropic block. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 53624821d9b07a2fd1d520d57ef07b3ab78c2a93
Review mode: triage-approved (single reviewer)
Summary
Data-only pricing change: appends two effective-dated claude-sonnet-5-* rows to scripts/lib/model-pricing.tsv (intro rate from 2026-06-30, standard rate from 2026-09-01) and adds two bats regression tests locking the effective-date selection. Matches all acceptance criteria of issue #1096; no script logic touched.
Linked issue analysis
Issue #1096 acceptance criteria are fully met: (1) exactly two appended rows with the specified values and no existing row edited; (2) derived cache columns follow the documented rule (0.20 = 0.1×2.00, 2.50 = 1.25×2.00; standard row identical to sonnet-4); (3/4) new bats tests assert the 2026-07-15 lookup returns the intro rate and the 2026-09-02 lookup returns the standard rate, and the bats CI job passed; (5) no dollar rates hardcoded in any script — only the tsv and the test file changed.
Findings
- No security concerns: pure data + test change, no shell logic, no workflow changes, no secrets (gitleaks passed; the run_secret_scanning MCP tool was not available in this session — noted, not blocking).
- Triage assessment confirmed correct: LOW risk, well-scoped, matches the story exactly.
- Two unresolved Copilot bot review threads exist, both non-blocking suggestions: (a) use a neutral model id in the test instead of one matching the effective date (clarity nit), and (b) add an exact-boundary test at 2026-09-01 to lock <= semantics. The dev-lead agent explicitly triaged these as no-changes-needed. The boundary-test suggestion is a reasonable optional hardening for a follow-up but is not required by the acceptance criteria.
CI status
All substantive checks green: Lint, ShellCheck, bats, unit-tests, validate-fixtures, CodeQL (actions + python), Secret scan (gitleaks), SonarCloud (quality gate passed, 0 new issues), AgentShield, Test-Deletion Guard, Holdout Guard. Two CANCELLED check runs (dev-lead / dispatch, dev-lead / ci-relay) are superseded orchestration duplicates — the successful dev-lead dispatch run completed; remaining checks SKIPPED by design.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #1109 |
|
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. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 0fe731d337ed57780d3b42dc405186e999fe2046
Review mode: triage-approved (single reviewer)
Summary
Data-only pricing change: appends two effective-dated claude-sonnet-5-* rows to scripts/lib/model-pricing.tsv (intro rate from 2026-06-30, standard rate from 2026-09-01) and adds three bats regression tests locking the effective-date selection, including the exact 2026-09-01 boundary. All acceptance criteria of issue #1096 met; both prior Copilot review threads addressed and resolved; no script logic touched.
Linked issue analysis
Issue #1096 acceptance criteria are fully met: (1) exactly two appended claude-sonnet-5-* rows with the specified values, no existing row edited; (2) derived cache columns follow the documented rule (0.20 = 0.1×2.00, 2.50 = 1.25×2.00; standard row identical to sonnet-4); (3/4) bats tests assert the 2026-07-15 lookup returns the intro rate and both 2026-09-01 (exact boundary) and 2026-09-02 lookups return the standard rate, and the bats CI job passed; (5) no dollar rates hardcoded in any script — only the tsv and the test file changed.
Findings
- No security concerns: pure data + test change, no shell logic, no workflow changes, no secrets (gitleaks passed; the run_secret_scanning MCP tool was not available in this session — noted, not blocking).
- Changes since the prior approved review (5362482…): merged main into the branch and one review-changes commit to tests/model_pricing.bats that resolved both Copilot suggestions — the test model id was renamed to a neutral
claude-sonnet-5-20261231(no relation to any effective_from date) and an exact-boundary test at 2026-09-01 was added, locking the<=selector semantics. Both review threads are resolved; CodeRabbit approved. - Triage assessment confirmed correct: LOW risk, well-scoped, matches the story exactly.
CI status
All checks green: Lint, ShellCheck (both jobs), bats, unit-tests, unit, validate-fixtures, CodeQL (actions + python), Secret scan (gitleaks), SonarCloud, AgentShield, Agent Security Scan, holdout-guard, guard, template-drift, prompt-coverage, validate-agent-profiles, and all workflow-structure checks. Remaining checks SKIPPED by design (dependency-audit ecosystems not present, dependabot-automerge, dev-lead ci-relay).
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



Closes #1096
Implemented by dev-lead agent. Please review.