Skip to content

refactor(java)!: switch idioms, deprecations, Lombok, warning gate - #198

Merged
cuioss-oliver merged 8 commits into
mainfrom
feature/plan-v02-02-java-idiom-sweep
Aug 9, 2026
Merged

refactor(java)!: switch idioms, deprecations, Lombok, warning gate#198
cuioss-oliver merged 8 commits into
mainfrom
feature/plan-v02-02-java-idiom-sweep

Conversation

@cuioss-oliver

@cuioss-oliver cuioss-oliver commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

One idiom sweep over the api-sheriff corpus, bracketed between the two halves of the build
mechanism that keeps it from silently regressing: <showDeprecation> goes on first so the
compiler — not grep — enumerates the deprecation set, and <failOnWarning> goes on last, once
the corpus is clean.

This is a deliberate BREAKING change (compatibility: breaking). Per the repository's Pre-1.0
Rules there are no deprecation markers, no transitional shims and no backward-compatibility path:
AuthConfig.require changes type from String to a bound Require enum, the deprecated
quarkus.log.file.enable property is replaced outright by quarkus.log.file.enabled, and
failOnWarning now makes a compiler warning a build failure across all six reactor modules.
Anything downstream that constructs an AuthConfig with a string, sets the old property, or
compiles with a warning present will break — intentionally.

Changes

The bracket

  • pom.xml<showDeprecation>true</showDeprecation> added to the pluginManagement
    maven-compiler-plugin entry (opens the bracket), then <failOnWarning>true</failOnWarning>
    (closes it). Reactor-wide, all six modules; javac now runs with -Werror.
  • CLAUDE.md — the Pre-Commit Process prose reconciled with what the gate now actually
    enforces, so the mechanism and its description agree.

AuthConfig.require: StringRequire enum

  • New api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/model/Require.java; consumers
    moved in lockstep across AuthConfig.java, ConfigValidator.java, AuthenticationStage.java,
    GatewayEdgeRoute.java and RouteTableBuilder.java; the enum registered in
    ConfigModelReflection.java for the native image. Three duplicated REQUIRE_* constant sets
    retired. No YAML/doc value moves — ConfigLoader enables ACCEPT_CASE_INSENSITIVE_ENUMS, so
    none / bearer / session keep their lowercase spelling on the config surface.

Deprecated quarkus.log.file.enable migration

  • Six carriers, 20 occurrences: api-sheriff/src/main/resources/application.properties,
    integration-tests/docker-compose.yml (7, env spelling),
    doc/development/README.adoc, .claude/skills/run-integration-tests/SKILL.md,
    ShippedApplicationPropertiesTest.java, ItProfileConfigBindingWiringTest.java.
  • The replacement was researched against the shipped artifact before any carrier was edited:
    io.quarkus.runtime.logging.LogRuntimeConfig.FileConfig in quarkus-core-3.38.1 declares both
    the deprecated Optional<Boolean> enable() (@Deprecated(since = "3.26", forRemoval = true)) and
    the replacement boolean enabled() (@WithDefault(false)). Key → quarkus.log.file.enabled,
    env → QUARKUS_LOG_FILE_ENABLED. The shipped OFF-by-default posture (ADR-0032) is preserved
    and expressed more strongly
    : the replacement carries a framework-level false default where the
    deprecated accessor had none.

Java deprecation retirement (enumerated by the compiler, not by grep)

  • Five sites in four files. The framework-boundary one is WebSocketRelayStage.java, migrated off
    the deprecated HttpClient WebSocket path onto the Vert.x WebSocketClient; the two
    HttpServerRequest.host() fallbacks in GatewayEdgeRoute.java are retired against
    authority().

