docs: group env vars by module across CLAUDE.md, READMEs and settings example #412
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 486 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.370
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #412"
general
weight: 0.35
mattmck
Restructures the environment-variable docs by the module that reads each setting, and fixes gaps and wrong statements found by comparing the docs against what the code actually reads.
What changed
packages/functions/README.md→ Environment Variables is now the full reference: 18 tables (runtime, database, auth, blob storage, image proxy, orphan sweep, feature flags, Azure OpenAI client, hex detection, batch pipeline, ingestion/connectors, catalog images, OCR/voice, cache, CORS, telemetry, hex eval, admin scripts), each with a Default column and the source file.CLAUDE.md: the flat "Required / Optional" list is replaced by the same groups in short form, plus Web, Mobile and Infra sections. The Documentation Maintenance row for new env vars now names every place to update.local.settings.json.example: keys reordered into the same groups (values unchanged).README.md: the duplicated ~45-row table is replaced by a per-target index (where each set lives, link to its reference) and the handful of settings you actually change locally.apps/web/README.md: adds whereNEXT_PUBLIC_must be set andNEXT_PUBLIC_SITE_URL.infrastructure/README.md: adds the GitHub variables Deploy Infra reads that weren't listed (batch/snap flags, APIM gateway).dev:shared,generate:types,migrate/migrate:downandgenerate:pwa-iconswhere they were missing.Fixes found along the way
BLOB_READ_SAS_TTL_SECONDSwas listed as required, but no code reads it. Removed from the docs and the example.AZURE_SPEECH_KEY/AZURE_SPEECH_REGIONwere listed as required, butvoice.tsis a stub and only mentions them in comments. Now documented as reserved.AZURE_OPENAI_USE_GATEWAY,AZURE_OPENAI_GATEWAY_ENDPOINT,AZURE_OPENAI_GATEWAY_SUBSCRIPTION_KEY(missing from CLAUDE.md),CORS_SUPPORT_CREDENTIALSandCORS_ALLOWED_ORIGINS(missing from the Functions README and the example), plusNEXT_PUBLIC_SITE_URLand the admin-scriptAPI_BASE_URL/ADMIN_BEARER_TOKEN.AZURE_OPENAI_ENDPOINTwas described as "for voice parsing"; it serves vision hex detection and label OCR.DATABASE_URLcomes from the root.env. In factnpm run migrateloadslocal.settings.jsoninto the environment, and an exportedDATABASE_URLtakes precedence.apps/web, so the docs now point toapps/web/.env.localinstead of the root.env.Verification
process.env/ env-helper name underpackages/functions/srcandscripts. Each one now appears in both CLAUDE.md and the Functions README.BLOB_READ_SAS_TTL_SECONDSremoved;CORS_ALLOWED_ORIGINS(set to the code default) andCORS_SUPPORT_CREDENTIALS=falseadded.dev(includesSHAREABLE_LOOKS_ENABLEDfrom #408 andFUNCTIONS_NODE_BLOCK_ON_ENTRY_POINT_ERRORfrom #410).🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Documentation
Expanded environment-variable guidance across the app, including configuration locations, defaults, fallbacks, limits, feature flags, and infrastructure settings.
Added command references for shared-type watching, migrations, type generation, and PWA icon generation.
Clarified migration variable precedence and that web settings are public build-time values, not secrets.
Configuration
* Added CORS origin and credential settings to the local Functions example; removed the blob read SAS TTL setting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->