Skip to content

chore: Align project structure with OAuthSheriff patterns - #11

Closed
cuioss-oliver wants to merge 24 commits into
mainfrom
chore/align-with-oauthsheriff-structure
Closed

chore: Align project structure with OAuthSheriff patterns#11
cuioss-oliver wants to merge 24 commits into
mainfrom
chore/align-with-oauthsheriff-structure

Conversation

@cuioss-oliver

Copy link
Copy Markdown
Collaborator

Summary

  • P1 Foundation: Upgrade parent POM (1.1.4 -> 1.4.4), Quarkus (3.23.3 -> 3.32.1), Node/npm, jjwt, DevUI SPI, add .mvn/jvm.config
  • P2 Benchmarking: Rename modules (benchmark-library -> benchmark-core, benchmark-integration-quarkus -> benchmark-integration-wrk), add benchmarking-common dependency, replace 15 bash scripts with single Python script, remove HTML/JSON templates
  • P3 CI/CD: Replace inline workflows with reusable ones from cuioss-organization v0.6.2, add dependabot-auto-merge, dependency-review, scorecards, claude workflows
  • P5 Documentation: Restructure CLAUDE.md -> agents.md pattern, remove obsolete doc/ai-rules.md

Test plan

  • ./mvnw clean install passes locally (all 10 modules, all tests green)
  • CI Maven Build workflow passes
  • CI Integration Tests workflow passes
  • Verify new workflows (dependabot-auto-merge, dependency-review, scorecards) are valid YAML

🤖 Generated with Claude Code

cuioss-oliver and others added 2 commits August 26, 2025 18:16
- Add npm caching to maven.yml workflow (all jobs)
- Add npm caching to maven-release.yml workflow
- Add npm caching to integration-tests.yml workflow
- Add npm caching to benchmark.yml workflow

This prevents "429 Too Many Requests" errors when downloading npm packages
from registry.npmjs.org during builds.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Structural refactoring to adopt OAuthSheriff's evolved build infrastructure,
benchmarking architecture, and CI/CD patterns.

P1 - Foundation upgrades:
- Parent POM: cui-java-parent 1.1.4 -> 1.4.4
- Quarkus: 3.23.3 -> 3.32.1, Node v20 -> v22, npm 10.5 -> 10.9.2
- BOM renamed: bom -> api-sheriff-bom, jjwt 0.12.6 -> 0.13.0
- DevUI SPI: quarkus-vertx-http-dev-ui-spi -> quarkus-devui-deployment-spi
- Added .mvn/jvm.config for JDK 22+ compatibility

P2 - Benchmarking architecture:
- Renamed benchmark-library -> benchmark-core
- Renamed benchmark-integration-quarkus -> benchmark-integration-wrk
- Added benchmarking-common dependency (0.4.1) for shared infrastructure
- Replaced old JMH integration code with WRK-based WrkResultPostProcessor
- Replaced 15 bash scripts with single Python benchmark-pages.py
- Removed all HTML/JSON template files (now generated by benchmarking-common)
- Upgraded: gson 2.13.2, hdrhistogram 2.2.2, commons-io 2.21.0

P3 - CI/CD workflow modernization:
- Expanded .github/project.yml with full build configuration
- Replaced inline workflows with reusable ones from cuioss-organization v0.6.2
- Modernized benchmark.yml: GitHub App tokens, Python script, direct git push
- Added dependabot-auto-merge, dependency-review, scorecards, claude workflows

P5 - Documentation:
- Restructured CLAUDE.md to stub referencing agents.md
- Created agents.md with full development guidance
- Removed obsolete doc/ai-rules.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on modernizing the project's structure and dependencies to align with OAuthSheriff patterns. It includes significant upgrades to core dependencies, improvements to benchmarking processes, enhancements to CI/CD workflows, and restructuring of documentation. The changes aim to improve maintainability, security, and development efficiency.

Highlights

  • Project Structure Alignment: This PR aligns the project structure with OAuthSheriff patterns, focusing on upgrading dependencies, renaming modules, and replacing inline workflows with reusable ones.
  • Dependency Upgrades: The parent POM, Quarkus, and other dependencies like jjwt were upgraded to newer versions.
  • Benchmarking Improvements: Modules were renamed, a common dependency was added, and bash scripts were replaced with a Python script for benchmarking.
  • CI/CD Enhancements: Inline workflows were replaced with reusable ones, and new workflows for dependabot-auto-merge, dependency-review, scorecards, and claude were added.
  • Documentation Restructuring: The CLAUDE.md file was restructured following the agents.md pattern, and obsolete documentation was removed.