Surveys (published enumeration is the deliverable)

  • if/else-if → switch: 19 files surveyed, 3 chains converted in ConfigLoader.java and
    GatewayEdgeRoute.java. TokenValidatorProducer.applyJwks qualifies but sits outside the
    deliverable's declared footprint and was deliberately deferred rather than smuggled in.
  • Lombok against the java-lombok decision table: 30 files surveyed, zero mutations. 23
    @Builder-on-record and 6 @UtilityClass sites match the table verbatim; RouteRuntime.java is
    kept as a @Builder @Getter final class because its four @Builder.Default fields cannot live on
    a record — a conversion would trade declarative fail-closed defaults for a hand-written partial
    builder.
  • OpenRewrite unnamed-variable recipe: none exists in any module this build already resolves.
    Every OpenRewrite jar in the resolved repository was swept (UseUnnamed / UnnamedVariable /
    UnnamedPattern) with zero hits; the active UpgradeToJava25 recipe list
    (rewrite-migrate-java 3.40.0) and rewrite-static-analysis 2.39.0 declare none. No recipe was
    appended and pom.xml carries no change from this deliverable. Residual, deliberately left open:
    a module the build does not resolve might carry one — adding a module is a new dependency and
    out of scope.

Operator decisions (recorded verbatim, and load-bearing on this review)

Two questions were put to the operator during outline authoring. Both answers are reproduced here
because the authority behind them should be auditable rather than inferred.

q1 — the enum-conversion rationale. Asked because the outline's own first-party verification
had REFUTED both justifications the request gave for the conversion
, leaving the change without the
rationale it was requested on.

Answer: "Proceed as outlined (type-safety only)"

The operator re-confirmed the full conversion after reading the refutation. Deliverable 4
therefore proceeds on a narrowed, type-safety-only rationale, and a reviewer should hold it to
exactly that and no more:

  • What it does buy: compile-time typing of the auth posture, plus retirement of the three
    duplicated REQUIRE_* constant sets (AuthenticationStage, ConfigValidator,
    GatewayEdgeRoute).
  • What it does NOT buy — do not approve it on these grounds: there is no behavioural delta
    and no security improvement. The claim that "nothing rejects an unknown require value today"
    is false: gateway.schema.json and endpoint.schema.json already declare
    "require": {"type": "string", "enum": ["none", "bearer", "session"]}, and ConfigLoader runs
    schema validation before bind, so require: bearerr is already refused at load time as a
    collected ConfigError. It never reaches AuthenticationStage. The startup-rejection behaviour
    this change was originally pitched on already existed.

q2 — the WebSocket client dependency. Asked because the epic carries a "never add dependencies
or plugins without explicit user approval" clause and the WebSocketRelayStage fix appeared to need
a new artifact.

Answer: "Use the new dependency, hereby accepted."

That is the explicit operator approval the clause requires — and the approval went unused. It
was treated as a permission, not an instruction: the outline first verified whether an artifact
was genuinely required, and it is not. io.vertx:vertx-core:4.5.30 is already on the api-sheriff
compile classpath and already contains io/vertx/core/http/WebSocketClient.class, with
Vertx.createWebSocketClient() declared on io.vertx.core.Vertx in the same jar.

No new Maven artifact is added by this PR. Recording the approval anyway matters: a reviewer
seeing "no dependency added" should be able to tell the difference between a constraint that
blocked a fix
and a fix that turned out not to need the allowance it was granted. This is the
second.

Pre-submission self-review: two contract-drift defects caught and fixed

The self-review pass before submission found and fixed two defects, both landed in b94f17b. They
are named here rather than buried in the diff, because both are the kind a green suite does not
catch:

  1. The Require dispatch was not compiler-checked for exhaustiveness. A constant-only switch
    statement is a legacy switch, so it carries no exhaustiveness requirement — a future fourth
    Require constant would have fallen through silently while the route still reported itself
    AUTHENTICATED. That is a fail-open auth path. Converted to a form the compiler must prove
    exhaustive.
  2. The authorityHost Javadoc asserted a false equivalence between host() and
    authority().host(). The two are not interchangeable in the case the fallback exists to handle;
    the doc now describes what the code actually does.

