cargo-hauler 0.4.9 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +15 -7
  3. package/artifact/agent-bundle.manifest.json +1 -1
  4. package/artifact/claude/.claude-plugin/marketplace.json +1 -1
  5. package/artifact/claude/.claude-plugin/plugin.json +1 -1
  6. package/artifact/claude/INSTALL.md +1 -1
  7. package/artifact/claude/bin/cargo-hauler-flight.mjs +78 -30
  8. package/artifact/claude/bin/cargo-hauler.mjs +268 -62
  9. package/artifact/claude/hooks/event-route-session-start.mjs +2 -2
  10. package/artifact/claude/hooks/event-route-stop.mjs +2 -2
  11. package/artifact/claude/hooks/event-route-tool-after.mjs +2 -2
  12. package/artifact/claude/hooks/event-route-tool-before.mjs +2 -2
  13. package/artifact/claude/hooks/hooks-flight.mjs +25 -12
  14. package/artifact/claude/mcp/mcp-hauler-2b8242f9-flight.mjs +79 -31
  15. package/artifact/claude/mcp/mcp-hauler-2b8242f9.mjs +80 -32
  16. package/artifact/claude/mcp-apps/dashboard.html +1 -1
  17. package/artifact/claude/scripts/hauler.mjs +258 -56
  18. package/artifact/claude/skills/hauler-dashboard/SKILL.md +2 -2
  19. package/artifact/codex/.codex-plugin/plugin.json +1 -1
  20. package/artifact/codex/INSTALL.md +1 -1
  21. package/artifact/codex/bin/cargo-hauler-flight.mjs +78 -30
  22. package/artifact/codex/bin/cargo-hauler.mjs +268 -62
  23. package/artifact/codex/hooks/event-route-session-start.mjs +2 -2
  24. package/artifact/codex/hooks/event-route-stop.mjs +2 -2
  25. package/artifact/codex/hooks/event-route-tool-after.mjs +2 -2
  26. package/artifact/codex/hooks/event-route-tool-before.mjs +2 -2
  27. package/artifact/codex/hooks/hooks-flight.mjs +25 -12
  28. package/artifact/codex/mcp/mcp-hauler-2b8242f9-flight.mjs +79 -31
  29. package/artifact/codex/mcp/mcp-hauler-2b8242f9.mjs +80 -32
  30. package/artifact/codex/mcp-apps/dashboard.html +1 -1
  31. package/artifact/codex/scripts/hauler.mjs +258 -56
  32. package/artifact/codex/skills/hauler-dashboard/SKILL.md +2 -2
  33. package/artifact/cursor/.cursor-plugin/plugin.json +1 -1
  34. package/artifact/cursor/INSTALL.md +1 -1
  35. package/artifact/cursor/bin/cargo-hauler-flight.mjs +78 -30
  36. package/artifact/cursor/bin/cargo-hauler.mjs +268 -62
  37. package/artifact/cursor/hooks/event-route-session-start.mjs +2 -2
  38. package/artifact/cursor/hooks/event-route-stop.mjs +2 -2
  39. package/artifact/cursor/hooks/event-route-tool-after.mjs +2 -2
  40. package/artifact/cursor/hooks/event-route-tool-before.mjs +2 -2
  41. package/artifact/cursor/hooks/hooks-flight.mjs +25 -12
  42. package/artifact/cursor/install.mjs +1 -1
  43. package/artifact/cursor/mcp/mcp-hauler-2b8242f9-flight.mjs +79 -31
  44. package/artifact/cursor/mcp/mcp-hauler-2b8242f9.mjs +80 -32
  45. package/artifact/cursor/mcp-apps/dashboard.html +1 -1
  46. package/artifact/cursor/scripts/hauler.mjs +258 -56
  47. package/artifact/cursor/skills/hauler-dashboard/SKILL.md +2 -2
  48. package/artifact/portable/INSTALL.md +1 -1
  49. package/artifact/portable/bin/cargo-hauler-flight.mjs +78 -30
  50. package/artifact/portable/bin/cargo-hauler.mjs +268 -62
  51. package/artifact/portable/install.mjs +1 -1
  52. package/artifact/portable/mcp/mcp-hauler-2b8242f9-flight.mjs +79 -31
  53. package/artifact/portable/mcp/mcp-hauler-2b8242f9.mjs +79 -31
  54. package/artifact/portable/mcp-apps/dashboard.html +1 -1
  55. package/artifact/portable/plugin.json +1 -1
  56. package/artifact/portable/scripts/hauler.mjs +258 -56
  57. package/artifact/portable/skills/hauler-dashboard/SKILL.md +2 -2
  58. package/dist/bin/cargo-hauler-flight.mjs +78 -30
  59. package/dist/bin/cargo-hauler.js +268 -62
  60. package/dist/bin/hauler.js +258 -56
  61. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b80d9db: Cut the latency the hauler adds on a shared target directory, and stop charging lane wait to attaching.
