Explain
rm_build_explainInspect a content-addressed build key to see cached artifacts, checksums, and why a build deduplicated or rebuilt instead of serving stale output.
Instructions
Explain (rm_build). Content-addressed build broker for ANY repository (CONCEPT:RM-TASK-LEDGER).
Keyed by (repo, tree-sha, feature-set, toolchain-fingerprint, target-triple). The DEDUP is the value: N lanes asking for the same
build today each pay for a full cargo/pnpm build into their own
target-isolated/node_modules — measured at 21.7 GB across 4
duplicate directories after pruning. This tool publishes named
artifacts to a shared, checksummed cache instead.
Honest degradation: a dirty tree or an unfingerprintable toolchain BUILDS — it never serves a possibly-stale artifact and never silently skips the cache as though it were consulted.
Co-location: this tool always passes colocated=True to the
underlying reservation, because being inside this pinned MCP server
process IS the proof of same-node execution that a bare CLI invocation
cannot provide — fcntl leases do not arbitrate across nodes, and
the lease files live under an NFS-exported path. Route build requests
through this tool rather than a bare local invocation when you are not
certain you are on the pinned node.
Arbitration is advisory (D-CP-8): an agent running cargo build
directly bypasses this broker entirely.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | A cache key, for status/artifacts/explain. | |
| host | No | For 'request': dispatch to this REGISTERED, authorized remote host (its rm_remote_workers 'register_worker' host_id) instead of building locally. Requires a clean local tree (its HEAD sha + origin are what gets staged and built remotely) and does not yet retrieve artifacts back — see the returned result's 'note'. Omit to build locally (the default, always colocated=True). | |
| spec | No | Which declared build spec to use (.buildcache.yaml). Defaults to the repo's first. | |
| repo_path | No | Any working tree of the target repository. Defaults to the server's cwd. | |
| keep_recent | No | For gc: always keep this many most-recent cache entries. | |
| max_age_days | No | For gc: reclaim cache entries older than this (subject to keep_recent). | |
| wait_timeout | No | Seconds 'request' waits on an in-flight build of the same key before building anyway. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||