fix(channels): preserve caller-supplied channel name case in channel_send (#6078)#6101
Conversation
…send (#6078) channel_send force-lowercased the channel argument before the kernel's case-sensitive send_channel_* lookup, while adapters register under their config name with original case. Any sidecar with uppercase in its name (e.g. bot-A) became unreachable. Pass the name through verbatim (still trimmed).
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
librefang-deploy | aad2d4f | Jun 14 2026, 03:37 PM |
CLAUDE.md prohibits multi-line comment blocks; the key invariant (case-sensitive kernel lookup) is preserved in one line.
houko
left a comment
There was a problem hiding this comment.
Two things to address before merge:
1. Missing regression test
The behavior of tool_channel_send changed (channel names are no longer lowercased), but there is no #[tokio::test] covering this path.
Per project rules (CLAUDE.md "MANDATORY: Integration Testing"), any behavior change in a tool runner should be accompanied by a test that would catch a revert.
A minimal unit test in crates/librefang-runtime/src/tool_runner/channel.rs (or a dedicated tests/ file in that crate) should:
- call
tool_channel_sendwithchannel = "Bot-A"and assert the kernel lookup uses"Bot-A", not"bot-a".
2. Test plan lists cargo build
cargo build -p librefang-runtime is explicitly blocked by project convention (CLAUDE.md: "Do NOT run cargo build or cargo run locally").
The correct local verification is:
cargo check --workspace --lib
cargo clippy --workspace --all-targets -- -D warnings
cargo test -p librefang-runtime
(I've already pushed one mechanical fix to this branch — the 5-line comment block was collapsed to a single line per the "one short line max" comment rule.)
Generated by Claude Code
Summary
channel_sendforce-lowercased thechannelargument before the kernel's case-sensitivesend_channel_*lookup, while channel adapters register under their config name with original case. Any sidecar whose name carries uppercase (e.g.bot-A) became unreachable — a latent regression since the case-preserving registration in #5996.Change
Pass the channel name through verbatim (still trimmed) in
crates/librefang-runtime/src/tool_runner/channel.rs.Behaviour note
Channel matching is now case-sensitive (was effectively lowercase-only). Operators who registered an uppercase sidecar and worked around the bug by calling
channel_sendwith a lowercased name must use the exact registered case. Already-matching setups are unaffected.Test plan
cargo build -p librefang-runtimecargo clippy -p librefang-runtime -- -D warningsCloses #6078