A mechanical cross-check of os.environ.get() in settings against .env.example found twenty variables the app reads that were written down nowhere. Most have harmless defaults, but three would have cost someone real time: - NUM_PROXIES decides how many X-Forwarded-For hops are trusted, and guest rate limiting is keyed on the resulting IP. Set too high, a client can forge the header and walk past the limit; too low and everyone collapses onto the proxy's own IP. CLAUDE.md warns about it; the file an operator actually edits did not. - KAVENEGAR_SENDER is read alongside the API key, so someone configuring SMS from the README alone would have set only half of it. - INTERNAL_SERVICE_KEY and PAYMENT_WEBHOOK_SECRET are empty under DEBUG=0 by design, which quietly keeps the ingest and webhook routes shut. That is the right behaviour and exactly the kind of thing that reads as a bug when it is not written down. The whole Cafe Bazaar block was undocumented too. Three variables in .env.example are not read by settings and were left alone: GRAFANA_ADMIN_PASSWORD is consumed by docker-compose, TADRISINO_SERVICE by deploy.sh, and OPENAI_API_KEY_OPENAI_DIRECT is a documented parking spot. CLAUDE.md's current-state section was a day stale (458 tests, now 483) and said nothing about the documentation restructure, the RTL docs shell, the test-login allowlist or the frontend test account, so anyone picking this up would have rediscovered all four. It now also records that backups are still manual and that sqlite3 is not installed on the server. Also verified mechanically, with no findings: no docstring references an endpoint absent from the OpenAPI schema, no docstring names a setting or constant that does not exist, and every internal documentation link resolves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
12 KiB
12 KiB