24 lines
2.0 KiB
Markdown
24 lines
2.0 KiB
Markdown
---
|
|
name: blacksite-build-storage
|
|
description: Keep Blacksite Cargo and package build artifacts within a configured disk budget by selecting stable build lanes, measuring target/build directories, pruning only verified disposable caches, and preserving warm development performance. Use before or after heavy builds, when disk use grows, or when compile performance degrades from artifact accumulation.
|
|
---
|
|
|
|
# Blacksite build storage
|
|
|
|
Read `.codex/workflow.toml` and [the storage policy](references/build-storage-policy.md). Use `scripts/codex/cargo_lane.py` for every Cargo invocation and `scripts/codex/build_storage.py` for measurement or cleanup.
|
|
|
|
Trigger this Skill for candidate, all-feature, all-target, package, hot-reload, full-debug, cache-growth, low-space, unexplained rebuild, and cleanup requests.
|
|
|
|
- Keep one persistent `dev` lane. Candidate, hot-reload, full-debug, cross-target, and package lanes are exceptional and disposable.
|
|
- Use stable separate `CARGO_BUILD_BUILD_DIR` when supported; otherwise use bounded external `CARGO_TARGET_DIR` lanes.
|
|
- Account for repository final targets, external intermediates, package caches, Cargo timings/docs, free space, and an already-enabled `sccache`.
|
|
- Run storage preflight/postflight around heavy gates. When configured, pressure may prune only
|
|
expired disposable lanes after their complete checked plan is printed and flushed.
|
|
- Require valid sentinels, canonical workspace identity, no symlink traversal, and no active Cargo/rustc/linker/packager before deletion.
|
|
- Delete whole managed lanes only. Never delete individual Cargo internal files and never install cleanup/cache tools without explicit approval.
|
|
- Every apply prints and flushes its complete byte-counted checked plan before deletion begins.
|
|
- Preserve candidate binaries/packages and evidence outside the disposable lane, then establish the
|
|
generation-bound marker with `build_storage.py mark-candidate-preserved`; an absent, stale, or
|
|
hash-mismatched marker blocks candidate deletion.
|
|
- Report reclaimed bytes plus expected cold-build impact.
|