feat: structured startup log for loaded config summary#435
Merged
Chucks1093 merged 1 commit intoJun 23, 2026
Merged
Conversation
Emit a grouped {environment, featureFlags} summary of the loaded runtime
config at startup instead of dumping the full masked config object. Values
are sourced through the existing masking helper and only non-sensitive keys
are selected, so no secrets are logged.
Adds config-summary.utils.ts + tests and documents the summary and local
validation steps in docs/configuration.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #194
Summary
Adds a structured startup log that summarizes the loaded runtime configuration —
the environment context and key feature flags — emitted once when the server boots.
Previously the startup config log dumped the entire masked env config as a flat
object. This replaces it with a curated, grouped summary that is easier for
operators to scan, while guaranteeing no secrets are logged.
What changed
buildStartupConfigSummary()(src/utils/config-summary.utils.ts) —returns a grouped
{ environment, featureFlags }object:environment:mode,port,apiVersion,stellarNetwork,backendUrl,frontendUrlfeatureFlags: the keyENABLE_*toggles + ownership-snapshot cleanup flagsrc/server.ts— logs the structured summary at startup(
logger.info(buildStartupConfigSummary(), 'Loaded runtime configuration summary'))instead of the flat full-config dump.
src/utils/config-summary.utils.test.ts) — assert the env + flagvalues, that only those two groups are exposed, and that no sensitive values
leak into the output.
docs/configuration.md) — new "Startup Configuration Summary" sectionwith example output and local-validation steps.
No secrets logged
Values are sourced through the existing
maskSensitiveConfigValues()helper, andonly non-sensitive keys are selected. Secrets, passwords, API keys, tokens, and
the
DATABASE_URLcredentials are never included in the summary.Example output
{ "level": 30, "msg": "Loaded runtime configuration summary", "environment": { "mode": "development", "port": 3000, "apiVersion": "1.0.0", "stellarNetwork": "testnet", "backendUrl": "http://localhost:3000", "frontendUrl": "http://localhost:5173" }, "featureFlags": { "responseTiming": true, "apiVersionHeader": true, "schemaVersionHeader": true, "requestLogging": true, "indexerDedupe": true, "indexerDlq": true, "indexerCursorStalenessWarning": true, "ownershipSnapshotCleanup": false } } How to validate locally pnpm install && pnpm exec prisma generate pnpm dev Look for the Loaded runtime configuration summary line in the startup output and confirm no secret values appear. Testing pnpm jest src/utils/config-summary.utils.test.ts → passing pnpm build (tsc) → clean pnpm exec eslint on changed files → clean Scope Limited to the config-summary feature: 2 new files (util + test), 2 modified (server.ts, docs/configuration.md). No unrelated file churn. closes #194