Changelog
  • .github/project.yml
    • Added description, release configuration, maven build settings, sonar settings, pages settings, and github automation settings.
  • .mvn/jvm.config
    • Added a configuration file to enable native access.
  • CLAUDE.md
    • Restructured the file to follow the agents.md pattern, providing dev environment tips, git workflow guidelines, custom commands, and critical rules.
  • agents.md
    • Added a new file providing AI agent guidance for the project, including dev environment tips, testing instructions, pre-commit validation, and custom commands.
  • api-sheriff-library/pom.xml
    • Updated the artifactId of the bom dependency to api-sheriff-bom.
  • api-sheriff-quarkus-parent/api-sheriff-quarkus-deployment/pom.xml
    • Updated the artifactId of the DevUI integration dependency to quarkus-devui-deployment-spi.
  • api-sheriff-quarkus-parent/pom.xml
    • Removed junit-platform.version property, updated weld-junit5 version, and updated JUnit Platform versions to match Jupiter.
  • benchmarking/benchmark-core/pom.xml
    • Renamed artifactId from benchmark-library to benchmark-core, added benchmarking-common dependency, and updated JMH configuration properties.
  • benchmarking/benchmark-integration-wrk/pom.xml
    • Added a new module for WRK-based integration benchmarks, including dependencies and build configurations.
