feat: environment adapter is the single owner of process.env reads (E00-S04-T04)

This commit is contained in:
implementer
2026-08-30 04:17:19 +00:00
parent 072f5c5785
commit 7aeeeaaa97
6 changed files with 93 additions and 8 deletions
+8 -2
View File
@@ -18,8 +18,13 @@
* server's redacting logger applies to every log line, so secrets
* automatically redact from logs.
*
* The environment adapter (E00-S04-T04) builds on this boundary in a later
* task.
* [E00-S04-T04] Environment adapter: the boundary also exposes
* `loadConfigFromEnv` — the workspace's single owner of `process.env` reads.
* It maps the environment (`HOST`/`PORT`/`DATABASE_URL`/`EPPP_SESSION_SECRET`)
* onto the validated config shape and validates it with `assertValidConfig`
* at startup, so every setting flows through the adapter and no other module
* reads `process.env` directly. The `.env.example` template (E00-S04-T05)
* builds on this boundary in a later task.
*/
export { configSchema } from './schema.js';
@@ -28,3 +33,4 @@ export { validateConfig } from './validate.js';
export type { ConfigValidationResult } from './validate.js';
export { assertValidConfig, ConfigStartupError, MissingRequiredSettingError } from './startup.js';
export { REDACTED, SECRET_FIELD_NAMES, redactConfig, redactText } from './redact.js';
export { loadConfigFromEnv } from './env.js';