← Back to Pull requests

build: guard root pom and published BOM version alignment with a consumer-level check (issue #295) #357

Closed
unknown closed this pull request without merging on Nov 07, 2026 03:17 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 15:45 UTC
Author

Describe what this PR does / why we need it

Issue #295 reported that the BouncyCastle and Tomcat upgrades in the root pom did not reach the separately published argi-bom, so BOM consumers resolved older versions (bcprov 1.85 vs 1.86, tomcat-embed 11.0.26 vs 11.0.27). On current main the versions themselves are already aligned — this PR delivers the part of the acceptance criteria that keeps them aligned without relying on hand-maintained duplicated properties, and validates the result the way the issue asks for: as a consumer sees it.

What is delivered

tools/scripts/check-bom-consistency.py (standard library only, no new Maven module, per the issue's constraint):

Source-level alignment check (default mode)

Compares the properties of the root pom.xml and argi-bom/pom.xml directly — revision and the five shared security families (jackson-2-bom, jackson-bom, bouncycastle, jsoup, tomcat). Any drift is reported line by line and fails with exit code 1. Because it reads the source poms, it runs on every CI build without requiring a release package or a flattened POM, which the existing verify-release-artifacts.py (release build only, io.github.agentic-ai-java group only) does not cover.

Consumer-level effective-version check (--verify-consumer)

Generates a minimal out-of-repo consumer whose dependencyManagement imports only argi-bom, declares the full managed BouncyCastle family (bcprov/bcpkix/bcutil) and the managed Tomcat embed family (core/el/jasper/websocket) without versions, and resolves them through maven-dependency-plugin:list. The effective versions are asserted to equal what the BOM manages — effective versions as a consumer sees them, not reactor property strings. The BOM keeps plain dependencyManagement entries, so a consumer's explicit override keeps working.

Wiring

  • build-and-test.yml: the check-style job gains make bom-consistency-check, so every PR catches "root upgraded, BOM not upgraded"; the build job gains make bom-consumer-verify after the release-artifact verification (installs argi-bom, then runs the consumer check).

  • tools/make/java.mk: the two targets above.
  • Red/green evidence

    Green: on this branch the script reports all six shared properties aligned and, with --verify-consumer, all seven managed artifacts resolving to the BOM versions through the out-of-repo consumer. Red: reverting the BOM's bouncycastle.version to 1.85 makes the check fail with DRIFT bouncycastle.version: root pom has 1.86, argi-bom has 1.85 (exit 1); restoring it goes back to green.

    Scope note

    This covers the core repository, where the BOM lives; consumers of the extensions repository inherit the fix through the same BOM. Cross-repository candidate version selection remains issue #229's scope, and no package names or coordinates change.

    Fixes #295

    Diff: 357 lines (+267 / -90) across 4 files Reviewer: yuluo-yx Review duration: 692m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 357 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #357"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.6% (MEDIUM) · Higher = larger blast radius
    42.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.8% · Safe to merge
    16.8%