Skip to content

build: restrict the RSS tripwire to explicit target budgets (#1665) - #1666

Merged
ehartford merged 2 commits into
mainfrom
build-rss-budget-scope
Sep 25, 2026
Merged

ehartford merged 2 commits into
mainfrom
build-rss-budget-scope

Conversation

@ehartford

@ehartford ehartford commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

An ordinary application exceeding 1 GiB RSS currently fails the compiler's internal regression guard. This change removes the implicit application limit, retains RSS reporting, and explicitly applies the existing 1 GiB budget to the compiler repository's self-compilation targets. Projects can opt individual targets into Target.rss_limit(bytes).

Budgets survive graph selection and caching, do not appear in action arguments, and fail before dependent work runs. A failed budget invalidates the target's success record so retrying cannot silently pass from cache.

LLDB confirmed the old unconditional branch using a tiny application and an injected recorded peak of 1 GiB + 1 byte: run_build_graph+91024, x8=0x40000001, x27=0x40000000, branching to failure at +91032. Synthetic policy tests cover WIPE-sized and 8 GiB measurements, threshold boundaries, malformed budgets, and graph/cache round trips without allocating gigabytes.

Validation passed: stage1 and stage2 builds; synthetic policy regression; end-to-end regression (unbudgeted/configured success, repeated over-budget failure, dependent blocking, metadata isolation and invalid budget rejection); specification inventory check. Logs are in the rss-budget worktree: out/rss-dev.log, out/rss-stage2.log, out/rss-policy-stage1.log, out/rss-integration.log, and out/rss-spec-inventory.log.

The prerequisite stack #1656 → #1661 → #1662 is merged at 8d3cc36. Main passed its complete pinned-seed battery and install/runner gates; its verified release binary is published as nightly-20260925-local-1-8d3cc360cf23. This PR includes the new seed.lock/workflow pins and retires the temporary field-copy accommodation. The previous seed fetched and checksum-verified the published asset.

The complete final battery passed at 1f27736, driven by the newly pinned seed: build, fixpoint (all 16 units), drop audit, move audit, full test, test-green, and last-green. The suite passed 1,274 behavior, 1,121 compile-error, 210 specification, and 37 internal fixtures, including both new RSS regressions. Logs: out/logs-rss-seeded/. The worktree is clean and the PR is ready to merge.

Fixes #1665.

@ehartford
ehartford added this pull request to stack #1664 September 25, 2026 02:22
Base automatically changed from analyze-audit-resolution to main September 25, 2026 03:32
Fixes #1665. Ordinary application targets retain RSS reporting without
inheriting the compiler repository's 1 GiB self-build budget. Add
Target.rss_limit(bytes), normalize its policy into the graph, and preserve
it across selection, serialization and caching. The compiler build graph
opts its self-compilation targets into the existing 1 GiB budget.

Enforce configured budgets before releasing dependent work and invalidate
successful cache state when a budget fails, so retries cannot hide a failure.

Root cause proof: LLDB on the previous stack's release binary with a tiny
ordinary application, at build_graph_times_report, injected the recorded
peak 0x40000001. run_build_graph+91024 compared x8=0x40000001 with
x27=0x40000000 and entered the universal failure branch at +91032. The
global threshold had no target-policy condition. Transcript:
out/rss-scope-lldb.txt in the rss-budget worktree.

Synthetic tests cover unbudgeted WIPE-sized and 8 GiB measurements,
configured thresholds including >32-bit values, graph/cache round trips,
and malformed budgets. Integration coverage exercises explicit limits,
argument isolation, dependent blocking and repeated failures.
@ehartford
ehartford force-pushed the build-rss-budget-scope branch from f766251 to 2741bf3 Compare September 25, 2026 03:32
Main passed build, all 16 fixpoint units, drop/move audits, the full test suite, test-green, last-green and install-user. The installed compiler rebuilds its native runner without fallback. The published asset was fetched and checksum-verified by the previous seed. Its source check accepts the restored field move and RSS-budget driver source.
@ehartford

Copy link
Copy Markdown
Contributor Author

Verified 1f27736 under the pinned seed nightly-20260925-local-1-8d3cc360cf23, with a cold C-import cache.

Gate Result
Build PASS
Fixpoint PASS, all 16 compiler units
Drop audit PASS
Move audit PASS
Full test PASS: 1,274 behavior, 1,121 compile-error, 210 spec, 37 internals; all remaining lanes green
test-green PASS
last-green PASS, published

Both new RSS tests pass in the full battery. Synthetic measurements cover unbudgeted WIPE-sized/8 GiB peaks, explicit thresholds and graph/cache persistence. The integration test covers successful default/explicit-budget builds, repeated budget failures, dependent blocking, argument isolation and invalid budget rejection.

The prerequisite stack is merged, its main battery/install/native-runner gates passed, and the verified seed is published with checksum and provenance. This PR updates the lock and workflow pins and removes the obsolete field-copy accommodation. Logs: ~/.local/with-staging/rss-budget/out/logs-rss-seeded/. Ready for merge.

@ehartford
ehartford marked this pull request as ready for review September 25, 2026 04:39
@ehartford
ehartford merged commit 334739d into main Sep 25, 2026
@ehartford
ehartford deleted the build-rss-budget-scope branch September 25, 2026 05:06
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.

Restrict the compiler self-build RSS tripwire to compiler self-builds; ordinary application builds must not inherit it

1 participant