Skip to content

fix(cache): hold the Cargo maximum around every compiling gate command - #263

Open
ebursztein wants to merge 5 commits into
mainfrom
fix/cargo-cache-max-enforcement
Open

ebursztein wants to merge 5 commits into
mainfrom
fix/cargo-cache-max-enforcement

Conversation

@ebursztein

Copy link
Copy Markdown
Collaborator

The shared Cargo target reached 237 GB against its 180 GiB maximum and a
focus-test died with ENOSPC. Enforcement existed only as a prerequisite step
of the host-build fragment and in front of bounded direct cargo, and only
before compiling. Clippy in test-fast, the static coverage build,
test-rust-affected, smoke, pack-initrd, bench-report and check-assets
compiled into the shared target with no enforcement at all, and nothing
enforced after any compile, so each worktree's salted units stood until
some later enforcing path happened to run.

The bound is now a resource of the command: every exclusive gate command
whose plan claims workspace_binaries holds CargoCacheBound, which enforces
before the first step and after the last, failed runs included. The
fragment step and its cache_already_enforced opt-out are removed. The
bounded wrapper also enforces after the command, reporting rather than
refusing on that side so the command's own exit status stands.

Open question left for review: test-release-contracts is non-exclusive yet its contracts.audit.generated-settings step runs cargo into the shared target without the lock or the bound.

Tests: gate + cache + citadel, 5730 passed, 46 skipped; ruff and capsem-gate lint clean.

🤖 Generated with Claude Code

The shared Cargo target reached 237 GB against its 180 GiB maximum and a
focus-test died with ENOSPC. Enforcement existed only as a prerequisite step
of the host-build fragment and in front of bounded direct cargo, and only
before compiling. Clippy in test-fast, the static coverage build,
test-rust-affected, smoke, pack-initrd, bench-report and check-assets
compiled into the shared target with no enforcement at all, and nothing
enforced after any compile, so each worktree's salted units stood until
some later enforcing path happened to run.

The bound is now a resource of the command: every exclusive gate command
whose plan claims workspace_binaries holds CargoCacheBound, which enforces
before the first step and after the last, failed runs included. The
fragment step and its cache_already_enforced opt-out are removed. The
bounded wrapper also enforces after the command, reporting rather than
refusing on that side so the command's own exit status stands.
@codecov-commenter

codecov-commenter commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.0%. Comparing base (f7da631) to head (11afca9).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #263   +/-   ##
=====================================
  Coverage   72.0%   72.0%           
=====================================
  Files       1032    1032           
  Lines      93151   93151           
  Branches   89173   89173           
=====================================
+ Hits       67140   67146    +6     
+ Misses     21169   21168    -1     
+ Partials    4842    4837    -5     
Flag Coverage Δ
linux-unit 70.5% <ø> (+<0.1%) ⬆️
unit 15.0% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
TypeScript SDK 97.8% <ø> (ø)
Python SDK 98.7% <ø> (ø)
Network 84.5% <ø> (+<0.1%) ⬆️
Security 81.6% <ø> (ø)
Tooling 88.6% <ø> (ø)
Monitoring 87.3% <ø> (ø)
Virtualization 64.1% <ø> (-0.1%) ⬇️
Confined Port Router 76.6% <ø> (+0.6%) ⬆️
Private Network 72.0% <ø> (+0.4%) ⬆️
Assets 80.8% <ø> (ø)
Gateway API 96.7% <ø> (ø)
Rust SDK 96.3% <ø> (ø)
Configuration 86.8% <ø> (ø)
Credentials 80.7% <ø> (ø)
Host Foundation 75.5% <ø> (ø)
Core Platform 55.8% <ø> (ø)
Runtime 60.6% <ø> (-0.1%) ⬇️
Daemon ∅ <ø> (∅)
Service 71.5% <ø> (ø)
Process 48.8% <ø> (+<0.1%) ⬆️
Admin 63.2% <ø> (ø)
CLI 48.7% <ø> (ø)
MCP Server 93.8% <ø> (ø)
MCP Aggregator 61.8% <ø> (ø)
MCP Builtin 57.4% <ø> (ø)
Gateway 78.9% <ø> (ø)
TUI 68.5% <ø> (ø)
System Tray ∅ <ø> (∅)
Guard 92.2% <ø> (ø)
UI ∅ <ø> (∅)
Release Site 15.0% <ø> (ø)
Builder ∅ <ø> (∅)
Mock Server 59.0% <ø> (ø)
Bench 46.8% <ø> (ø)
see 8 files with indirect coverage changes
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants