Skip to content

fix(hosting): keep a free-disk floor before taking a copy - #205

Merged
ralyodio merged 1 commit into
masterfrom
fix/hosting-free-disk-floor
Nov 9, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/hosting-free-disk-floor

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Since #199 every node (and every single-role worker) hosts by default. The only limit on copies was the 5 GiB hosting budget per process, which ignores how full the disk already is: dev2 (production) runs ~6 c0mpute processes that all host now, on a disk with ~20 GiB free.

replicate() now refuses a new copy unless max(10 GiB, 5% of the disk), capped at 50 GiB remains free after it. A disk the OS cannot report (0/0) falls back to the budget check alone. Healing simply picks another host.

Unit test covers the floor math, the dev2 case (20 GiB free of 1.8 TiB: refuse), the exact boundary and the unknown-disk case. cargo test -p c0mpute-core --lib hosting: 36 passed.

🤖 Generated with Claude Code

Every node hosts by default since #199, including busy production boxes, and
the only guard was the 5 GiB hosting budget: dev2 runs ~6 c0mpute processes
that now all host, on a 1.8 TiB disk with 20 GiB free. replicate() now refuses
a copy unless max(10 GiB, 5% of the disk, capped at 50 GiB) stays free.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

13 finding(s)

HIGH/CRITICAL: 1 | MEDIUM: 8 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:89
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
MEDIUM sh-remote-script-execution scripts/install.sh:181
MEDIUM sh-remote-script-execution scripts/install.sh:206
MEDIUM sh-remote-script-execution scripts/install.sh:399
MEDIUM sh-remote-script-execution scripts/install.sh:441
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1165
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 5b38f1d into master Nov 9, 2026
12 checks passed
@ralyodio
ralyodio deleted the fix/hosting-free-disk-floor branch November 9, 2026 10:57
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.

1 participant