Skip to content

Feature/dry run config - #1785

Merged
vivek-paltech merged 11 commits into
feature/vaas_servicefrom
feature/dry_run_config
Aug 6, 2026
Merged

Feature/dry run config#1785
vivek-paltech merged 11 commits into
feature/vaas_servicefrom
feature/dry_run_config

Conversation

@shivasaidonthulapal

@shivasaidonthulapal shivasaidonthulapal commented Aug 5, 2026

Copy link
Copy Markdown

🛠️ Description of Changes

Please provide a high-level overview of the changes included in this PR.

🧪 Testing Performed

Please describe the testing that was performed on the changes included in this PR.

🧑‍🔬 Unit Testing

  • I have written or updated unit tests to cover my changes
  • Coverage: 0.0%

📓 Documentation Updated

Please update any relevant sections in the project documentation that were impacted by the changes in the PR.

Summary by CodeRabbit

  • New Features
    • Rubric versions now record and display dry-run completion time and outcome.
    • Publishing can optionally require a completed dry run with an acceptable result or acceptable-with-warnings result.
  • Bug Fixes
    • Publishing is rejected with a clear conflict response when required dry-run conditions are not met.
  • Documentation
    • API descriptions now clarify that dry runs record outcomes without persisting evaluation results.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b0e648c6-4ce3-4066-a8e2-74c4e466462e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.70% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description retains template placeholders, provides no testing details, leaves unit testing unchecked, and reports 0.0% coverage. Replace the placeholders with a change summary and testing details, mark unit tests as completed if applicable, report coverage, and document impacted documentation.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title identifies the main change: configuration for rubric dry-run enforcement.

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.

❤️ Share

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

@shivasaidonthulapal
shivasaidonthulapal changed the base branch from dev to feature/vaas_service August 5, 2026 09:58

@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: 2

🤖 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
`@Java/validation/src/main/java/com/lantanagroup/link/validation/services/RubricExecutionService.java`:
- Around line 113-114: Update the log.info call in the dry-run recording flow to
sanitize version.getRubricId(), version.getSemver(), and
out.resultEntity().getStatus() before passing them as logger arguments, using
the existing logging-sanitization utility or pattern.

In
`@Java/validation/src/test/java/com/lantanagroup/link/validation/services/RubricRegistryServiceTest.java`:
- Around line 94-103: Extend RubricRegistryServiceTest with a focused publish
test for an ACCEPTABLE dryRunStatus whose dryRunCompletedAt remains null.
Configure the draft version and required dry-run gate, assert publish throws
RubricDryRunRequiredException, and verify no lifecycle event is written, reusing
the existing event-verification setup and symbols.
🪄 Autofix

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: 52b2a622-d9a6-4c77-bf45-db6ec859848e

📥 Commits

Reviewing files that changed from the base of the PR and between 0432801 and c7f1c83.

📒 Files selected for processing (17)
  • Java/validation/src/main/java/com/lantanagroup/link/validation/configs/RubricDryRunConfig.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/controllers/RubricController.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/controllers/RubricExceptionHandler.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/controllers/ValidationController.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/entities/RubricVersion.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/exceptions/RubricDryRunRequiredException.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/models/RubricVersionDetailDto.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/models/RubricVersionSummaryDto.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/repositories/RubricVersionRepository.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/services/RubricExecutionService.java
  • Java/validation/src/main/java/com/lantanagroup/link/validation/services/RubricRegistryService.java
  • Java/validation/src/main/resources/application.yml
  • Java/validation/src/main/resources/database/migrations/U20260804__Rubric_version_dry_run.sql
  • Java/validation/src/main/resources/database/migrations/V20260804__Rubric_version_dry_run.sql
  • Java/validation/src/test/java/com/lantanagroup/link/validation/controllers/RubricControllerTest.java
  • Java/validation/src/test/java/com/lantanagroup/link/validation/services/RubricExecutionServiceTest.java
  • Java/validation/src/test/java/com/lantanagroup/link/validation/services/RubricRegistryServiceTest.java

Comment on lines +113 to +114
log.info("Recorded dry run for rubric {} v{}: {}",
version.getRubricId(), version.getSemver(), out.resultEntity().getStatus());

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Sanitize all new logger arguments.

Line 113 logs rubric ID, semantic version, and result status without sanitization. Sanitize each value before passing it to log.info.

Proposed fix
 log.info("Recorded dry run for rubric {} v{}: {}",
-        version.getRubricId(), version.getSemver(), out.resultEntity().getStatus());
+        LogUtils.sanitize(version.getRubricId()),
+        LogUtils.sanitize(version.getSemver()),
+        LogUtils.sanitize(out.resultEntity().getStatus().name()));

As per path instructions, “All logging message arguments must be sanitized before they are passed to logger methods to avoid static code scanning security/vulnerability findings.”

🤖 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
`@Java/validation/src/main/java/com/lantanagroup/link/validation/services/RubricExecutionService.java`
around lines 113 - 114, Update the log.info call in the dry-run recording flow
to sanitize version.getRubricId(), version.getSemver(), and
out.resultEntity().getStatus() before passing them as logger arguments, using
the existing logging-sanitization utility or pattern.

Source: Path instructions

Comment on lines +94 to +103
@Test
@DisplayName("dry-run gate on + no completed dry run -> publish blocked")
void publish_dryRunRequiredButNotCompleted() {
dryRunConfig.setRequiredForPublish(true);
stubVersion(draftVersion());

assertThatThrownBy(() -> service().publish("piqi.core", "1.0.0", "qa"))
.isInstanceOf(RubricDryRunRequiredException.class)
.hasMessageContaining("no dry run has been completed");
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Test an acceptable status without a completion time.

publish requires dryRunCompletedAt and an acceptable dryRunStatus. This test only covers both values being absent. Add a focused JUnit test where dryRunStatus is ACCEPTABLE and dryRunCompletedAt is null. Assert that publishing throws RubricDryRunRequiredException and does not write a lifecycle event.

As per path instructions, “If/Else or Switch/Case blocks are introduced or modified — ensure each branch has a corresponding unit test.”

🤖 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
`@Java/validation/src/test/java/com/lantanagroup/link/validation/services/RubricRegistryServiceTest.java`
around lines 94 - 103, Extend RubricRegistryServiceTest with a focused publish
test for an ACCEPTABLE dryRunStatus whose dryRunCompletedAt remains null.
Configure the draft version and required dry-run gate, assert publish throws
RubricDryRunRequiredException, and verify no lifecycle event is written, reusing
the existing event-verification setup and symbols.

Source: Path instructions

@vivek-paltech
vivek-paltech marked this pull request as ready for review August 6, 2026 10:26
@vivek-paltech
vivek-paltech requested review from a team as code owners August 6, 2026 10:26
@vivek-paltech
vivek-paltech merged commit 13f90f7 into feature/vaas_service Aug 6, 2026
14 checks passed
@vivek-paltech
vivek-paltech deleted the feature/dry_run_config branch August 6, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants