Skip to content

[Bug] docker-entrypoint envsubst renders missing env vars as empty strings — broken deployments boot silently healthy #1056

@chronoai-shining

Description

@chronoai-shining

Summary

Found during fine-grained code-quality review (second pass) at commit 14fbf3e (develop). Severity: medium — bug / operability.

ornn-web/docker-entrypoint.d/40-envsubst-config-js.sh:25 + src/config.ts:80-99envsubst substitutes unset env vars to empty strings, and because runtime.x is then "" (not undefined), the ?? fallbacks in config.ts never fire. A deployment missing e.g. NYXID_OAUTH_CLIENT_ID boots a container that looks healthy but has silently broken login — no log line, no failed probe, nothing.

Suggested fix

In the entrypoint, loop over the required var names and exit 1 (or at minimum log loudly) when any is empty; alternatively treat "" as absent in config.ts (|| instead of ?? for required keys).

Metadata

Metadata

Labels

auto:eligible/auto MAY pick this issue for autonomous work. Required to claim.infraInfrastructure & deploymentsize:SSmall: < ~1h, single file/concern. Size is informational.type:bugDefect: behavior diverges from intent/spec.webornn-web frontend SPA

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions