fixes skipped framework tests - #5611
Conversation
📝 WalkthroughWalkthroughThe PR enables previously skipped pricing override tests, strengthens pointer-backed pricing assertions across resolution and patch scenarios, and removes an obsolete Azure encryption-width regression test. ChangesPricing override test coverage
Encryption test cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
framework/modelcatalog/datasheet/overrides_test.go (1)
78-80: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winEnsure every newly enabled fixture has explicit request-type coverage.
Overrides with empty
RequestTypesdo not match a request mode, so these tests can pass without exercising the behavior named in each test. (raw.githubusercontent.com)
framework/modelcatalog/datasheet/overrides_test.go#L78-L80: define the intended generic/request-specific contract explicitly.framework/modelcatalog/datasheet/overrides_test.go#L214-L216: addschemas.ChatCompletionRequestso exact model matching is tested.framework/modelcatalog/datasheet/overrides_test.go#L265-L267: addschemas.ChatCompletionRequestso wildcard non-matching is tested.🤖 Prompt for 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. In `@framework/modelcatalog/datasheet/overrides_test.go` around lines 78 - 80, Update TestGetPricing_RequestTypeSpecificOverrideBeatsGeneric to explicitly define both generic and request-specific override behavior through RequestTypes. In framework/modelcatalog/datasheet/overrides_test.go at lines 78-80, establish the intended generic/request-specific contract; at lines 214-216, add schemas.ChatCompletionRequest to the exact-model fixture; and at lines 265-267, add schemas.ChatCompletionRequest to the wildcard non-matching fixture so each test exercises request-type filtering.
🤖 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 `@framework/modelcatalog/datasheet/overrides_test.go`:
- Line 304: Update the override test around SetOverrides to call DeleteOverride
with "openai-override-0" instead of clearing the full set. Keep a second
override configured, then verify only the targeted override is removed while the
remaining override persists.
---
Outside diff comments:
In `@framework/modelcatalog/datasheet/overrides_test.go`:
- Around line 78-80: Update
TestGetPricing_RequestTypeSpecificOverrideBeatsGeneric to explicitly define both
generic and request-specific override behavior through RequestTypes. In
framework/modelcatalog/datasheet/overrides_test.go at lines 78-80, establish the
intended generic/request-specific contract; at lines 214-216, add
schemas.ChatCompletionRequest to the exact-model fixture; and at lines 265-267,
add schemas.ChatCompletionRequest to the wildcard non-matching fixture so each
test exercises request-type filtering.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 242f37e3-9116-4736-b1c8-deb175e4fb2b
📒 Files selected for processing (2)
framework/configstore/tables/encryption_test.goframework/modelcatalog/datasheet/overrides_test.go
531da41 to
e267a1f
Compare
00fb4a4 to
f19842b
Compare
e267a1f to
50d76e0
Compare
There was a problem hiding this comment.
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 `@framework/modelcatalog/datasheet/overrides_test.go`:
- Around line 111-112: Update the override fixtures in
framework/modelcatalog/datasheet/overrides_test.go:111-112, 238-239, and 268-271
so their request modes match the exercised request types. Configure
openai-generic for Responses mode at 111-112, add ChatCompletionRequest at
238-239, and add ChatCompletionRequest to the wildcard override at 268-271,
preserving each test’s intended precedence or non-match assertion.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: cc24d86e-47fa-4cae-94d6-f8629bc83adc
📒 Files selected for processing (2)
framework/configstore/tables/encryption_test.goframework/modelcatalog/datasheet/overrides_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- framework/configstore/tables/encryption_test.go
50d76e0 to
61dc665
Compare
Merge activity
|
The base branch was changed.
## Summary Re-enables previously skipped pricing override tests and updates them to work with `InputCostPerToken` and `OutputCostPerToken` now being pointer types (`*float64`) rather than plain `float64` values. Also removes a stale skipped test for a removed Azure API version column. ## Changes - Removed `TestEncryptedColumns_AzureAPIVersion_FitsAfterWidening` which was already skipped with a note that the underlying column no longer exists. - Re-enabled multiple `t.Skip()`-guarded pricing override tests that were previously deferred. - Updated assertions in those tests to dereference pointer fields (`*pricing.InputCostPerToken`, `*pricing.OutputCostPerToken`) and added `require.NotNil` guards before each dereference. - Added `RequestTypes` fields to override fixtures in several tests to satisfy updated matching logic that requires request type scoping. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go test ./framework/modelcatalog/datasheet/... go test ./framework/configstore/tables/... ``` All previously skipped tests should now run and pass. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [ ] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
## Summary Re-enables previously skipped pricing override tests and updates them to work with `InputCostPerToken` and `OutputCostPerToken` now being pointer types (`*float64`) rather than plain `float64` values. Also removes a stale skipped test for a removed Azure API version column. ## Changes - Removed `TestEncryptedColumns_AzureAPIVersion_FitsAfterWidening` which was already skipped with a note that the underlying column no longer exists. - Re-enabled multiple `t.Skip()`-guarded pricing override tests that were previously deferred. - Updated assertions in those tests to dereference pointer fields (`*pricing.InputCostPerToken`, `*pricing.OutputCostPerToken`) and added `require.NotNil` guards before each dereference. - Added `RequestTypes` fields to override fixtures in several tests to satisfy updated matching logic that requires request type scoping. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go test ./framework/modelcatalog/datasheet/... go test ./framework/configstore/tables/... ``` All previously skipped tests should now run and pass. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [ ] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Re-enables previously skipped pricing override tests and updates them to work with
InputCostPerTokenandOutputCostPerTokennow being pointer types (*float64) rather than plainfloat64values. Also removes a stale skipped test for a removed Azure API version column.Changes
TestEncryptedColumns_AzureAPIVersion_FitsAfterWideningwhich was already skipped with a note that the underlying column no longer exists.t.Skip()-guarded pricing override tests that were previously deferred.*pricing.InputCostPerToken,*pricing.OutputCostPerToken) and addedrequire.NotNilguards before each dereference.RequestTypesfields to override fixtures in several tests to satisfy updated matching logic that requires request type scoping.Type of change
Affected areas
How to test
All previously skipped tests should now run and pass.
Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines