Conversation
Phase 1 of the config unification: the pure resolver (pydantic schema + discovery + testbed selection + the one precedence function). Not wired into any command yet, so there is no behavior change; fully unit-tested headless. AI-assisted: Claude Opus 4.8
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #265 +/- ##
===========================================
+ Coverage 82.10% 82.55% +0.45%
===========================================
Files 105 107 +2
Lines 9677 9964 +287
Branches 571 570 -1
===========================================
+ Hits 7945 8226 +281
- Misses 1729 1735 +6
Partials 3 3
🚀 New features to boost your workflow:
|
Contributor
Author
|
Superseded by #266, which contains this Phase-1 resolver commit plus Phases 2/3/5/6 (root flags, fw/device consumption, config/testbed commands, docs) in one branch. |
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.
First phase of unifying the dotbot configuration into one file. Today config is
scattered across three overlapping surfaces -
run controller --config-path,swarm -c(actually swarmit's loader, wrapped), and~/.dotbot/config.toml's[fw]table - with three names for the network id (swarm_id/network_id/swarmit_network_id) and an overloaded-c(build-config infw/device,config-file in
swarm). This PR adds the pure resolver that a later phase willwire the commands onto.
What this adds (
dotbot/config.py):[fw]/[device]/[swarm]/[run]tables (with[run.controller]/[run.gateway]sub-tables) and[testbed.<name>]entries for the physicaldeployments you switch between.
extra='forbid', so a typo'd key fails loudat load instead of silently defaulting.
-c PATH>DOTBOT_CONFIG> nearestdotbot.toml(cwd-upward, stops at a
.gitboundary) >~/.dotbot/config.toml> none.select_testbed:--testbed>DOTBOT_TESTBED>default_testbed; failsloud on an unknown name.
resolve(): one precedence function - CLI flag > env(
DOTBOT_<SECTION>_<KEY>, then a sharedDOTBOT_<KEY>alias) > file(section > selected testbed > top-level) > built-in default.
connvalues are validated through the existingparse_connection, so thefile path and the
--connflag share one validator and can't drift.No behavior change: nothing imports the module yet - it's the inert core for
the upcoming wiring phase, so this is a safe standalone addition.
Validation: 29 new headless tests (
test_config.py, 96% module coverage) -precedence permutations, discovery order, testbed selection, strict unknown-key
rejection, and env coercion. Full suite green (315 passed); pre-commit clean.