Test Plan

  • Quality gate green on the whole reactor at HEAD (verify -Ppre-commit)
  • Full Maven verify green on the whole reactor at HEAD (verify)
  • 1873 module tests green
  • WebSocketProxyIT 8/8 green against a freshly built native image (111 integration tests
    total) — the WebSocket client swap is the only framework-boundary change here and the native
    image is where a Vert.x client swap historically surprises, so a JVM-only pass was not
    accepted as discharge
  • Negative control on the new gate: with failOnWarning on, a deliberately re-introduced
    deprecated HttpServerRequest.host() call failed the build (status: error,
    exit_code: 1), with the offending site reported as GatewayEdgeRoute.java:1169. Worth
    recording precisely: the file and line land on the warnings[] row while errors[]
    carries the -Werror cause naming the file without a line — so the payload does carry
    file+line, just not both on one errors[N] row. Scratch edit reverted; the file's diff is
    empty. A gate that has never been observed to fail is not known to gate.

Related Issues

Refs #178 — the deprecated quarkus.log.file.enable migration (6 carriers / 20 occurrences) is the
work that issue asks for. It is deliberately not auto-closed by this PR: the issue gets a
comment naming this PR and the merge commit, and is closed post-merge.


Generated by plan-finalize skill

Intent

The problem. Compiler warnings were invisible to this project's agent-facing build surface. The
reactor configured maven-compiler-plugin with <release>25</release> only — no showDeprecation,
no -Xlint, no failOnWarning — so deprecated-API usage accumulated in the corpus unseen, and the
Maven executor's structured payload has no warnings channel to surface it through even when javac
does emit it. Alongside that, four idiom-level defects had accrued: a deprecated Quarkus logging
property, string-typed auth posture triplicated across three classes, if/else-if chains where a
switch belongs, and unaudited Lombok usage.

The approach. Bracket the corpus work between the two halves of the mechanism. showDeprecation
goes on FIRST, so the deprecation set is enumerated by running the compiler across the whole
reactor
rather than by grepping for a guess — that is how five sites in four files were found where
the request had named two in one. failOnWarning goes on LAST, once the corpus is clean, because a
warning only reaches the executor's errors[] payload once it is a build failure; lint alone does
not make it visible to an agent. The order is load-bearing, not stylistic. Every deprecation site is
retired by migrating off the warned construct, never by suppressing it — a @SuppressWarnings
added to reach green would hollow out the gate while leaving it

[Intent truncated — 1393 of 2806 characters shown; full outline in the plan workspace]

Summary by CodeRabbit

  • New Features

    • Authentication requirements now consistently support anonymous, bearer-token, and session access.
    • WebSocket relay connections are handled more efficiently.
  • Bug Fixes

    • Corrected file-logging configuration properties and environment variables.
    • Improved handling of authentication configuration states.
  • Documentation

    • Updated logging and integration-test guidance.
    • Expanded development guidance for compiler warnings and deprecations.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @cuioss-oliver, your pull request is larger than the review limit of 150000 diff characters

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cuioss/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 720c1224-c72e-48df-8a39-aa60dc628b44

📥 Commits

Reviewing files that changed from the base of the PR and between b94f17b and be0eeba.

📒 Files selected for processing (2)
  • .claude/skills/run-integration-tests/SKILL.md
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/model/AuthConfig.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/model/AuthConfig.java

📝 Walkthrough

Walkthrough

The change replaces string authentication requirements with the public Require enum, updates routing and WebSocket relay wiring, corrects Quarkus file-logging keys, and configures Maven to report deprecations and fail on compiler warnings.

Changes

Gateway typing and cleanup

