Skip to content

feat: extract read_early_input_file with 5K size cap - #2449

Merged
oferchen merged 1 commit into
masterfrom
feat/early-input-file-reader
Feb 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/early-input-file-reader

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Extract read_early_input_file() that reads --early-input file content up to EARLY_INPUT_MAX_SIZE (5120 bytes)
  • Handles partial reads via loop, silent truncation of oversized files, empty files
  • Returns ClientError with exit code 5 for missing/unreadable files
  • Refactored send_early_input to delegate to the new function

Closes #353

Test plan

  • read_normal_file - small text file content match
  • read_empty_file - empty Vec for empty file
  • read_file_exactly_at_limit - 5120 bytes returned fully
  • read_file_exceeding_limit_is_truncated - 6144 bytes → 5120
  • read_missing_file_returns_error - error with exit code 5
  • read_file_with_binary_content - all 256 byte values
  • read_file_well_over_limit_truncated_to_max - 51200 → 5120
  • All 1793 core tests pass

Extract read_early_input_file() that reads --early-input file content
up to EARLY_INPUT_MAX_SIZE (5120 bytes, matching upstream). Handles
partial reads, silent truncation of oversized files, empty files, and
missing file errors with appropriate exit codes.
@oferchen
oferchen merged commit b63057e into master Feb 22, 2026
9 checks passed
@oferchen
oferchen deleted the feat/early-input-file-reader branch February 22, 2026 12:32
@github-actions github-actions Bot added the enhancement New feature or request label Feb 22, 2026
oferchen added a commit that referenced this pull request May 1, 2026
Extract read_early_input_file() that reads --early-input file content
up to EARLY_INPUT_MAX_SIZE (5120 bytes, matching upstream). Handles
partial reads, silent truncation of oversized files, empty files, and
missing file errors with appropriate exit codes.
oferchen added a commit that referenced this pull request May 5, 2026
Extract read_early_input_file() that reads --early-input file content
up to EARLY_INPUT_MAX_SIZE (5120 bytes, matching upstream). Handles
partial reads, silent truncation of oversized files, empty files, and
missing file errors with appropriate exit codes.
oferchen added a commit that referenced this pull request May 18, 2026
…#2449) (#4492)

Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser
in either the standalone `daemon::rsyncd_config` API or the daemon runtime
`daemon::sections::config_parsing` pathway. All per-directive, per-bool, and
per-list helpers are private to their parser modules; only the whole-file
entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable.

The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444
already exercises every line-level branch through the whole-file driver, so
FCV-16 is closed with no production-code change.
oferchen added a commit that referenced this pull request May 18, 2026
…#2449) (#4492)

Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser
in either the standalone `daemon::rsyncd_config` API or the daemon runtime
`daemon::sections::config_parsing` pathway. All per-directive, per-bool, and
per-list helpers are private to their parser modules; only the whole-file
entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable.

The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444
already exercises every line-level branch through the whole-file driver, so
FCV-16 is closed with no production-code change.
oferchen added a commit that referenced this pull request May 18, 2026
…#2449) (#4492)

Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser
in either the standalone `daemon::rsyncd_config` API or the daemon runtime
`daemon::sections::config_parsing` pathway. All per-directive, per-bool, and
per-list helpers are private to their parser modules; only the whole-file
entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable.

The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444
already exercises every line-level branch through the whole-file driver, so
FCV-16 is closed with no production-code change.
oferchen added a commit that referenced this pull request Aug 24, 2026
…#2449) (#4492)

Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser
in either the standalone `daemon::rsyncd_config` API or the daemon runtime
`daemon::sections::config_parsing` pathway. All per-directive, per-bool, and
per-list helpers are private to their parser modules; only the whole-file
entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable.

The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444
already exercises every line-level branch through the whole-file driver, so
FCV-16 is closed with no production-code change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant