Hive Hive
Sign in

refactor: architectural review pass and add –quiet flag

GitHub issue · Closed

Metadata
Source
tuist/once #43
Updated
Jun 24, 2026
Domains
Once
Details

Summary

Architectural review pass across the workspace, plus a global --quiet flag. Lands in three commits:

  • chore: serialize daemon env-mutating tests via explicit Xdg. The two daemon path tests in fabrik-elixir were mutating XDG_RUNTIME_DIR / XDG_DATA_HOME without serialization, so concurrent cargo test runs could race. Extracted socket_path_in(&Xdg) / script_path_in(&Xdg) so tests exercise the layout against an explicit value instead of process env.
  • refactor: dedupe planner scaffolding, split lib.rs, tighten ownership. Lifted the identical DFS + cycle detection + workspace_output_dir formatter from each language crate into a new fabrik-frontend::plan_builder. Replaced the per-verb if fabrik_apple::supports_kind ... else if ... ladder in the CLI with a PLANNERS slice in a new fabrik-cli/src/planner.rs. Moved the ~200-line directory-blob encoder out of fabrik-core/src/lib.rs into its own module (1283 to ~1090 lines). Action::resource_request returns &ResourceRequest instead of cloning; WorkspacePath gains AsRef<str> / AsRef<Path>; apple plan stops carrying Cow<[String]>. Target-not-found and wrong-kind errors now suggest “Run fabrik targets”.
  • feat(cli): add --quiet flag and bundle output options. New global -q / --quiet that suppresses human-mode “fabrik: built …” / per-node hit/miss / “fabrik: ran …” trailers. Errors and --format json/toon output are untouched. Introduces a cli::Output { format, quiet } struct with a show_human_trailers() helper so command handlers take one value instead of two parallel params.

Testing

  • mise exec -- cargo build --workspace
  • mise exec -- cargo test --workspace (290+ tests, all pass)
  • mise exec -- cargo clippy --workspace --all-targets -- -D warnings
  • mise exec -- cargo fmt --all -- --check
  • Manual smoke: fabrik exec -- /bin/echo x prints the trailer; fabrik --quiet exec -- /bin/echo x does not.
Comments

No GitHub comments yet.