---
id: 11a0d3a2-0082-45aa-b54c-3b574362d86e
title: 'build: enforce Cloudflare Pages 20k-file / 25 MiB limits'
state: closed
labels:
- area:release
assignees: []
milestone: null
created: 2026-10-27T17:24:52.360064394Z
updated: 2026-10-27T17:45:41.642992161Z
---
## What

The build can emit artifacts Cloudflare Pages rejects:

- **25 MiB per file**: a 64 MB repo blob was written to `raw/big.bin` silently.
- **20,000 files per deployment**: `raw/` + `files/` + dir pages scale with repo size; no count check.
- `repo.bundle` / `repo.tar.gz` can exceed 25 MiB on larger histories.

## Reproduced

```
dd if=/dev/zero of=big.bin bs=1M count=64
hu13 build /tmp/bigprobe -o /tmp/bigout
find /tmp/bigout -type f -size +25M   # raw/big.bin 64 MB
```

No warning; Pages would fail the deploy with a generic error.

## Impact

The advertised Pages Free target fails late and opaquely for ordinary asset-heavy repos. The current repo fits (1,325 files), but nothing enforces it.

## Fix

- Add a Pages budget check (always-on or `--pages`): every output file ≤25 MiB, output file count ≤20,000; report the offending paths and suggest Git LFS / external assets.
- Include bundle/tarball sizes.
- Tests for a >25 MiB fixture and for the file-count boundary (can use a small threshold under `cfg(test)` or a `--max-file-bytes` override).
- Mention the limits in the deploy wiki.