Layer / File(s) Summary
Typed authentication contract and validation
api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/model/*, api-sheriff/src/main/java/de/cuioss/sheriff/gateway/auth/*, api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/*, api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/*, api-sheriff/src/test/java/de/cuioss/sheriff/gateway/auth/*
AuthConfig.require now uses Require. Authentication dispatch, validation, route construction, schema contract checks, and related tests use enum values.
Edge routing and WebSocket relay
api-sheriff/src/main/java/de/cuioss/sheriff/gateway/edge/*, api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/*
Gateway routing uses typed posture checks, centralized authority-host parsing, switch dispatch, and a shared WebSocketClient for relays.
Logging keys and compiler enforcement
api-sheriff/src/main/resources/application.properties, integration-tests/*, doc/development/README.adoc, pom.xml, CLAUDE.md, .claude/skills/run-integration-tests/SKILL.md
File-logging properties use enabled and ENABLED. Maven compiler warnings fail the build, and contributor guidance documents the new behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • cuioss/API-Sheriff#126: Shares the GatewayEdgeRoute and WebSocketRelayStage implementation areas.
  • cuioss/API-Sheriff#133: Shares the RouteTableBuilder and ConfigValidator authentication-posture code paths.
  • cuioss/API-Sheriff#142: Shares the Quarkus file-logging configuration, integration-test wiring, and documentation changes.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main refactoring, switch conversions, deprecation work, and compiler warning gate introduced by the changeset.

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.

@cuioss-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
api-sheriff/src/main/java/de/cuioss/sheriff/gateway/edge/GatewayEdgeRoute.java (1)

361-365: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Close the shared WebSocketClient on shutdown.

createWebSocketClient() creates one long-lived client for the edge, but onShutdown() only drains in-flight requests. Add an explicit shutdown/close path for webSocketRelayStage’s WebSocketClient to release pooled connections and avoid leaving resources active after the edge shuts down.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: cuioss/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a12040d0-e56d-4574-9883-66d984a9216c

📥 Commits

Reviewing files that changed from the base of the PR and between 89a3cfe and b94f17b.

📒 Files selected for processing (35)
  • .claude/skills/run-integration-tests/SKILL.md
  • CLAUDE.md
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/auth/AuthenticationStage.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/RouteTableBuilder.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/load/ConfigLoader.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/model/AuthConfig.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/model/Require.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/config/validation/ConfigValidator.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/edge/GatewayEdgeRoute.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/edge/WebSocketRelayStage.java
  • api-sheriff/src/main/java/de/cuioss/sheriff/gateway/quarkus/ConfigModelReflection.java
  • api-sheriff/src/main/resources/application.properties
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/auth/AuthenticationStageTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/bff/runtime/SessionAuthenticationStageTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/DocumentedSetsContractTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/RouteTableBuilderTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/load/ConfigLoaderTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/model/ConfigModelContractTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/topology/TopologyResolverTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/validation/ConfigValidatorRouteDisjointnessTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/config/validation/ConfigValidatorTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/GatewayEdgePipelineTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/GatewayEdgeRouteBffWiringTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/GatewayEdgeRouteTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/GrpcDispatchStageTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/RouteRuntimeAssemblerTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/edge/WebSocketRelayStageTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/quarkus/ConfigFailFastTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/quarkus/ConfigProducerTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/quarkus/ShippedApplicationPropertiesTest.java
  • api-sheriff/src/test/java/de/cuioss/sheriff/gateway/routing/RouteRuntimeTest.java
  • doc/development/README.adoc
  • integration-tests/docker-compose.yml
  • integration-tests/src/test/java/de/cuioss/sheriff/gateway/integration/ItProfileConfigBindingWiringTest.java
  • pom.xml

Comment thread .claude/skills/run-integration-tests/SKILL.md Outdated
Comment thread CLAUDE.md
@cuioss-oliver

Copy link
Copy Markdown
Collaborator Author

Triage dispositions

In reply to comment_id: PRR_kwDOPatrT88AAAABI3zEhg

Answered. The four inline findings are dispositioned on their own threads (two fixed, two declined with reasons). On the single nitpick raised in this review body — close the shared WebSocketClient on shutdown — declining: vertx.createWebSocketClient() registers the client against the managed Vert.x instance close hooks, so Quarkus closing Vert.x at shutdown already releases the pooled connections and an explicit close would be redundant. It would also be wrong at the site suggested: onShutdown is the drain observer, so closing the dialer at the top of the drain window would tear down exactly the in-flight relays the bounded drain exists to let finish.

cuioss-oliver added a commit that referenced this pull request Aug 9, 2026
Two valid review findings from the PR #198 automated review:

- run-integration-tests SKILL.md claimed ItProfileConfigBindingWiringTest
  "guards that pairing" for QUARKUS_LOG_FILE_ENABLED and LOG_FILE_PATH.
  Reading the whole class shows it asserts only the enable flag --
  LOG_FILE_PATH and the /logs mount appear nowhere in it. Reworded to
  claim only the coverage the test actually provides.

- AuthConfig was missing the thread-safety note the project's Javadoc
  standard requires. Added; the require/override prose is untouched.

Three further comments were declined with rationale on the threads:
a MemorySize.of(long) compile claim refuted by green CI on this head,
a request to drop the documented warnings[]/errors[] payload shape that
contradicts both the build-execution standard and this plan's own
deliverable-9 negative control, and a nitpick to close the shared
WebSocketClient on shutdown (Vert.x close hooks already release it, and
onShutdown is the drain observer -- closing there would tear down the
in-flight relays the drain exists to let finish).

Refs #178
cuioss-oliver and others added 8 commits August 9, 2026 05:25
Add <showDeprecation>true</showDeprecation> beside <release>25</release> in the
pluginManagement maven-compiler-plugin entry, so javac reports deprecated-API use
across the whole reactor instead of collapsing it to a summary note.

Every compile/testCompile line now runs javac [debug deprecation release 25] and
the five known deprecation sites surface as warnings. failOnWarning is
deliberately NOT set here - that is deliverable 9, and turning it on now would
fail the build on the sites deliverable 6 has not yet retired.

api-sheriff/pom.xml is left alone: it configures annotationProcessorPaths only,
and the parent's pluginManagement entry already reaches it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBJYx6sqpfKg5tV1fJ1v4E
…e.enabled

Quarkus 3.26 deprecated quarkus.log.file.enable for removal and replaced it with
quarkus.log.file.enabled. Verified against the shipped artifact rather than the
docs: io.quarkus.runtime.logging.LogRuntimeConfig.FileConfig in
quarkus-core-3.38.1.jar declares a deprecated Optional<Boolean> enable()
annotated @deprecated(since="3.26", forRemoval=true) alongside the replacement
boolean enabled() annotated @WithDefault("false").

Migrated every occurrence across all six carriers - application.properties,
integration-tests/docker-compose.yml (all seven gateway services move together,
since the enable flag and LOG_FILE_PATH are one decision),
doc/development/README.adoc, .claude/skills/run-integration-tests/SKILL.md, and
the two guards that assert on the key (ShippedApplicationPropertiesTest,
ItProfileConfigBindingWiringTest). A repo-wide sweep now reports zero remaining
occurrences of the deprecated spelling.

The shipped OFF-by-default posture (ADR-0032) is preserved and in fact expressed
more strongly: the replacement carries @WithDefault("false") where the
deprecated accessor had no default at all.

The env-var spelling follows the same mechanical UPPER_SNAKE transform, so
QUARKUS_LOG_FILE_ENABLE becomes QUARKUS_LOG_FILE_ENABLED.

Refs #178

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBJYx6sqpfKg5tV1fJ1v4E
Replaces the three duplicated REQUIRE_* string-constant sets in ConfigValidator, AuthenticationStage and GatewayEdgeRoute with one shared enum, making the posture dispatch an exhaustive compiler-checked switch. Require.toString() keeps the lowercase config spelling so operator-facing messages and the ROUTE_POSTURE log line stay byte-identical. DocumentedSetsContractTest now binds the enum to the require arrays of both bundled schemas.
Converts ConfigLoader.substitute (ObjectNode/ArrayNode type dispatch) and the two GatewayEdgeRoute chains (protocol dispatch, rejection-WARN dispatch) to switches with identical branch selection. The other 16 enumerated files carry no chain a switch expresses without changing selection; per-file verdicts are recorded in the plan's work/d5-switch-survey.md for the PR body.
Replaces the two deprecated HttpServerRequest.host() fallback arms in GatewayEdgeRoute with one shared authorityHost() seam, migrates the WebSocket dial from the deprecated HttpClient.webSocket(WebSocketConnectOptions) to an edge-wide Vert.x WebSocketClient, and swaps the two deprecated-for-removal MemorySize(BigInteger) test constructions for MemorySize.of(long). No dependency was added and pom.xml is untouched; no in-code deprecation suppression was introduced. A clean whole-reactor test-compile now carries zero deprecation warnings.
Adds failOnWarning to the pluginManagement compiler-plugin entry beside showDeprecation, so javac runs with -Werror across all six modules and a deprecation stops scrolling past in the log. Affordable only because every site was retired by migration rather than suppression: a clean whole-reactor test-compile is deprecation-free and this plan added no @SuppressWarnings. Negative control: re-introducing HttpServerRequest.host() failed the build naming GatewayEdgeRoute.java:1169, and the scratch edit was reverted. CLAUDE.md's Pre-Commit Process now describes what the gate actually enforces, including that the fix is migration and not suppression.
The pre-submission self-review found that AuthenticationStage.process
relied on a compile-time guarantee that does not exist. A switch
statement whose labels are all enum constants is a legacy switch: javac
neither requires it to be exhaustive nor warns about it. Verified under
this project's exact flags (--release 25 -Xlint:all -Werror), a switch
missing a constant compiles clean and falls through silently.

That matters here because the plan had removed the pre-existing
fail-closed backstop on the strength of that guarantee. A future fourth
Require constant would have made process() a silent no-op for that
posture while RouteTableBuilder.effectiveAccessLevel still reported the
route AUTHENTICATED, so anchor-floor checks would pass -- a fail-open
auth bypass with no test and no gate behind it.

Adding a `case null` arm makes it an enhanced switch, which javac IS
required to check: a missing constant is now a compile error. The arm is
unreachable at runtime (AuthConfig's canonical constructor rejects null)
and doubles as the restored fail-closed backstop.

Also corrects two Javadoc claims the review refuted:

- Require's class doc no longer asserts automatic compiler-checked
  exhaustiveness, and explains why the case-null arm is load-bearing.
- GatewayEdgeRoute.authorityHost no longer claims host() and
  authority().host() agree. host() returns the raw Host header including
  the port, so they differ whenever a port is present; substituting it
  back would leak the port into the reserved-path match and the
  security-validated request host. The real reason dropping the fallback
  is behaviour-preserving is stated instead.

Refs #178
Two valid review findings from the PR #198 automated review:

- run-integration-tests SKILL.md claimed ItProfileConfigBindingWiringTest
  "guards that pairing" for QUARKUS_LOG_FILE_ENABLED and LOG_FILE_PATH.
  Reading the whole class shows it asserts only the enable flag --
  LOG_FILE_PATH and the /logs mount appear nowhere in it. Reworded to
  claim only the coverage the test actually provides.

- AuthConfig was missing the thread-safety note the project's Javadoc
  standard requires. Added; the require/override prose is untouched.

Three further comments were declined with rationale on the threads:
a MemorySize.of(long) compile claim refuted by green CI on this head,
a request to drop the documented warnings[]/errors[] payload shape that
contradicts both the build-execution standard and this plan's own
deliverable-9 negative control, and a nitpick to close the shared
WebSocketClient on shutdown (Vert.x close hooks already release it, and
onShutdown is the drain observer -- closing there would tear down the
in-flight relays the drain exists to let finish).

Refs #178
@cuioss-oliver
cuioss-oliver force-pushed the feature/plan-v02-02-java-idiom-sweep branch from d07800a to be0eeba Compare August 9, 2026 03:32
@cuioss-oliver
cuioss-oliver added this pull request to the merge queue Aug 9, 2026
Merged via the queue into main with commit e343404 Aug 9, 2026
26 checks passed
@cuioss-oliver
cuioss-oliver deleted the feature/plan-v02-02-java-idiom-sweep branch August 9, 2026 04:11
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