Skip to content

fix(channels): localize runtime command replies#6550

Open
drbparadise wants to merge 2 commits into
zeroclaw-labs:masterfrom
drbparadise:fix/channel-runtime-i18n
Open

fix(channels): localize runtime command replies#6550
drbparadise wants to merge 2 commits into
zeroclaw-labs:masterfrom
drbparadise:fix/channel-runtime-i18n

Conversation

@drbparadise
Copy link
Copy Markdown
Contributor

@drbparadise drbparadise commented May 9, 2026

Summary

  • Base branch: master (all contributions)
  • What changed and why:
    • Moved channel runtime command replies for /new, /models, /model, /config, /stop, provider fallback, malformed tool output, context-window overflow, and request timeout onto Fluent-backed CLI strings.
    • Added matching English and built-in zh-CN translations so channel users configured for Chinese do not receive these runtime replies in English.
    • Added Fluent catalog coverage for the new channel runtime keys in both en and zh-CN sources.
  • Scope boundary: This PR does not change model-generated assistant replies, logs/tracing/panic text, Telegram menu descriptions, approval prompt semantics, provider routing behavior, or channel transport behavior.
  • Blast radius: Medium. This touches user-visible channel replies in zeroclaw-channels and CLI Fluent resources in zeroclaw-runtime; behavior should remain the same for English users aside from strings now coming through Fluent.
  • Linked issue(s): Closes [Bug]: Channel runtime command replies bypass Fluent localization #6548
  • Labels: Contributor cannot apply labels directly. Suggested: bug, risk: medium, size: M, channel, channel:core, runtime.

Validation Evidence (required)

Local validation is the signal CI cannot replace. Run the full battery and paste literal output (tails, failures, warnings — not "all passed").

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
  • Commands run and tail output:
$ cargo test -p zeroclaw-runtime channel_runtime_cli_strings_format_from_fluent --lib
running 1 test
test i18n::tests::channel_runtime_cli_strings_format_from_fluent ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1625 filtered out; finished in 0.01s
$ cargo test -p zeroclaw-channels process_channel_message_refreshes_available_skills_after_new_session --lib
running 1 test
test orchestrator::tests::process_channel_message_refreshes_available_skills_after_new_session ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 958 filtered out; finished in 0.05s
$ cargo fmt --all -- --check
# exit 0; no output
$ cargo clippy --all-targets -- -D warnings
    Checking zeroclaw-runtime v0.7.5 (/tmp/zeroclaw-channel-runtime-i18n/crates/zeroclaw-runtime)
    Checking zeroclaw-hardware v0.7.5 (/tmp/zeroclaw-channel-runtime-i18n/crates/zeroclaw-hardware)
    Checking zeroclaw-channels v0.7.5 (/tmp/zeroclaw-channel-runtime-i18n/crates/zeroclaw-channels)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 55.47s
$ cargo test
     Running tests/test_live.rs (target/debug/deps/live-0baed01aaadeb38d)

running 7 tests
test live::gemini_fallback_oauth_refresh::gemini_warmup_refreshes_expired_oauth_token ... ignored, requires live Gemini OAuth credentials with refresh_token
test live::gemini_fallback_oauth_refresh::gemini_warmup_with_valid_credentials ... ignored, requires live Gemini OAuth credentials
test live::openai_codex_vision_e2e::openai_codex_second_vision_support ... ignored, requires live OpenAI Codex OAuth credentials (second profile)
test live::openai_codex_vision_e2e::provider_vision_support ... ignored, requires live provider OAuth credentials
test live::providers::e2e_live_openai_codex_multi_turn ... ignored, requires live OpenAI Codex OAuth credentials
test live::zai_jwt_auth::live_zai_jwt_auth_chat ... ignored, requires live ZAI_API_KEY
test live::zai_jwt_auth::live_zai_jwt_auth_multi_turn ... ignored, requires live ZAI_API_KEY

test result: ok. 0 passed; 0 failed; 7 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/test_system.rs (target/debug/deps/system-afb9723db91cfe2e)

