Skip to content

Use one precedence order for startup settings - #2607

Open
kmcginnes wants to merge 2 commits into
t3/typescript-startup-stack-2-typescript-startupfrom
t3/typescript-startup-stack-3-one-precedence-order
Open

kmcginnes wants to merge 2 commits into
t3/typescript-startup-stack-2-typescript-startupfrom
t3/typescript-startup-stack-3-one-precedence-order

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Startup settings came from different places in different orders, and config.json replaced every key it could hold even when it left one out. Every setting now follows one precedence order.

value =
  -e flag
  ?? .env.local
  ?? config.json (or the Neptune Notebook preset)
  ?? .env
  ?? default

Connection settings still never come from .env or .env.local here. The configuration reference documents the order, and an ADR records it.

Upgrade notes

  • An environment variable now overrides the same setting in config.json, including the Default Connection settings and NEPTUNE_NOTEBOOK, and a setting config.json leaves out now comes from the environment. Where an -e flag and config.json set the same setting to different values, the -e value now wins, so remove the flag to keep the config.json value.
  • With -e NEPTUNE_NOTEBOOK=true, the Neptune Notebook preset now applies even when config.json exists, so the server serves HTTP on port 9250. When PROXY_SERVER_HTTPS_CONNECTION is also true, startup stops and names the conflict and how to resolve it.
  • An empty -e value for a setting config.json can hold, such as -e GRAPH_CONNECTION_URL=, counts as unset.

Evidence

After: the scenario rows that combine -e flags with config.json now expect the -e value, and the notebook-plus-HTTPS rows expect the conflict error.

Verified live: -e NEPTUNE_NOTEBOOK=true with a config.json HTTPS true stops with the conflict message, and -e NEPTUNE_NOTEBOOK=false then serves HTTPS.

Merge Danger

Door: two-way

Impact: breakage for deployments that set the same setting in both -e and config.json with different values.

Related


🤖 Written by an AI agent on my behalf.

@kmcginnes
kmcginnes added this pull request to stack #2613 November 13, 2026 23:39
@kmcginnes kmcginnes changed the title t3/typescript startup stack 3 one precedence order Use one precedence order for startup settings Nov 13, 2026
@kmcginnes
kmcginnes force-pushed the t3/typescript-startup-stack-3-one-precedence-order branch from 02a70ae to da2a254 Compare November 18, 2026 02:22
@kmcginnes
kmcginnes removed this pull request from stack #2613 November 18, 2026 02:24
@kmcginnes
kmcginnes added this pull request to stack #2629 November 18, 2026 02:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant