Start the server without --config - #211
Merged
Merged
Conversation
A throwaway or upload-driven server previously required a config file on disk even when everything about it was default — launchers wrote an empty TOML just to satisfy the flag. `volca server` (and the existing `stop`) now run on the built-in defaults when --config is absent: no databases, everything loadable over the API. Both paths funnel through the new Config.loadConfigOrDefault, so the defaults are validated and honour VOLCA_DATA_DIR exactly like a parsed file, and an explicit --config path that does not exist still fails loudly (a typo must never silently become "all defaults"). Other commands keep requiring the flag: without a config they have neither databases nor a server address to act on.
Starting on built-in defaults logs an explicit Info line, and each --load name that matches no configured database gets a Warning: the override silently loaded nothing for it — guaranteed on the defaults, which configure no databases. Diagnosing a --config accidentally dropped from a launcher no longer requires inferring it from the database count.
The default branch duplicated the VOLCA_DATA_DIR + validateConfig steps, so the docstring's 'both paths' promise rested on parallel maintenance. loadConfig is now the Just case of the shared pipeline, making the promise true by construction. Also notes in the README that --config is optional for server and stop.
Owner
Author
|
Suite de revue — correctifs poussés :
|
ccomb
added a commit
that referenced
this pull request
Jul 15, 2026
`Server(config=None)` spawns the engine with no `--config` at all: built-in defaults, no databases — what a converter or upload-driven script wants. Needs an engine >= v0.9.3, which learned to run config-less (#211). Two silent failure modes die with it. A config *path* that does not exist now fails loudly at `start()` instead of the engine dying behind the scenes — the docstring used to claim "missing file is tolerated" while the spawned engine refused it. And an engine that exits before serving (the likeliest config-less cause: an engine too old) fails immediately with its exit code and a version hint, instead of hanging until the readiness timeout. Verified end-to-end against a locally built v0.9.3: `Server(config=None, port="auto")` boots, answers `/version` with wire 3, and lists the uploads it rediscovers from the shared data dir. 233 tests green (4 new).
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.
A throwaway or upload-driven server previously required a config file on disk even when everything about it was default — launchers wrote an empty TOML file just to satisfy the flag.
volca server(and the existingstop) now run on the built-in defaults when--configis absent: no databases, everything loadable over the API.Both paths funnel through the new
Config.loadConfigOrDefault, so the defaults are validated and honourVOLCA_DATA_DIRexactly like a parsed file, and an explicit--configpath that does not exist still fails loudly — a typo must never silently become "all defaults". Other commands keep requiring the flag: without a config they have neither databases nor a server address to act on.