Skip to content

test(rpc): enumerate observability validation boundaries#3959

Open
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-3952
Open

test(rpc): enumerate observability validation boundaries#3959
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-3952

Conversation

@chet

@chet chet commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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-support scenarios, 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

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

Coverage uses carbide-rpc --lib --features model with the same exclusions at every checkpoint.

Checkpoint Crate lines Uncovered Affected file lines Uncovered
Original 6,710 / 12,419 (54.03%) 5,709 144 / 219 (65.75%) 75
Table conversion 6,702 / 12,411 (54.00%) 5,709 136 / 211 (64.45%) 75
Expanded cases 6,712 / 12,407 (54.10%) 5,695 146 / 207 (70.53%) 61

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_rpc
  • cargo +1.96.0 llvm-cov test --locked --package carbide-rpc --lib --features model --remap-path-prefix --no-fail-fast --no-report
  • cargo make format-nightly
  • cargo make clippy
  • cargo make carbide-lints
  • CodeRabbit CLI review
  • Claude PR review

@chet
chet requested a review from a team as a code owner July 23, 2026 07:02
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7b69e2c6-0d7a-4bbd-a764-0a1c2c6f0025

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc0742 and 047f0ea.

📒 Files selected for processing (1)
  • crates/rpc/src/model/extension_service.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/rpc/src/model/extension_service.rs

Summary by CodeRabbit

  • Tests
    • Expanded coverage for observability configuration validation.
    • Added scenarios for missing and invalid configuration values, including names, logging paths, and Prometheus endpoints.
    • Added success cases confirming valid logging and Prometheus configurations are accepted.

Walkthrough

The observability configuration conversion tests now use reusable RPC builders and named scenarios covering missing, invalid, and valid logging and Prometheus configurations.

Changes

Observability validation test rewrite

Layer / File(s) Summary
Scenario-driven observability conversion tests
crates/rpc/src/model/extension_service.rs
Adds reusable RPC configuration builders and organizes conversion coverage into named scenarios with exact failure messages and expected decoded configuration values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 3952 — The pull request implements the proposed scenario-driven rewrite of observability validation tests.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the PR’s focus on observability validation boundary tests in the RPC layer.
Description check ✅ Passed The description is directly aligned with the test refactor and added boundary coverage described in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chet

chet commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@chet: Re-running a complete review of PR #3959, including the updated observability validation coverage and test structure.

ᕱ⑅ᕱ ✨

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2de970b and 9dc0742.

📒 Files selected for processing (1)
  • crates/rpc/src/model/extension_service.rs

Comment thread crates/rpc/src/model/extension_service.rs Outdated
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>
@chet
chet enabled auto-merge (squash) July 23, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant