Skip to content

fix(refacto-p1): unified cmds execution flow (+ rm dead code)#904

Open
aeppling wants to merge 5 commits intodevelopfrom
refacto-folders-and-documentation
Open

fix(refacto-p1): unified cmds execution flow (+ rm dead code)#904
aeppling wants to merge 5 commits intodevelopfrom
refacto-folders-and-documentation

Conversation

@aeppling
Copy link
Copy Markdown
Contributor

Part 2 of codebase refacto

Summary

  • Standardize exit code handling across all modules: Result<()> → Result with a single process::exit() in main.rs — modules
    never call process::exit() directly
  • Standardize filter execution flow across commands
  • Fix critical bug in runner.rs where rtk err and rtk test always exited 0 regardless of command failure
  • Add exit_code_from_status() helper for passthrough commands and centralize signal handling (128+signal) in
    exit_code_from_output()

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test — 1123 passed, 0 failed
  • Zero std::process::exit() in src/cmds/ and src/core/ (verified via grep), exactly 1 in main.rs
  • golangci-lint exit 1 exception preserved (lint issues → exit 0, matching old behavior)
  • src/cmds/README.md updated with new Result contract, examples, and exit code tables
  • Manual testing: rtk ; echo $? for success (0) and failure (non-zero) paths

@aeppling aeppling closed this Mar 28, 2026
@aeppling aeppling deleted the refacto-folders-and-documentation branch March 28, 2026 23:18
@aeppling aeppling restored the refacto-folders-and-documentation branch March 29, 2026 00:41
@aeppling aeppling reopened this Mar 29, 2026
@aeppling aeppling changed the title fix(refacto): unified cmds execution flow (+ rm dead code) fix(refacto-p1): unified cmds execution flow (+ rm dead code) Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant