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/otlp inputs accept max_open_files and ignore it silently #1072
Non-file inputs such as generator and otlp accept max_open_files during validation even though the setting only makes sense for file-based inputs. The field is silently ignored instead of being rejected as irrelevant.
Reproduction
This config validates successfully even though generator has no open-file limit:
tl;dr: Issue #1072 is still valid — max_open_files is accepted for generator/otlp during config validation, but only file inputs consume it at runtime, so it is silently ignored.
Recommendation
Reject max_open_files for all non-file input types in Config::validate, and add non-file regression tests (at minimum generator and otlp; ideally include tcp/udp parity since the same gap exists there).
Status
Still valid: yes.
Already done: only max_open_files: 0 lower-bound validation exists (from prior fix for file inputs).
Not done: file-only enforcement for max_open_files.
Findings
InputConfig exposes max_open_files globally, though docs say file-only:
// crates/logfwd-config/src/lib.rs:242-244/// Maximum number of file descriptors to keep open simultaneously./// Applies only to `file` inputs. Defaults to 1024 when not set.pub max_open_files:Option(usize),
Validation currently only rejects 0; it does not reject non-file usage:
// crates/logfwd-config/src/lib.rs:643-659, 668-673match input.input_type{InputType::File => { ...}InputType::Udp | InputType::Tcp => { ...}InputType::Otlp | InputType::Generator | InputType::ArrowIpc => {}}if input.max_open_files == Some(0){returnErr(..."max_open_files must be at least 1"...);}
Runtime only uses max_open_files in file-tail path:
If docs mention max_open_files, ensure wording is explicit that this is file-input-only and enforced at validation time.
Key Files
File
Current relevant lines
Why it matters
crates/logfwd-config/src/lib.rs
233-245
InputConfig declares max_open_files
crates/logfwd-config/src/lib.rs
638-674
Input validation path currently misses non-file rejection
crates/logfwd-config/src/lib.rs
1695-1734
Existing tests only cover file cases
crates/logfwd/src/pipeline.rs
1276-1288
max_open_files consumed only for file input
crates/logfwd/src/pipeline.rs
1299-1330
Generator/OTLP path ignores max_open_files
Open PRs
I checked open PRs and found #1027, #1003, #1000 currently open. In this run, file-level PR diff reads were blocked by MCP integrity policy, so I could not confirm direct file overlap for the exact files above.
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: Issue #1072 is still valid —
max_open_filesis accepted forgenerator/otlpduring config validation, but only file inputs consume it at runtime, so it is silently ignored.Recommendation
Reject
max_open_filesfor all non-fileinput types inConfig::validate, and add non-file regression tests (at minimumgeneratorandotlp; ideally includetcp/udpparity since the same gap exists there).Status
max_open_files: 0lower-bound validation exists (from prior fix for file inputs).max_open_files.Findings
InputConfigexposesmax_open_filesglobally, though docs say file-only:0; it does not reject non-file usage:max_open_filesin file-tail path:Generator/Otlpbranches do not read this field (crates/logfwd/src/pipeline.rs:1299-1330).crates/logfwd-config/src/lib.rs:1695-1734), with no non-file rejection tests.Verification
I verified current behavior with config validation and existing tests.
This confirms the bug: non-file configs with
max_open_filescurrently validate successfully.Detailed Action Plan
In
crates/logfwd-config/src/lib.rs(Config::validate, around lines 638-674), add a file-only guard:input.max_open_files.is_some()andinput.input_type != InputType::File, return validation error:pipeline '{name}' input '{label}': max_open_files is only supported for file inputsKeep existing lower-bound check for file inputs (
max_open_files != 0).Add tests near existing max_open_files tests (
crates/logfwd-config/src/lib.rs:1695+):generator + max_open_filesotlp + max_open_filestcp + max_open_files, rejectudp + max_open_filesIf docs mention
max_open_files, ensure wording is explicit that this is file-input-only and enforced at validation time.Key Files
crates/logfwd-config/src/lib.rs233-245InputConfigdeclaresmax_open_filescrates/logfwd-config/src/lib.rs638-674crates/logfwd-config/src/lib.rs1695-1734crates/logfwd/src/pipeline.rs1276-1288max_open_filesconsumed only for file inputcrates/logfwd/src/pipeline.rs1299-1330max_open_filesOpen PRs
I checked open PRs and found
#1027,#1003,#1000currently open. In this run, file-level PR diff reads were blocked by MCP integrity policy, so I could not confirm direct file overlap for the exact files above.Related Items
tcp/udpinputsmax_open_files: 0)crates/logfwd-config/src/lib.rscrates/logfwd/src/pipeline.rsNote
🔒 Integrity filtering filtered 6 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".)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.