Repository navigation
fix(config): dashboard saves no longer clobber unrelated config keys - #172
Merged
Merged
Conversation
save_section replaced a dedicated section file (env_feeds.yaml,
notifications.yaml, ...) wholesale with the serialized dataclass, and did
the same one level down for meshtastic.yaml / config.yaml sections.
Anything the schema does not declare was dropped. On 2026-09-16 a PUT
/api/config/environmental that changed one flag also removed the central
block and wzdx.endpoints from env_feeds.yaml.
- New schema-aware _merge_config_node: only dataclass-declared fields
change; unknown keys at any depth survive; dict-of-dataclass fields
(notifications.toggles/destinations) are rebuilt to exactly the saved
keys, so deletions still delete; lists and scalars take the new value.
- A non-secret ${VAR} reference on disk is kept when the saved value
equals its resolution (extends the existing secret-ref behavior).
check_secrets is unchanged.
- _extract_local_fields now walks dotted LOCAL_FIELDS paths, so
environmental.ducting.latitude/longitude round-trip to local.yaml
(env_center) instead of being baked into env_feeds.yaml.
- Comments are still lost (PyYAML; ruamel is not a dependency).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfJYSn4wcmPKhVb6MfSQnr
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.
Summary
Dashboard config saves rewrote whole config files from the dataclass, dropping every key the schema does not declare. On 2026-09-16 a one-flag save of
environmentalremoved thecentral:block andwzdx.endpointsfromenv_feeds.yaml.save_sectionwrite paths (dedicated files,meshtastic.yaml,config.yaml).notifications.destinationsortogglesentry still removes it. Lists replace.${VAR}references survive an unchanged save, and secret handling is unchanged.LOCAL_FIELDS(environmental.ducting.*->local.yamlenv_center) now round-trip instead of being written intoenv_feeds.yaml.Known, not fixed here
mesh_intelligence.regions[].lat/lon,mesh_sources[].url/host,environmental.nws.user_agent(derived frombot.contact_email), and notification rule defaults.local.yamlstill overrides them on load. A proper fix needs a design for reconstructing the overlay at save time.Tests
2275 passed, 0 failed (was 2263). New
test_save_section_preserve.py(12 tests), including a replay of the 2026-09-16env_feeds.yamlsave.🤖 Generated with Claude Code
https://claude.ai/code/session_01CfJYSn4wcmPKhVb6MfSQnr