Repository navigation
build: restrict the RSS tripwire to explicit target budgets (#1665) - #1666
Conversation
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.
f766251 to
2741bf3
Compare
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.
|
Verified 1f27736 under the pinned seed nightly-20260925-local-1-8d3cc360cf23, with a cold C-import cache.
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: |
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, andout/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.