Skip to content

feat(core): wire missing RERR exit codes (#2114) - #3962

Merged
oferchen merged 1 commit into
masterfrom
feat/exit-code-gaps-2114
May 13, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/exit-code-gaps-2114

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • CommandRun(126): add explicit match arm in map_child_exit_status for shell exit 126, mirroring the existing 127/255 handling pattern. While from_i32(126) already resolved correctly via the fallback, the explicit arm matches upstream rsync's main.c:1591 convention and makes the mapping visible.
  • Unsupported(4): map io::ErrorKind::Unsupported to ExitCode::Unsupported in from_io_error, and change apply_protocol_restrictions to use ErrorKind::Unsupported so protocol feature rejections (ACLs below proto 30, xattrs below proto 30, fuzzy/basis-dir/prune below proto 29) produce exit code 4 instead of 11.
  • MessageIo(13): change daemon log_file_error from FEATURE_UNAVAILABLE(1) to MessageIo(13) per upstream log.c:163.

Test plan

  • New test maps_exit_126_to_command_run in ssh_transfer.rs child exit status tests
  • New test from_io_error_maps_unsupported_to_unsupported in exit_code/tests.rs
  • New test log_file_open_failure_returns_message_io in daemon/tests.rs
  • Updated existing log_file_error_creates_daemon_error_with_correct_code to expect exit code 13
  • All 245 affected tests pass across core, transfer, and daemon crates
  • Full workspace clippy clean (pre-existing fast_io stub warning unrelated)

@github-actions github-actions Bot added the enhancement New feature or request label May 12, 2026
@oferchen
oferchen force-pushed the feat/exit-code-gaps-2114 branch 2 times, most recently from 0b4b21d to 73f381a Compare May 13, 2026 01:28
Close three exit code gaps identified in the RERR audit:

- CommandRun(126): add explicit match arm in map_child_exit_status for
  shell exit 126, matching the existing 127/255 handling pattern.
- Unsupported(4): map io::ErrorKind::Unsupported to ExitCode::Unsupported
  in from_io_error and change apply_protocol_restrictions to use
  ErrorKind::Unsupported so protocol feature rejections (ACLs, xattrs,
  fuzzy below minimum version) produce exit code 4.
- MessageIo(13): change daemon log_file_error from FEATURE_UNAVAILABLE(1)
  to MessageIo(13) per upstream log.c:163.
@oferchen
oferchen force-pushed the feat/exit-code-gaps-2114 branch from 73f381a to 2c9d51a Compare May 13, 2026 03:37
@oferchen
oferchen merged commit cc705a9 into master May 13, 2026
39 checks passed
@oferchen
oferchen deleted the feat/exit-code-gaps-2114 branch May 13, 2026 11:06
oferchen added a commit that referenced this pull request May 18, 2026
feat(core): wire missing RERR exit codes (#2114)
oferchen added a commit that referenced this pull request Aug 24, 2026
feat(core): wire missing RERR exit codes (#2114)
oferchen added a commit that referenced this pull request Aug 24, 2026
feat(core): wire missing RERR exit codes (#2114)
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