fix(ps-cache-kotlin): correct README ports, DB config, and reproduction steps#124
fix(ps-cache-kotlin): correct README ports, DB config, and reproduction steps#124slayerjain merged 1 commit intomainfrom
Conversation
…on steps - Fix app port: 8080 (not 8090) per application.properties - Fix DB config: testdb/postgres/postgres on port 5432 (not demodb/testpass on 5433) - Add Docker Compose option as the recommended approach - Document environment variables with their defaults - Fix scoring description: +5 tiebreaker bonus (not +50/-50) - Add note about variable test numbering - Quote curl URLs for shell safety Signed-off-by: slayerjain <shubhamkjain@outlook.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the ps-cache-kotlin reproduction README to match the app’s real defaults (ports/DB), provide a Docker Compose path, and clarify the expected failure behavior when replaying captured traffic.
Changes:
- Corrects documented HTTP port and Postgres connection defaults to align with
application.properties. - Adds a Docker Compose–based setup path and documents env vars/defaults.
- Clarifies reproduction steps/output (quoting curl URLs, updating failure description and scoring narrative).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ``` | ||
|
|
||
| ### Pre-create the schema | ||
| This starts PostgreSQL (with schema + seed data via `init.sql`) and the app on port 8080. |
There was a problem hiding this comment.
In Option A, docker-compose.yml publishes Postgres on host port 5433 ("5433:5432"), but the README never states this. If a user tries to connect from the host using the documented default DB_PORT=5432, they’ll hit the wrong port. Consider either changing the compose port mapping to 5432:5432 or explicitly noting the host-exposed port for Compose setups.
| This starts PostgreSQL (with schema + seed data via `init.sql`) and the app on port 8080. | |
| This starts PostgreSQL (with schema + seed data via `init.sql`) and the app on port 8080. For host access in the Docker Compose setup, PostgreSQL is exposed on `localhost:5433` (container port `5432`). |
| | `spring.datasource.hikari.maximum-pool-size` | `1` | Forces all requests through one connection | | ||
| | `prepareThreshold=1` | JDBC URL param | Caches PS after first use | | ||
| | `spring.sql.init.mode` | `never` | Schema created externally | | ||
| | `spring.sql.init.mode` | `never` | Schema created externally (via init.sql) | |
There was a problem hiding this comment.
spring.sql.init.mode=never disables Spring’s SQL initialization, but the table currently says the schema is created externally “(via init.sql)”. That’s only true for the Docker Compose path; the standalone steps create the schema via psql heredoc. Consider rewording to something like “Schema created outside Spring Boot (e.g., Postgres init.sql or manual psql)" to avoid implying Spring uses init.sql.
| | `spring.sql.init.mode` | `never` | Schema created externally (via init.sql) | | |
| | `spring.sql.init.mode` | `never` | Schema created outside Spring Boot (e.g., Postgres `init.sql` or manual `psql`) | |
Summary
8080(not8090) perapplication.propertiestestdb/postgres/postgreson port5432(notdemodb/testpasson5433)+5tiebreaker bonus (not+50/-50)What was wrong
The README had port
8090and databasedemodb:5433with passwordtestpass, but the actualapplication.propertiesdefaults to port8080andtestdb:5432with passwordpostgres. Following the README as-is would result in connection failures.Test plan
docker compose up --buildworks with Option A