test(rpc): enumerate observability validation boundaries#3959
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughThe observability configuration conversion tests now use reusable RPC builders and named scenarios covering missing, invalid, and valid logging and Prometheus configurations. ChangesObservability validation test rewrite
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai full_review, thanks! |
|
ᕱ⑅ᕱ ✨ ✅ Action performedFull review finished. |
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 `@crates/rpc/src/model/extension_service.rs`:
- Around line 231-305: Update the observability_config_from_rpc tests to assert
literal expected error strings instead of deriving them through invalid_value()
or RpcDataConversionError::to_string(). Replace the missing-config expectation
and each invalid-value expectation with independently pinned text, preserving
the exact field names, limits, patterns, and formatting required by the
conversion error contract.
🪄 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: Enterprise
Run ID: 0474f5ff-f8e4-4c93-aafb-ff0f7a864b58
📒 Files selected for processing (1)
crates/rpc/src/model/extension_service.rs
The observability conversion test mixed several validation paths in one assertion sequence, and its bad-character inputs crossed the size guard first. Replace it with grouped scenarios that pin each conversion error and preserve the existing valid punctuation. Add exact accepted and rejected length rows, then use short invalid values so both regex guards execute. Tests updated! This supports NVIDIA#3952 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
The observability RPC conversion test labeled two inputs as bad-character cases, but both crossed the length guard first. Those rows could pass while the Prometheus endpoint and logging path regex branches remained untested.
This replaces the sequential assertion block with grouped
carbide-test-supportscenarios, pins the exact conversion errors independently, and tests the 64/65-byte name and 128/129-byte property boundaries. The valid maximum-length rows retain the existing:and@acceptance checks.Related issues
Type of Change
Breaking Changes
Testing
Additional Notes
Coverage uses
carbide-rpc --lib --features modelwith the same exclusions at every checkpoint.The table conversion preserves the original uncovered-line counts. The expanded rows cover 14 additional production lines, and the target conversion moves from 31/39 to 39/39 covered regions.
Validation completed with:
cargo +1.96.0 test --locked --package carbide-rpc --lib --features model model::extension_service::tests::observability_config_from_rpccargo +1.96.0 llvm-cov test --locked --package carbide-rpc --lib --features model --remap-path-prefix --no-fail-fast --no-reportcargo make format-nightlycargo make clippycargo make carbide-lints