Claim status tool cards champva be#27235
Conversation
|
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: config/benefits_claims/claim_status_meta/ivc_champva/default.json |
Generated by 🚫 Danger |
|
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: config/benefits_claims/claim_status_meta/ivc_champva/default.json |
|
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: lib/benefits_claims/claim_status_meta/config_loader.rb |
9f58de7 to
11225dc
Compare
|
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: lib/benefits_claims/claim_status_meta/config_loader.rb |
There was a problem hiding this comment.
Pull request overview
Adds configurable Claim Status Tool (CST) “claimStatusMeta” content via provider-scoped JSON files and a shared loader, and wires in an IVC CHAMPVA benefits-claims provider with multi-provider routing and a CHAMPVA custom-content feature gate.
Changes:
- Introduces
BenefitsClaims::ClaimStatusMeta::ConfigLoaderand provider JSON configs forclaimStatusMeta. - Adds IVC CHAMPVA provider plumbing + legacy provider-type alias mapping for backward compatibility.
- Extends claim DTO/serialization to optionally include
claimStatusMetaand adds feature flagcst_champva_custom_content.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/controllers/v0/concerns/multi_provider_support_spec.rb | Adds coverage for legacy provider-type alias mapping. |
| spec/controllers/v0/benefits_claims_controller_spec.rb | Updates expectations for supported provider types. |
| lib/benefits_claims/responses/claim_response.rb | Extends canonical claim DTO to include claim_status_meta. |
| lib/benefits_claims/providers/lighthouse/claim_serializer.rb | Serializes claimStatusMeta when present. |
| lib/benefits_claims/providers/lighthouse/claim_builder.rb | Populates DTO with Lighthouse claim_status_meta. |
| lib/benefits_claims/providers/lighthouse/builders/claim_status_meta_builder.rb | Loads Lighthouse metadata config via shared loader. |
| lib/benefits_claims/providers/ivc_champva/ivc_champva_benefits_claims_provider.rb | New provider for IVC CHAMPVA claim list/detail retrieval. |
| lib/benefits_claims/providers/ivc_champva/claim_serializer.rb | Reuses Lighthouse serializer for JSON:API shaping. |
| lib/benefits_claims/providers/ivc_champva/claim_builder.rb | Builds CHAMPVA claim DTOs + flipper-gated claim_status_meta. |
| lib/benefits_claims/concerns/multi_provider_base.rb | Tightens claim lookup validation across providers. |
| lib/benefits_claims/claim_status_meta/config_loader.rb | New JSON loader with production caching behavior. |
| config/initializers/benefits_claims_providers.rb | Registers :ivc_champva provider in the registry. |
| config/features.yml | Adds cst_champva_custom_content feature toggle entry. |
| config/benefits_claims/claim_status_meta/lighthouse/default.json | Adds Lighthouse default metadata JSON. |
| config/benefits_claims/claim_status_meta/ivc_champva/default.json | Adds IVC CHAMPVA default metadata JSON. |
| app/controllers/v0/concerns/multi_provider_support.rb | Adds provider type mappings including legacy alias. |
| .github/CODEOWNERS | Adds ownership for new config and loader directories. |
| private | ||
|
|
||
| def cached_config(provider_name, variant_name) | ||
| Rails.cache.fetch("benefits_claims/claim_status_meta/#{provider_name}/#{variant_name}") do |
There was a problem hiding this comment.
Rails.cache.fetch here has no TTL or deploy/versioned cache key. In production cache stores (Redis/Memcached), this can cause stale JSON metadata to survive deploys/updates. Consider adding expires_in and/or incorporating the file mtime/app version into the cache key to ensure new JSON content takes effect predictably.
| Rails.cache.fetch("benefits_claims/claim_status_meta/#{provider_name}/#{variant_name}") do | |
| file_path = BASE_PATH.join(provider_name, "#{variant_name}.json") | |
| file_version = File.exist?(file_path) ? File.mtime(file_path).to_i : 'missing' | |
| cache_key = "benefits_claims/claim_status_meta/#{provider_name}/#{variant_name}/#{file_version}" | |
| Rails.cache.fetch(cache_key, expires_in: 1.hour) do |
| def self.include_champva_custom_content?(user) | ||
| return true unless defined?(Flipper) | ||
|
|
||
| Flipper.enabled?(:cst_champva_custom_content, user) | ||
| end |
There was a problem hiding this comment.
This feature-flagged behavior (cst_champva_custom_content) is new and affects the response shape (presence/absence of claimStatusMeta). Add specs that assert both Flipper ON and OFF outcomes for CHAMPVA claims so the rollout gate is protected against regressions.
|
Look like I have to resolve some conflicts here, I'll push that shortly. |
e2e1ca5
ec495b6 to
e2e1ca5
Compare
0b96bff to
a5a2840
Compare
af6c285
Keep your PR as a Draft until it's ready for Platform review. A PR is ready for Platform review when it has a teammate approval and tests, linting, and settings checks pass CI. See these tips on how to avoid common delays in getting your PR merged.
Summary
cst_champva_custom_contentso API can suppress CHAMPVA metadata when disabled.config/benefits_claims/claim_status_meta/...) and load it through a dedicated loader.Flipper.enabled?(:cst_champva_custom_content, user).cst_champva_custom_contentfor controlled cohorts and confirm CHAMPVA detail/list content parity on vets-website with no CST legacy regressions.Related issue(s)
department-of-veterans-affairs/vets-website#43437
department-of-veterans-affairs/va.gov-team#136629
Testing done
claimStatusMetawhen flippercst_champva_custom_contentis ON.cst_champva_custom_contentand verify CHAMPVA response omits/suppresses custom metadata while claim record still resolves.ruby -c) passed.jq empty) passed.Screenshots
Note: Optional
N/A (API/backend-only behavior)
What areas of the site does it impact?
GET /v0/benefits_claimsaggregated claim list behavior for CHAMPVA provider entriesGET /v0/benefits_claims/:idprovider-specific detail behaviorclaimStatusMetais consumed (status/details/files/overview/list card/help copy)Acceptance criteria
Requested Feedback
Please focus review on:
cst_champva_custom_content(metadata on/off response behavior)