running 5 tests
test system::full_stack::system_simple_text_response ... ok
test system::full_stack::system_tool_arguments_passed_correctly ... ok
test system::full_stack::system_parallel_tool_execution ... ok
test system::full_stack::system_tool_execution_flow ... ok
test system::full_stack::system_multi_turn_conversation ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

   Doc-tests zeroclaw

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
  • Beyond CI — what did you manually verify? Searched the orchestrator for the affected hardcoded runtime reply text after the change. Remaining matches are comments or existing tests, not runtime sends.
  • If any command was intentionally skipped, why: None.

Security & Privacy Impact (required)

Yes/No for each. Answer any Yes with a 1–2 sentence explanation.

  • New permissions, capabilities, or file system access scope? (No)
  • New external network calls? (No)
  • Secrets / tokens / credentials handling changed? (No)
  • PII, real identities, or personal data in diff, tests, fixtures, or docs? (No)
  • If any Yes, describe the risk and mitigation: N/A

Compatibility (required)

  • Backward compatible? (Yes)
  • Config / env / CLI surface changed? (No)
  • If No or Yes to either: Existing users do not need upgrade steps. The same runtime commands and routing behavior remain; only user-visible text now resolves through existing Fluent locale loading.

Rollback (required for risk: medium and risk: high)

  • Fast rollback command/path: git revert 3068af9d
  • Feature flags or config toggles: None
  • Observable failure symptoms: Runtime command replies show {channel-runtime-...} placeholders, or affected channel command replies fail to render expected text.

Supersede Attribution (required only when Supersedes # is used)

  • Superseded PRs + authors (#<pr> by @<author>, one per line): N/A
  • Scope materially carried forward: N/A
  • Co-authored-by trailers added in commit messages for incorporated contributors? (No)
  • If No, why (inspiration-only, no direct code/design carry-over): No superseded PR or human co-author work was incorporated.

@drbparadise
Copy link
Copy Markdown
Contributor Author

I do not have label permissions on this repository. Suggested labels from the PR body: bug, risk: medium, size: M, channel, channel:core, runtime.

@drbparadise drbparadise force-pushed the fix/channel-runtime-i18n branch from 95c8320 to 3068af9 Compare May 9, 2026 10:38
@drbparadise
Copy link
Copy Markdown
Contributor Author

Follow-up for the locale-dependent test review:

  • Updated affected orchestrator tests to assert localized Fluent strings instead of hard-coded English runtime replies.
  • Reproduced the previous failure under a temporary ~/.zeroclaw/config.toml with locale = "zh-CN", then reran the same locale-scoped tests after the fix.

Additional local validation after the amend:

HOME=<tmp-with-locale-zh-CN> RUSTUP_HOME=/home/drb/.rustup CARGO_HOME=/home/drb/.cargo \
  cargo test -p zeroclaw-channels receipts --lib
# 3 passed; 0 failed

HOME=<tmp-with-locale-zh-CN> RUSTUP_HOME=/home/drb/.rustup CARGO_HOME=/home/drb/.cargo \
  cargo test -p zeroclaw-channels process_channel_message_handles_models_command_without_llm_call --lib
# 1 passed; 0 failed

HOME=<tmp-with-locale-zh-CN> RUSTUP_HOME=/home/drb/.rustup CARGO_HOME=/home/drb/.cargo \
  cargo test -p zeroclaw-channels process_channel_message_refreshes_available_skills_after_new_session --lib
# 1 passed; 0 failed

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test

The amend SHA is 3068af9d.

@Audacity88 Audacity88 added bug Something isn't working channel Auto scope: src/channels/** changed. channel:core Auto module: channel core files changed. risk: medium Auto risk: src/** or dependency/config changes. runtime Auto scope: src/runtime/** changed. size: M Auto size: 251-500 non-doc changed lines. labels May 10, 2026
@github-actions github-actions Bot removed channel Auto scope: src/channels/** changed. runtime Auto scope: src/runtime/** changed. labels May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working channel:core Auto module: channel core files changed. risk: medium Auto risk: src/** or dependency/config changes. size: M Auto size: 251-500 non-doc changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Channel runtime command replies bypass Fluent localization

2 participants