Repository navigation
Conversation
The TUI writes the mode it switches to back into config.yaml (main.rs cycle_routing_mode), because a reload or a core restart applies the file's mode. The CLI only PATCHed /configs, so a scripted `terc mode rule` reverted to whatever the file held on the next restart - the failure looks like "the proxy works until the core restarts". `terc core start|stop` gives the same headless control the TUI has, so a core can be brought up (or taken down, which also releases a system proxy pointing at it) without an interactive terminal.
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.
What
terc mode ruleswitched the running core but leftconfig.yamlalone, so themode reverted on the next reload or restart. The TUI (
cycle_routing_mode)already calls
persist_mode; the CLI now does the same, and reportspersistedin--json.Headless runs also had no way to start or stop the managed core - the TUI
toggle was the only path - so
terc core start|stop [--json]mirrors it.Why it matters
The mode is carried into every regenerated config (
compose::carry_runtime_statekeeps the old
mode), so a singleDirectwritten to the file survives everyrestart. A scripted
terc mode rulelooked fixed until the core restarted, andthen everything went direct - which reads as "the proxy is broken".
Notes
terc modestill exits 0 when only the file write fails: the running core didswitch. The warning goes to stderr and
--jsoncarriespersisted: false.terc core stopkeeps the existing behaviour of releasing a system proxy thatpoints at the core.
tree, which is where the bug was reported from.
Testing
cargo fmt --check,cargo clippy --all-targets --locked -- -D warnings,cargo test --all-targets --locked(340 passed).