You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: non-file outputs accept output.path and ignore it silently #1066
output.path is accepted during validation for output types that do not use a file path (stdout, null, tcp, udp, http, otlp, elasticsearch, etc.). The field is silently ignored instead of being rejected as irrelevant.
Reproduction
This config validates successfully even though stdout is not a file sink:
tl;dr I can reproduce this on master: output.path is currently accepted for multiple non-file outputs and ignored at runtime; the clean fix is to fail validation when path is set for output types that do not consume it.
Recommendation
Add an explicit validation rule in Config::validate() that rejects output.path for non-file outputs that do not use it (stdout, null, otlp, http, loki, tcp, udp, arrow_ipc).
For elasticsearch, there is one nuance: runtime currently treats path as an alias for index. I recommend handling this explicitly (either keep as documented alias, or deprecate/remove alias and require index).
Findings
OutputConfig exposes path for all outputs: crates/logfwd-config/src/lib.rs:250-261.
Validation does not reject irrelevant path for non-file outputs:
In crates/logfwd-config/src/lib.rs inside Config::validate() output loop (for (i, output) around :676+), add a pre-check after unsupported output-type checks:
If output.path.is_some() and output type is one of {Stdout, Null, Otlp, Http, Loki, Tcp, Udp, ArrowIpc}, return ConfigError::Validation.
Decide Elasticsearch behavior explicitly:
Option A (strict): also reject path for Elasticsearch and require index only; remove .or(cfg.path.as_ref()) in crates/logfwd-output/src/lib.rs:671.
Option B (compat): keep alias and add a config test + docs note that path is legacy alias for index only for Elasticsearch.
Add table-driven tests in crates/logfwd-config/src/lib.rs test module validating rejection message for each non-supported output type with path set.
Add one positive Elasticsearch test matching whichever option is selected.
Similar class: stdout accepts invalid output-side field values
File
crates/logfwd-config/src/lib.rs
Validation logic to update
File
crates/logfwd-output/src/lib.rs
Runtime sink behavior (path usage/ignore)
Note
🔒 Integrity filtering filtered 4 items
Integrity filtering activated and filtered the following items during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.
Validation: CONFIRMED — shared root cause with all silent-ignore config issues
Both InputConfig and OutputConfig are single flat structs (#[serde(deny_unknown_fields)]) with fields shared across all input/output types. Config::validate() checks that required fields are present for each type but does not reject extraneous optional fields that have no meaning for the selected type.
crates/logfwd-output/src/lib.rs: runtime builders use match cfg.output_type and silently ignore fields not consumed by the selected arm.
crates/logfwd-config/src/lib.rsConfig::validate(): validates required fields per type but has no reject-if-present checks for inapplicable optional fields.
Unified fix — add per-type field rejection to Config::validate():
// Example for OutputConfig:match output.output_type{OutputType::Stdout | OutputType::Null => {if output.endpoint.is_some(){warn_or_err("endpoint not used by this output type");}if output.index.is_some(){warn_or_err("index not used by this output type");}if output.compression.is_some(){warn_or_err("compression not used by this output type");}if output.auth.is_some(){warn_or_err("auth not used by this output type");}// etc.}OutputType::Elasticsearch => {if output.protocol.is_some(){warn_or_err("protocol not used by elasticsearch");}// etc.}// ...}
A single pass over all output types covering all optional fields fixes all 12 related issues at once.
Fixed on master in PR #1123 (923a033bd8e855f4011f8ad9d5248b9e44a3546a).
I rechecked origin/master; these type-inappropriate config fields are now rejected during validation, so this issue/work-unit looks stale and safe to close.
Activity
github-actions commentedon Apr 5, 2026
tl;dr I can reproduce this on
master:output.pathis currently accepted for multiple non-file outputs and ignored at runtime; the clean fix is to fail validation whenpathis set for output types that do not consume it.Recommendation
Add an explicit validation rule in
Config::validate()that rejectsoutput.pathfor non-file outputs that do not use it (stdout,null,otlp,http,loki,tcp,udp,arrow_ipc).For
elasticsearch, there is one nuance: runtime currently treatspathas an alias forindex. I recommend handling this explicitly (either keep as documented alias, or deprecate/remove alias and requireindex).Findings
OutputConfigexposespathfor all outputs:crates/logfwd-config/src/lib.rs:250-261.pathfor non-file outputs:crates/logfwd-config/src/lib.rs:693-760Stdout | Nullbranch is empty:crates/logfwd-config/src/lib.rs:748path:crates/logfwd-config/src/lib.rs:694-739cfg.pathfor most non-file outputs:crates/logfwd-output/src/lib.rs:662-790stdoutpath unused:crates/logfwd-output/src/lib.rs:769-776otlppath unused:crates/logfwd-output/src/lib.rs:740-767pathas fallback forindex:crates/logfwd-output/src/lib.rs:668-673Relevant snippet:
Verification
I ran these commands locally in the workspace:
Observed output:
So both configs currently pass validation.
Detailed Action Plan
crates/logfwd-config/src/lib.rsinsideConfig::validate()output loop (for (i, output)around:676+), add a pre-check after unsupported output-type checks:output.path.is_some()and output type is one of{Stdout, Null, Otlp, Http, Loki, Tcp, Udp, ArrowIpc}, returnConfigError::Validation.pathforElasticsearchand requireindexonly; remove.or(cfg.path.as_ref())incrates/logfwd-output/src/lib.rs:671.pathis legacy alias forindexonly for Elasticsearch.crates/logfwd-config/src/lib.rstest module validating rejection message for each non-supported output type withpathset.Related Items
crates/logfwd-config/src/lib.rscrates/logfwd-output/src/lib.rspathusage/ignore)Note
🔒 Integrity filtering filtered 4 items
Integrity filtering activated and filtered the following items during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.
issue_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)issue_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)issue_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)What is this? | From workflow: Issue Triage
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
strawgate commentedon Apr 5, 2026
Validation: CONFIRMED — shared root cause with all silent-ignore config issues
Both
InputConfigandOutputConfigare single flat structs (#[serde(deny_unknown_fields)]) with fields shared across all input/output types.Config::validate()checks that required fields are present for each type but does not reject extraneous optional fields that have no meaning for the selected type.This bug is one of ~12 confirmed instances of the same pattern (see also #1057, #1058, #1060, #1064, #1065, #1066, #1070, #1071, #1072, #1073, #1075, #1077, #1078).
Root cause confirmed:
crates/logfwd-output/src/lib.rs: runtime builders usematch cfg.output_typeand silently ignore fields not consumed by the selected arm.crates/logfwd-config/src/lib.rsConfig::validate(): validates required fields per type but has no reject-if-present checks for inapplicable optional fields.Unified fix — add per-type field rejection to
Config::validate():A single pass over all output types covering all optional fields fixes all 12 related issues at once.
fix(config): reject type-inappropriate fields in input/output validation
fix(config): reject type-inappropriate fields in input/output validation
fix(config): reject type-inappropriate fields in input/output validation
strawgate commentedon Apr 5, 2026
Fixed on
masterin PR #1123 (923a033bd8e855f4011f8ad9d5248b9e44a3546a).I rechecked
origin/master; these type-inappropriate config fields are now rejected during validation, so this issue/work-unit looks stale and safe to close.