Repository navigation
Conversation
…lt-topic (#4756) resolve_config treated the gossip topic and its secret as independent fallback chains, so --no-default-topic with only one of --topic / --topic-secret silently paired the custom half with the public hardcoded default for the other half. Resolve the two as a pair under --no-default-topic: both CLI values when both are given, both hardcoded constants when neither is, and an error naming the missing flag when exactly one is given. Step-7 cascade doc updated; non-no_default_topic cascade unchanged. Tests: two new single-sided refusal cases; existing test_resolve_config_no_default_topic* keep passing (updated for the Result return). Callers (serve, peers) propagate the error with ?.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Fixes #4756.
Problem
resolve_configresolved the gossip topic and secret as independent fallback chains, so--no-default-topicwith only one of--topic/--topic-secretsilently paired the custom half with the public hardcoded default for the other half — contradicting the step-7 cascade doc.Change (one behaviour, documented)
Under
--no-default-topic, topic + secret now resolve as a pair:Errnaming the missing flag (--topic/--topic-secret) when exactly one is given — a custom half is never paired with a public default half.resolve_confignow returnsanyhow::Result<ResolvedConfig>; theserveandpeerscall sites propagate with?. The non-no_default_topiccascade (conf pair, per-field CLI override) is unchanged. Step-7 cascade doc updated with an# Errorssection.Tests
test_resolve_config_no_default_topic_with_only_cli_topic_is_refused,test_resolve_config_no_default_topic_with_only_cli_secret_is_refused(both assert the error names the missing flag).test_resolve_config_no_default_topic*updated for theResultreturn and keep passing.cargo test -p id-core: 283 passed, 1 ignored; doctests 5 passed.cargo check --no-default-featureson the parentidcrate has pre-existing E0432/E0433 failures inchat.rs/invite.rs(verified identical on pristine tree); no new errors from this change.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.