Skip to content

main: each mode a step of its own; main is the order they are checked in - #101

Merged
blockmandev merged 2 commits into
mainfrom
refactor/main-steps
Nov 15, 2026
Merged

blockmandev merged 2 commits into
mainfrom
refactor/main-steps

Conversation

@blockmandev

Copy link
Copy Markdown
Member

The auditor's findings b2aeaf49766292f1 (main spanned 304 lines) and
18b776aa2358b13b (cyclomatic complexity 53). main is now 40 lines: the
insbx helper, sandbox_exec_if_asked, run_subcommand (review, plugin,
lifecycle, remote, one function each), parse_args, carry_over_old_state,
ignored_spec_gate and run_mode, whose arms each call one function
(run_task, run_desktop_mcp, run_serve, ...). The order and every mode's
body are unchanged, with their comments.

cargo clippy --all-targets: clean. cargo test --bins: 59 passed. The built
binary answers --version, review --help, plugin list and completions bash,
and exits 1 on an unknown flag.

The auditor's findings b2aeaf49766292f1 (main spanned 304 lines) and
18b776aa2358b13b (cyclomatic complexity 53). main is now 40 lines: the
insbx helper, sandbox_exec_if_asked, run_subcommand (review, plugin,
lifecycle, remote, one function each), parse_args, carry_over_old_state,
ignored_spec_gate and run_mode, whose arms each call one function
(run_task, run_desktop_mcp, run_serve, ...). The order and every mode's
body are unchanged, with their comments.

cargo clippy --all-targets: clean. cargo test --bins: 59 passed. The built
binary answers --version, review --help, plugin list and completions bash,
and exits 1 on an unknown flag.
…k_run::run_task as uncalled

The wiring scan matches callers by name. A main.rs function named
run_task counted as a caller of task_run::run_task, whose only caller is
a test, and the ratchet fell from 38 to 37 for nothing (PR 101's CI).
Renamed, with the reason beside it; MAX_UNWIRED stays at 38.

cargo test --lib: 2290 passed (wiring:: 10 passed). cargo test --bins: 59
passed. cargo clippy --all-targets: clean.
@blockmandev
blockmandev merged commit 0ffcb90 into main Nov 15, 2026
12 checks passed
@blockmandev
blockmandev deleted the refactor/main-steps branch November 15, 2026 21:54
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