Skip to content

Preserve peers.toml formatting on writes - #156

Merged
myobie merged 2 commits into
mainfrom
fix/peers-toml-upsert
Sep 4, 2026
Merged

Preserve peers.toml formatting on writes#156
myobie merged 2 commits into
mainfrom
fix/peers-toml-upsert

Conversation

@myobie

@myobie myobie commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • update only changed peer, policy, and Git remote data with toml_edit
  • preserve comments, spacing, unknown fields, entry order, and user changes to the generated header
  • keep nested addressed-peer tables valid across add, update, and remove operations
  • write the default header only when Fabric creates the file

Tests

  • cargo test --lib (467 passed, 4 ignored measurement tests)
  • cargo test --bin fabric (19 passed)
  • cargo check --all-targets
  • git diff --check

The format-preservation regression failed against main before the writer changed.

@myobie
myobie merged commit d156cd9 into main Sep 4, 2026
3 checks passed
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