TECH_DEBT: Add SKIP/SUPPRESS strategies to validation categorization - #1684
Draft
c-schuler wants to merge 21 commits into
Draft
TECH_DEBT: Add SKIP/SUPPRESS strategies to validation categorization#1684c-schuler wants to merge 21 commits into
c-schuler wants to merge 21 commits into
Conversation
Captures the design and phased rollout plan for promoting categories.json rules from pure post-validation labels to a tiered set of strategies that can also skip work at the HAPI extension-point level. Pure documentation — no code change.
Lays in the type and storage infrastructure for per-rule handling strategies (SKIP / SUPPRESS / LABEL) without yet wiring the new fields into the validation lifecycle.
Lands the policy-advisor mechanism that lets SKIP-strategy categories short-circuit HAPI's coded-content validation before the underlying terminology call is made.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
c-schuler
marked this pull request as draft
June 23, 2026 18:12
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.
🛠️ Description of Changes
Promotes categorization rules from post-validation labels to advisor-driven strategies that drop noise before it reaches OperationOutcome. Implements four phases of the roadmap in Java/validation/VALIDATION-CATEGORIES-DESIGN.md: the SKIP and SUPPRESS strategies, two narrowing axes per strategy, and seven rule migrations.
Expected production impact
After deploy and advisor reload:
CPU impact on terminology validation specifically is modest because the team's existing remote-TS response caching already eliminates most network cost on the SKIP-targeted message families. The headline benefits are signal-to-noise — fewer messages downstream consumers have to filter - and the Grafana visibility for tuning which rules to migrate next.
Wire-format / API impact
None for external consumers. The ValidationComplete Kafka message shape is unchanged. The validation service's REST API is unchanged. Internal-only changes: ValidationService constructor gains a CategoryBackedPolicyAdvisor injection; CategorizationService gains a ValidationMetrics injection.
Database migrations
Two pairs of V/U scripts:
All migrations use defensive if not exists (select 1 from sys.columns ...) guards. Matching U*.sql undo scripts ship alongside.
In environments using spring.jpa.hibernate.ddl-auto: update (the docker profile), Hibernate handles the column adds automatically. In production environments where ddl-auto defaults to none, the V scripts are the only path. Open item: confirm who runs these scripts in prod - flagged in the design doc as an unresolved follow-up from Phase 1.
🧪 Testing Performed
98 validation tests, all green. Started at 50 before this work.
🧑🔬 Unit Testing
📓 Documentation Updated
Java/validation/VALIDATION-CATEGORIES-DESIGN.md (517 lines) is the source of truth and contains schema reference, phased roadmap, migration log, related-code map. Anyone joining the work should read that first. Worth a few minutes from reviewers as well. It captures the design decisions made during this PR (including the ones I'd have made differently in hindsight, with the rationale preserved).