fix(ws-bridged): apply --topic/--auth-token/--tls/--metrics to config - #2
Closed
SandraK82 wants to merge 1 commit into
Closed
fix(ws-bridged): apply --topic/--auth-token/--tls/--metrics to config#2SandraK82 wants to merge 1 commit into
SandraK82 wants to merge 1 commit into
Conversation
Bisher mergte run() in bin/zerodds-ws-bridged.rs nur --listen, --domain und --log-level in die DaemonConfig. Alle anderen CLI-Flags wurden via cli::parse() korrekt geparst, dann aber ignoriert. Resultat: ein User der --topic Foo --auth-token secret startet, bekommt eine Bridge mit topics=0, auth-mode=none. Fix: apply_cli_overrides() extrahiert, mit allen Feldern. --topic ist additiv (an cfg.topics angehängt) mit default_ws_path-Mapping; alle anderen Flags sind Replace-Operationen. --auth-token impliziert auth_mode=bearer, --tls-cert/--tls-key impliziert tls_enabled=true, --metrics impliziert metrics_enabled=true (CLI-Setzen-bedeutet-Aktiv). Plus 8 Unit-Tests in einem cfg(test)-Module direkt im bin-Crate. Signed-off-by: Sandra Theresa Keßler <mail@sandra-kessler.net>
5 tasks
Contributor
Author
3 tasks
SandraK82
added a commit
that referenced
this pull request
May 15, 2026
…tion (#5) Bundles fixes for two bugs plus two follow-ups, internal GitLab pipeline 1064 green (13/13), GitHub Actions green (Build+Test + no_std). - fix CLI merge: apply_cli_overrides() applies --topic/--auth-token/--tls/--metrics; previously only --listen/--domain/--log-level took effect. Includes 8 unit tests. - fix yaml.example: rewritten against the flat parser schema (listen/domain/log_level/tls/auth/acl/metrics/topics); spec ref corrected from §4 to §3. Plus include_str!-based loadback integration test so future doc-drift fails CI instead of booting with defaults in production. - parser drift-detection: load_from_str now emits a stderr WARN for unknown top-level keys (forward-compat preserved, drift visible). Unit test freezes the forward-compat semantics. Closes #1, closes #3. Supersedes #2, #4. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #1.
Summary
bin/zerodds-ws-bridged.rs::run()mergte nur--listen,--domainund--log-levelaus den geparstenCliArgsin dieDaemonConfig. Dieanderen Flags (
--topic,--auth-token,--tls-cert,--tls-key,--metrics) waren incli::parse()korrekt extrahiert, wurden abernie auf
cfgübertragen.Changes
apply_cli_overrides(cfg, args)extrahiert, alle CLI-Flags werdenjetzt auf die Config angewendet.
--topicist additiv (ancfg.topicsangehängt) mitdefault_ws_path-Mapping undtype_name == nameals Default.directionwird aufbidirgesetzt (Spec-Default).--auth-tokenimpliziertauth_mode = "bearer".--tls-cert/--tls-keyimplizierttls_enabled = true.--metricsimpliziertmetrics_enabled = true.#[cfg(test)] mod tests-Block direkt im bin-Crate.Test Plan
cargo test -p zerodds-websocket-bridge --bin zerodds-ws-bridged --features daemonfishermen21/zerodds-ws-bridged:v1.0.0-rc.1:Boot-Log zeigte
topics=0, auth-mode=nonetrotz CLI-Flags →Tests + Code-Review bestätigten den Bug.
Notes
--topicmit nur dem Namen registriert keinen DDS-Type-Schema —in v1.0.0-rc.1 reicht das für Routing-Setup, aber YAML mit
expliziten
type:-Feldern ist weiterhin der empfohlene Pfad fürProduction. Die Spec-Note zu
--topic(CLI §2) ist davonunverändert.
DCO: Signed-off-by enthalten.