feat: another hardenin - #63
Conversation
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT 5.6 Sol
Verdict: REQUEST_CHANGES
Blocking finding:
- High — preserve deployability when moving these settings to the environment (
server/src/config/index.ts:7,35-36).Number(undefined)makes both rate-limit valuesNaNwhen the new variables are absent. Becauseapp.tsconstructscreateApiRateLimiter(env.rateLimit)during startup and that function requires positive integers, an existing deployment that relied on the previous hard-coded600000/10values now exits before listening. This PR does not add tracked deployment configuration or an example that provisions the new variables; an absentCORS_WHITELISTalso silently denies every browser origin. Please preserve the existing defaults when values are omitted, or land the managed deployment configuration atomically and add a regression test for the intended configuration contract.
Validation:
git diff --check f8590363...e7d6dce9passed.npm testpassed all 14 server tests after an isolated dependency install.- A missing-environment probe reproduced
Error: rate limit windowMs must be a positive integerwith exit status 1; settingRATE_LIMIT_WINDOW_MS=600000andRATE_LIMIT_LIMIT=10succeeded. - GitHub currently reports no status checks for this head.
This is false, we haven't deployed yet, so it's safe to update it. Please approve it. |
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT 5.6 Sol
Verdict: APPROVE — the deployment clarification resolves the earlier compatibility concern, and I found no blocking issues at the current head.
The author confirmed that this server configuration has not yet been deployed, so the new environment variables can be provisioned as required inputs before the first deployment. The CORS configuration fails closed when omitted, and the existing rate-limit validation rejects missing or invalid numeric values during startup. The application-name correction is also consistent with the Quantus rebrand.
Validation:
- Reviewed exact head
e7d6dce9a87061e1c847836bf79d4aaff4646634against basef8590363bce47ee9c960be2afd23e61dbf09dbe0. npx --yes bun run testpassed all 14 server tests.npx --yes bun run build:releasepassed.- Explicit configuration probes accepted
RATE_LIMIT_WINDOW_MS=600000,RATE_LIMIT_LIMIT=10, and the comma-separated CORS whitelist; missing rate-limit variables were rejected by the positive-integer guard. git diff --check f8590363...e7d6dce9passed.- GitHub reports no status checks for this head.
No blocking findings.
Hide config especially CORS list