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: generator inputs accept input.path and ignore it silently #1077
input.type: generator accepts input.path during validation even though the generator does not read from a filesystem path. The field is silently ignored instead of being rejected as irrelevant.
Reproduction
This config validates successfully even though generator does not use path:
tl;dr: input.type: generator currently accepts input.path and silently ignores it; the safest fix is to reject path during config validation in logfwd-config.
Recommendation
Reject path for generator in Config::validate and add a regression test in crates/logfwd-config/src/lib.rs so this cannot regress.
Findings
Key files
crates/logfwd-config/src/lib.rs:233-245 — InputConfig has shared fields for all input kinds, including path: Option(String).
crates/logfwd-config/src/lib.rs:643-659 — validation requires path for file, listen for udp/tcp, but does nothing for generator (InputType::Otlp | InputType::Generator | InputType::ArrowIpc => {}).
crates/logfwd/src/pipeline.rs:286-299 — pipeline pre-resolves/canonicalizes input_cfg.path when present.
crates/logfwd/src/pipeline.rs:1299-1318 — generator runtime construction reads listen and format, not path.
book/src/config/inputs.md:23-31 — generator docs only expose listen.
book/src/config/reference.md:141 — generator says “No extra fields required.”
This combination means path is accepted by schema and passes validation for generator, but has no runtime effect.
Verification
I validated current behavior with:
export RUSTC_WRAPPER=
cargo run -q -p logfwd -- --config /tmp/gh-aw/agent/generator-path.yaml --validate
cargo test -q -p logfwd-config all_input_types -- --nocapture
Where /tmp/gh-aw/agent/generator-path.yaml contains:
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.
resource:search_pull_requests (search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
issue:strawgate/memagent#unknown (search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)
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:
input.type: generatorcurrently acceptsinput.pathand silently ignores it; the safest fix is to rejectpathduring config validation inlogfwd-config.Recommendation
Reject
pathforgeneratorinConfig::validateand add a regression test incrates/logfwd-config/src/lib.rsso this cannot regress.Findings
Key files
crates/logfwd-config/src/lib.rs:233-245—InputConfighas shared fields for all input kinds, includingpath: Option(String).crates/logfwd-config/src/lib.rs:643-659— validation requirespathforfile,listenforudp/tcp, but does nothing forgenerator(InputType::Otlp | InputType::Generator | InputType::ArrowIpc => {}).crates/logfwd/src/pipeline.rs:286-299— pipeline pre-resolves/canonicalizesinput_cfg.pathwhen present.crates/logfwd/src/pipeline.rs:1299-1318— generator runtime construction readslistenandformat, notpath.book/src/config/inputs.md:23-31— generator docs only exposelisten.book/src/config/reference.md:141— generator says “No extra fields required.”This combination means
pathis accepted by schema and passes validation for generator, but has no runtime effect.Verification
I validated current behavior with:
Where
/tmp/gh-aw/agent/generator-path.yamlcontains:Output:
So generator+path validates successfully today.
Detailed Action Plan
crates/logfwd-config/src/lib.rsinsideConfig::validateinput loop (~643+), add a generator-specific guard:input.input_type == InputType::Generator && input.path.is_some()-> returnConfigError::Validation("...generator...does not support 'path'...").crates/logfwd-config/src/lib.rs(aroundvalidation_missing_input_path/all_input_types):input.type: generator+path: ...+output.type: stdout.Config::load_strreturns error containing bothgeneratorandpath.book/src/config/inputs.mdgenerator table can explicitly saypathis invalid for generator.book/src/config/reference.mdkeep “No extra fields required” and optionally add “pathis file-only”.cargo test -p logfwd-config(or at least the new test + nearby validation tests).Related Items
crates/logfwd-config/src/lib.rs:668,1691(#696)crates/logfwd-config/src/lib.rs:1866,2010(#540)#1027,#1003,#1000logfwd-config(primary),logfwd(runtime evidence), docs inbook/logfwd-config; runtime behavior stays unchanged once invalid config is rejectedcrates/logfwd-config/src/lib.rs:1064+(validation_missing_input_path),:1271+(all_input_types)Note
🔒 Integrity filtering filtered 8 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.
search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)search_issues: 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".)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".)pull_request_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.