Commit c46859d
refactor: fold scaffolding-only crates and collapse duplicate enums (#10597)
* refactor(cli): collapse the duplicate command-family and stdout-mode enums
CommandDispatchFamily was a byte-identical twin of CommandJsonFamily joined
by an identity From impl, and CommandStdoutMode was a twin of
CommandResponseMode differing only in the name of one variant. Both pairs
encoded one concept under two types, forcing an identity conversion at every
boundary.
Delete both duplicates. The exported contract JSON is unchanged: json_family
and dispatch_family were equal for every command by construction and still
are, and response_mode/stdout_mode keep their distinct spellings (json vs
json_envelope) by rendering the one enum through two functions. Two tests
lock that wire shape.
Also drops CommandSpec::dispatch_family and the never-called
registered_command_dispatch_family, both of which became literal aliases.
Refs #10295
* refactor: fold four scaffolding-only crates into their single consumers
43 workspace members -> 39.
homeboy-output (714 LOC) and homeboy-process (1332 LOC) were leaf crates with
exactly one and two dependents. Core re-exported both wholesale, so every call
site already spelled them crate::output:: / crate::process:: and no import
churn was needed. Neither is depended on by anything below core, so folding
them in cannot reintroduce a cycle: homeboy-output has no internal
dependencies at all, and homeboy-process depends only on homeboy-error, which
core already depends on.
homeboy-cli-contract (41 LOC: Placement) and homeboy-agents-contract (45 LOC:
AgentTaskProviderRunnerSource) each held one type. Both move into
homeboy-lab-runner-contract, which is already the below-core home for
behavior-free runner contracts and is already a dependency of every consumer
except homeboy-cli. Placement's stated rationale -- give core a place to name
the type without a core -> commands edge -- holds there unchanged, and every
value Placement takes is a statement about the Lab runner.
Six process items that were only pub to cross the old crate boundary
(SIGNAL_TERMINATE, SIGNAL_KILL, signal_pid, wait_for_pid_exit,
pid_has_ownership_token, terminate_pid_with_sigterm_and_wait) narrow back to
pub(crate); all six are consumed only by core's daemon module.
Adds the first tests either folded contract type has had: Placement's
operator-facing --placement value names and routing predicates, and the
provider source-root wire shape (optional fields stay optional, unknown keys
land in extra).
Refs #10296
* refactor(process): drop dead terminate_process_tree_best_effort
Zero callers across the workspace (verified with grep -rn plus a control
grep). Superseded by the timeout-bounded owned-tree termination below it.
* build: drop the folded crates from Cargo.lock
CI passes --locked, so a stale lock fails every gate before compilation.
Regenerated with cargo metadata (resolve only, no build): removes the
four folded packages and repoints homeboy-lab-runner-contract. No
version bumps.
---------
Co-authored-by: chubes-bot <266378653+homeboy-ci[bot]@users.noreply.github.com>1 parent 1736856 commit c46859d
40 files changed
Lines changed: 352 additions & 364 deletions
File tree
- crates
- contracts
- homeboy-agents-contract
- src
- homeboy-cli-contract
- src
- homeboy-lab-runner-contract
- src
- homeboy-agents
- src
- homeboy-cli
- src
- cli_surface
- command_contract
- commands
- contract
- json_output
- raw_output
- runner
- homeboy-core
- src
- homeboy-lab-runner
- src
- lab/offload
- tests
- homeboy-output
- homeboy-process
- docs/architecture
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
9 | 25 | | |
10 | 26 | | |
11 | 27 | | |
| |||
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
0 commit comments