Opus finding
Health check counts empty-string env vars as missing, which can flap or mask the real cause
- apps/web/app/api/health/route.ts:40-43
Treating empty string as missing is reasonable, but GITHUB_APP_PRIVATE_KEY is commonly provided as a multi-line PEM that some deploy pipelines store with surrounding whitespace; the current predicate would report it as present even if it is just whitespace, and conversely report a deliberately-set-to-empty value as missing without distinguishing from unset. More importantly, the contract advertised by the comment ("the next real request will fail") is not actually validated — e.g. an env var set to `"undefined"` or whitespace passes this check but still breaks downstream consumers. This is a low-severity correctness gap between the comment and the behavior.
Recommendation
Either tighten the check to `!process.env[name]?.trim()` and document the contract, or weaken the comment to say only that the var is defined and non-empty.