Repository navigation
feat(backend): simplify YAML startup and validate configs before serving - #10
Merged
Merged
Conversation
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.
Change
Allow selecting the device YAML with
python main.py --config … --mode hardware(also supported bypython -m newswitch.app). Explicit CLI arguments override environment variables, while the existing ASGI/environment entrypoint remains available.Validate device YAML before serving HTTP. A missing, malformed or schema-invalid file now fails immediately instead of failing in a background manager task.
just devperforms the same preflight and does not start the frontend after backend startup failure.The development commands prepare Serial/CAN dependencies automatically through
uv run --extra uc2. Migrate the deprecated uv development-dependency field without changing package versions, enable terminal warnings, and update the Quickstart and YAML examples. Ignore generated configuration backups in subdirectories.Validation
just dev.The local SSO decision document and runtime backup are excluded. Camera, authentication and frontend implementations are unchanged; no new physical hardware tests were needed for this startup change.
CI baseline comparison
Local validation: 448 backend tests passed, 4 skipped; Ruff lint/format passed. The GitHub macOS/Python 3.12 tests pass, and the codegen-drift job's generation and drift-check steps pass.
CI is not green on the existing main (534cd0e, run 43387114217). Compared with PR run 43447313132:
getByText('Manage accounts and roles.')visibility assertion. This run affects three cases versus two on the baseline; both fail in the same helper. Frontend/authentication code is unchanged.Those existing CI issues are recorded here rather than changing unrelated frontend, autofocus or upstream driver code in this startup PR.