Dani Velasco Solution - #62
Open
daniivelascoo wants to merge 2 commits into
Open
Conversation
Reactive Spring Boot (WebFlux) service exposing GET /product/{id}/similar,
aggregating the existing similarids + product-detail upstream APIs.
- Parallel, order-preserving fan-out with flatMapSequential
- Resilience: per-product and similarids timeouts; skip on 404/500/timeout
- Explicit, tuned Reactor Netty connection pool (measured throughput vs
result-completeness tradeoff, documented in app/README.md)
- Dockerfile + docker-compose "yourapp" service
- .claude tooling (skills, agents, hooks, commands) for dev and maintenance
Cover the service contract with 36 tests and add logging that stays silent on the hot path. Tests (MockWebServer stubs the upstream in-process; no Docker or Simulado needed, ~25s): - ProductClientTest: both timeouts, 404/500/malformed-body skipping, numeric id coercion - SimilarProductsServiceTest: similarity order preserved when an earlier product answers last, parallel fan-out asserted with virtual time, dropping of unresolvable products - SimilarProductsControllerTest: 200 / empty array / 404 / 5xx mapping - SimilarProductsIntegrationTest: the five mock scenarios end to end - ProductClientLoggingTest: pins the log levels Logging: WARN for what makes a request fail, DEBUG for what the design deliberately tolerates. Skipping a product runs on nearly every request under load, so it stays at DEBUG; at the default INFO the full scenario set produces zero per-request lines. Level is env-overridable via LOG_LEVEL, and the effective client config is logged once at startup. Also: - Fix a PreToolUse hook that used a non-existent "if" config field and therefore blocked every Bash command instead of just the k6 run. - Correct docs claiming mvn cannot build locally: Maven runs on JDK 21 even though java on the PATH is 17. - Narrow the readme deny rule, which was unintentionally matching app/README.md at any depth.
daniivelascoo
force-pushed
the
feat/similar-products-service
branch
from
August 13, 2026 09:16
e5ac4e8 to
4e639e0
Compare
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.
Reactive Spring Boot (WebFlux) service exposing GET /product/{id}/similar, aggregating the existing similarids + product-detail upstream APIs.