Repository navigation
test(claude): pin Haiku 5.5 price tier, reload pricing and shared-client isolation - #4686
Merged
Merged
Conversation
Signed-off-by: Arnaud Héritier <aheritier@apache.org>
Signed-off-by: Arnaud Héritier <aheritier@apache.org>
Signed-off-by: Arnaud Héritier <aheritier@apache.org>
The leak check grouped requests by system prompt but never checked that both conversations were seen, so a client replaying one session's whole request to the other passed. Signed-off-by: Arnaud Héritier <aheritier@apache.org>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only changes cover the stated regressions, with no unresolved blocking issues.
No open issues 🎉
What changed in this PR
Adds test-only coverage for Claude 5.x lifecycle behavior as the first part of #4654, reusing existing infrastructure without production changes.
Changes:
- Pins Haiku 5.5 pricing at the 100,000-token boundary.
- Checks that routed serving-model identity and cost survive SQLite reload.
- Checks request isolation between concurrent sessions sharing one Anthropic client.
| File | Description |
|---|---|
pkg/runtime/routing_pricing_test.go |
Verifies routed model and cost persistence. |
pkg/modelsdev/snapshot_test.go |
Checks Anthropic and Bedrock pricing boundaries. |
pkg/model/provider/anthropic/features_integration_test.go |
Checks shared-client session isolation. |
Review effort: Balanced
aheritier
enabled auto-merge
October 21, 2026 11:25
trungutt
approved these changes
Oct 21, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 21, 2026
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4654 (PR 1 of 3). Part of #4583 and epic #4580.
What
Three small tests pin Claude 5.x lifecycle behaviors that already work. Test-only: no production code changes, and no new test harness. Each test reuses what exists, per #4654's "test cost matters" rule.
TestEmbeddedSnapshotHaiku55ContextTier(pkg/modelsdev)anthropic, which also prices Vertex, and foramazon-bedrockglobal andus.(+10%)TestRoutedPricing/catalog_leaf_survives_reload(pkg/runtime)TestSharedClientConcurrentSessions(pkg/model/provider/anthropic)-raceEach test was checked by deliberately breaking the behavior it pins and confirming it fails:
Costfrom the stored JSON;Not added, and why
TestComputeMessageCostContextTiers). Anthropic's usage mapping, cache tokens included, is covered byTestStreamUsagePreservesCumulativeCounts.The end-to-end runtime harness moves to PR 2, where compaction needs it.
References
Validation
task buildpasses.task testpasses. On a first run,e2eTestA2AServer_MultipleRequestsfailed (404 instead of 200); it passed 3/3 alone and on a full rerun. That's flaky under load, and this PR doesn't touch it.golangci-lintv2.14.0 reports 0 issues, andgo run ./lint .reports no offenses.go test -race -shuffle=on ./pkg/runtime/ ./pkg/model/provider/anthropic/ ./pkg/modelsdev/passes.Deferred minor findings:
TestRoutedPricingcreates a temp dir for every case.