8
+
9
+ - A lane now hands its slot to the next request as soon as a `test`, `nextest`, `bench`, or `run` leader prints Cargo's `Finished … target(s)` line: Cargo drops the build-directory lock there, so the next compile overlaps the leader's test run instead of waiting for it. The leader keeps its admission permit until it settles. `hauler status` and the dashboard list such leaders under the lane's `executing` tickets, and the ledger stamps `buildFinishedAtMs` on the leader and its riders. `CARGO_HAULER_OVERLAP_EXECUTION=0` restores strict one-process-per-lane.
10
+ - Default admission permits scale with the machine: one per eight cores, clamped between the previous five and sixteen. `CARGO_HAULER_MAX_CONCURRENT` still overrides.
11
+ - The cost model times edited and cached runs of an intent separately, and floors an edited intent that has only ever been timed cached at the crate compile priors, so a recompiling test run no longer reaches the head of the lane on a seconds-long estimate; unedited runs no longer teach the per-crate compile priors.
12
+ - Saved latency for riders is measured from the later of the rider's creation and the leader's start: time queued behind a leader that had not started is lane wait the rider would have paid alone, not a cost of attaching. Existing ledgers recompute the column once on open (`user_version` 2); the dashboard's all-time latency tile changes accordingly.
13
+
3
14
  ## 0.4.9
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -130,12 +130,19 @@ followed by another statement, `elif`, and `function name { … }` — are left
130
130
  untouched and run as plain Cargo rather than risk emitting a changed
131
131
  command.
132
132
 
133
- A lane is keyed by workspace root and resolved target directory. It runs one
134
- job at a time. Different lanes may run concurrently after acquiring one of the
135
- global admission permits. `CARGO_HAULER_MAX_CONCURRENT` controls the
136
- machine-wide permit count and defaults to five Cargo processes. Attached
137
- requests (riders) do not hold permits; the admission meter counts permit
138
- holders and reports riders separately.
133
+ A lane is keyed by workspace root and resolved target directory. It compiles
134
+ one job at a time Cargo's own build-directory lock would serialize them
135
+ anyway. Once a `test`, `nextest`, `bench`, or `run` leader reports its build
136
+ finished, Cargo has dropped that lock, so the lane hands its slot to the next
137
+ request and that compile overlaps the leader's test run
138
+ (`CARGO_HAULER_OVERLAP_EXECUTION=0` restores strict one-at-a-time). Different
139
+ lanes may run concurrently after acquiring one of the global admission
140
+ permits. `CARGO_HAULER_MAX_CONCURRENT` controls the machine-wide permit count;
141
+ the default is one permit per eight cores, clamped between five and sixteen,
142
+ since the shared jobserver already bounds compile parallelism and the pressure
143
+ arms defer admission under load. Attached requests (riders) do not hold
144
+ permits; the admission meter counts permit holders and reports riders
145
+ separately.
139
146
 
140
147
  Within a lane, the daemon can reduce work in three ways:
141
148
 
@@ -470,7 +477,8 @@ Per-host notes and hook timeouts are in [docs/install.md](docs/install.md).
470
477
  | --- | --- | --- |
471
478
  | `CARGO_HAULER_STATE_DIR` | Per-user cache directory | Unix socket or Windows named pipe source, SQLite ledger, daemon log, pid lock, `hook-state.json`, `hook-events.jsonl`, and the per-ticket output logs under `tickets/`. No legacy alias. |
472
479
  | `CARGO_HAULER_CARGO_BIN` | `$CARGO_HOME/bin/cargo` | Cargo binary for daemon-started work; bare `cargo` is the last fallback. Never resolved through `PATH`. Read from the daemon's own environment (export it where the daemon starts, or before `hauler daemon start`); clients do not forward it. |
473
- | `CARGO_HAULER_MAX_CONCURRENT` | `5` | Global admission permits for Cargo processes across all lanes; an integer >= 1. |
480
+ | `CARGO_HAULER_MAX_CONCURRENT` | cores ÷ 8, clamped to 5–16 | Global admission permits for Cargo processes across all lanes; an integer >= 1. |
481
+ | `CARGO_HAULER_OVERLAP_EXECUTION` | `1` | Hand a lane to its next request once a `test`/`nextest`/`bench`/`run` leader reports its build finished, overlapping the next compile with the leader's execution phase. `0` keeps a lane strictly one process at a time. |
474
482
  | `CARGO_HAULER_JOBS_GRANT` | `max(4, cores / max concurrent)` | `CARGO_BUILD_JOBS` added to each Cargo process only while the shared jobserver FIFO is not armed; an armed daemon injects `MAKEFLAGS` instead and leaves `CARGO_BUILD_JOBS` unset. `0` disables injection. |
475
483
  | `CARGO_HAULER_JOBSERVER` | `auto` | Machine-wide fifo jobserver for daemon-spawned cargo: `auto` arms it only when the host `make` is 4.4+ (or absent) because older makes reject `--jobserver-auth=fifo:` in build scripts; `fifo` forces it on, `off` disables it (per-run `CARGO_BUILD_JOBS` grants apply instead). |
476
484
  | `CARGO_HAULER_LOAD_THRESHOLD` | Disabled | Per-core one-minute load threshold for deferring new admissions. |