Ignored Files
  • Ignored by pattern: .github/workflows/** (9)
    • .github/workflows/benchmark.yml
    • .github/workflows/claude.yml
    • .github/workflows/dependabot-auto-merge.yml
    • .github/workflows/dependency-review.yml
    • .github/workflows/integration-tests.yml
    • .github/workflows/maven-release.yml
    • .github/workflows/maven.yml
    • .github/workflows/release.yml
    • .github/workflows/scorecards.yml
Activity
  • Parent POM upgraded from 1.1.4 to 1.4.4
  • Quarkus upgraded from 3.23.3 to 3.32.1
  • Node/npm updated
  • jjwt dependency updated
  • DevUI SPI updated
  • .mvn/jvm.config added
  • benchmark-library module renamed to benchmark-core
  • benchmark-integration-quarkus module renamed to benchmark-integration-wrk
  • benchmarking-common dependency added
  • 15 bash scripts replaced with a single Python script
  • HTML/JSON templates removed
  • Inline workflows replaced with reusable ones from cuioss-organization v0.6.2
  • dependabot-auto-merge workflow added
  • dependency-review workflow added
  • scorecards workflow added
  • claude workflow added
  • CLAUDE.md restructured to agents.md pattern
  • Obsolete doc/ai-rules.md removed
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a significant refactoring to align the project structure, build configuration, and CI/CD processes with the patterns used in the OAuthSheriff project. Key changes include upgrading the parent POM and several dependencies like Quarkus and jjwt, restructuring the benchmarking modules to use WRK and a centralized Python script instead of numerous shell scripts, and reorganizing the AI agent documentation. The changes are well-executed and greatly improve the project's maintainability and consistency. I've found a minor issue with a hardcoded local file path in the AI agent documentation (CLAUDE.md and agents.md), which should be addressed to ensure portability.

Comment thread CLAUDE.md Outdated
Comment thread agents.md Outdated
cuioss-oliver and others added 22 commits March 3, 2026 16:56
Address Gemini review comment: the verifyCuiLoggingGuidelines command
referenced /Users/oliver/git/cui-llm-rules/standards/logging which is
not portable. Changed to a repository-relative reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consolidate all AI guidance back into CLAUDE.md instead of
splitting across two files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the stub+agents.md split with a single comprehensive CLAUDE.md
covering build commands, code standards, pre-1.0 rules, logging,
testing, OpenRewrite markers, security, and git workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The module contained only a trivial stub benchmark (single getStatus() call)
with no meaningful JMH tests. Remove it entirely along with all references
in CI workflows, Python script, CLAUDE.md, and JMH dependency management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
API Sheriff is a standalone Quarkus app, not a reusable extension.
The extension pattern (runtime/deployment split, BOM, separate library)
was unnecessary overhead inherited from the OAuthSheriff template.

Changes:
- Merge api-sheriff-library + api-sheriff-quarkus into unified api-sheriff/
- Replace @buildstep processor with @RegisterForReflection annotations
- Delete bom/, deployment module, ApiSheriffRecorder, ApiSheriffProcessor
- Promote integration-tests from nested to root-level module
- Absorb dependency/plugin management from BOM + quarkus-parent into root POM
- Update Docker, CI/CD, scripts, and docs for new structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove unnecessary parent POM nesting (benchmarking/benchmark-integration-wrk)
and promote to a single top-level benchmark-integration module. Replace
performance-scoring.adoc with a link to the OAuthSheriff original.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move application code (QuarkusMain, REST resource) from
api-sheriff-integration-tests into api-sheriff module, making it the
standalone deployable application that produces the native executable.

- Move TestApplication → ApiSheriffApplication in api-sheriff
- Move TestResource → GatewayResource (@path("/api")) in gateway package
- Add application.properties with production defaults to api-sheriff
- Add native profile, Jandex plugin, resteasy-jackson and prometheus deps
- Simplify integration-tests to pure test coordinator (no compile Quarkus deps)
- Update Dockerfiles to COPY runner from api-sheriff/target
- Switch distroless Dockerfile to ubi9-quarkus-micro-image
- Move all test-specific config to docker-compose environment variables
- Update build/start scripts to target api-sheriff module
- Fix OpenRewrite markers in GatewayResource and BaseIntegrationTest

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…k tests

- Add api-sheriff/src/main/docker/Dockerfile.native for production
  deployments without baked-in certificates
- Fix ApiSheriffIntegrationIT paths from /test/ to /api/ and update
  response assertion to match GatewayResource output
- Add GatewayEndpointBenchmarkTest for /api/health and /api/info
  WRK output parsing validation
- Fix ../mvnw path bug in benchmark-integration pom.xml
- Add deployment section to README.adoc and docker build commands
  to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove quarkus.virtual-threads.shutdown-timeout (non-existent property,
  caused duration parse error)
- Remove api.sheriff.health.enabled (not wired to any @ConfigProperty)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test what we deliver: production Dockerfiles now live in
api-sheriff/src/main/docker/ and integration tests use them directly.
Test-specific configuration (TLS truststore, certificates) is injected
at docker-compose level instead of being baked into separate Dockerfiles.

- Dockerfile.native: distroless production image (digest-pinned, nonroot,
  no shell, no baked-in certs)
- Dockerfile.native.jfr: UBI micro with JFR profiling support
- Delete redundant test Dockerfiles from integration-tests module
- docker-compose: use production images with command: for truststore flags
  and volume mounts for certificates
- Fix Dockerfile reference in pom.xml and start script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align with OAuthSheriff pattern: Quarkus app logs via file logging to
mounted volume, Keycloak logs via docker logs dump before container
shutdown. Both log files land in target/ for CI artifact collection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove jjwt (3), easymock, weld-junit5, quarkus-config-yaml,
quarkus-hibernate-validator, quarkus-security, quarkus-scheduler,
quarkus-vertx-http, jakarta.servlet-api, jakarta.json-api,
junit-jupiter-params, parsson, rest-assured, slf4j bridges,
awaitility, jboss-logmanager from api-sheriff. Remove dev-ui-tests
from integration-tests. Remove version properties and BOM entries
from parent. None were imported in any Java source file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move benchmarking-common version to root-level version.oauth-sheriff
property. Remove gson, HdrHistogram, and commons-io — all transitive
from benchmarking-common.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire complete WRK benchmark pipeline following OAuthSheriff's proven
pattern: Dockerfile.wrk, Lua scripts, shell runners, Prometheus
monitoring, and Maven exec-plugin integration to invoke
WrkResultPostProcessor.

New files:
- Dockerfile.wrk (Alpine + wrk + Lua scripts)
- Lua scripts for /q/health/live and /api/health
- Shell scripts: pre-flight health check + 2 benchmark runners
- prometheus.yml for metrics scraping

Modified:
- docker-compose.yml: add Prometheus and WRK services
- pom.xml: add 4 exec-maven-plugin executions in benchmark profile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cessor

Remove 8 unused constants referencing JWT validation endpoints that don't
exist in API Sheriff. Replace test resource files with actual API Sheriff
benchmark data (healthLiveCheck, gatewayHealth) and update all tests to
match the real benchmark names and URLs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d dns:api-sheriff to SAN

Remove dead JVM flags (no effect in native image), redundant QUARKUS_LOG_LEVEL,
verbose network driver_opts (all defaults). Rename network jwt-integration to
api-sheriff. Add dns:api-sheriff to certificate SAN for WRK container connectivity.
Regenerate certificates with updated DNAME and SAN.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All issuer, health, metrics, and cache properties were copied from
OAuthSheriff but have no @ConfigProperty or @ConfigMapping backing in
the codebase. Quarkus silently ignores them at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move JFR-specific Docker configuration (image tag, dockerfile, volume)
out of the base docker-compose.yml into a separate override file, matching
the OAuthSheriff pattern. Shell scripts and Maven profiles now use
`-f` compose flags instead of environment variable substitution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…9000

Separate operational endpoints (health, metrics) from application traffic
by enabling the Quarkus management interface on a dedicated plain HTTP port.
This follows the Keycloak pattern already in the project, eliminates TLS
complexity for probes, and allows Prometheus to scrape without
insecure_skip_verify.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redundant prefix removed since the module is already inside the API-Sheriff
repository. Updated all references across POMs, GitHub Actions workflows,
shell scripts, and CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shorter, cleaner name since the repository context already implies
API Sheriff. Updated all references across POMs, GitHub Actions
workflows, shell scripts, Dockerfile, documentation, and CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pin image to digest for supply-chain security:
quay.io/keycloak/keycloak:26.5.4@sha256:ae8efb0d218d8921334b03a2dbee7069a0b868240691c50a3ffc9f42fabba8b4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cuioss-oliver

Copy link
Copy Markdown
Collaborator Author

Closing to create a new PR with updated scope (module renames + Keycloak update).

@cuioss-oliver
cuioss-oliver deleted the chore/align-with-oauthsheriff-structure branch July 22, 2026 06:41
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