Repository navigation
Floor OOM (rustc-children half): isolate EmitHostGate from the wide discovery batch - #5837
Merged
Merged
Conversation
precompute_whole_tree_published_mock_keys Strict-resolved the entire 608-module dsl tree into one ResolvedGraph just to read 58 published-mock keys from the 13 modules that declare PublishedMockCase, then discarded the graph — §2 irrelevant work run unconditionally, and the per-shard floor runner's dominant RSS. Phase-peak RSS of claim_batch resolving one tiny witness: after build_multi_entry_index ......... 11 MB after precompute_whole_tree_... .... 1529 MB <- the whole jump after the witness resolve .......... 1535 MB Fix: select declarer modules (.contains prefilter is a safe over-inclusive candidate set — .dag has no comment syntax so the match is structural, and the downstream exact type_annotation_names check keeps it correct) and resolve only their transitive import closures. Result (same 58 keys; non-mock witness and all 9 lens_mock_totality published-mock consumers pass): precompute step ...... 1529 MB -> 37 MB per-shard peak RSS ... ~1.57 GiB -> ~0.18 GiB (8.7x, no cap/per_shard/hardware change) claim_batch is the per-shard runner whose [measurement] per-shard-peak-rss the floor's per_shard budget (the 2.1->2.5 GiB that drove the OOM saga) is calibrated from, so this lowers that budget at the root. Design + deferred representation work: docs/plans/resolved-graph-representation-minimization.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
html_markup_smoke_test.rs declared extdeps_root twice (identical); the first is shadowed/unused, failing the gate's -D warnings. Pre-existing on main (the v1 rust gate's first hard error). Remove the dead duplicate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-floor-precompute
…-floor-precompute
briansrls
added a commit
that referenced
this pull request
Jun 27, 2026
…s floor red (#5859) resolved-graph-representation-minimization.md and emit-host-batch-isolation.md (authored by calm-carp-204, archived) had zero inbound links, so they were orphan in the doc-reachability graph (roots = ROADMAP.md / DESIGN.md / runbooks). Both document LANDED root fixes — 7ce8231 (mock-key precompute scoped to declarers' closures, 8.7x) and #5837 (EmitHostGate batch isolation) — so they are keep, not delete. Link both from resource-aware-scheduler.md, which is root-reachable via ROADMAP.md and is their exact parent: they are the root-cause analyses behind the per_runnable_peak that scheduler consumes. Proven by execution (doc_graph_has_no_orphan_docs, clean origin/main tree): false (2 orphans) without the links, true (orphan_count == 0) with them. This is pre-existing main-red that #5855 unmasked by letting the floor run to completion, not a regression introduced here. Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
EmitHostGate spawns child cargo/rustc processes (~1.5 GiB) that the 8 GiB floor cgroup counts. But
ci_floor_planonly serialized gates wheregate_is_heavy_resolve == true(EmitHostGate => false), so emit-host shared the wide discovery batch and its rustc peak overlapped the ~2 GiB corpus shards → floor OOM (exit 137).Fix (§2/§3 decompose, not a third ad-hoc boolean)
gate_is_heavy_resolve(whole-tree resolve cost) andgate_spawns_host_compiler(rustc-children cost) are two grounded contributors to one concept:gate_serializes_against_corpus.floor_dependenciesnow serializes on the union, so EmitHostGate gets afloor_corpus_serializesedge and lands in a batch with no concurrent discovery shard. Discovery corpus still runs wide.Marked
Scaffolddissolving intostd.realization_schedule.Runnablecost (the resource-aware scheduler's per-Runnable space cost) — the boolean collapses tocost.space > thresholdonce that lands. (gentle-newt-542, the scheduler owner, is archived; no live fork.)Proof (green by execution)
ci_floor_plan_witnessespasses; addedwitness_emit_host_isolated_from_corpus+ a discriminating control (serialize-off co-locates emit+corpus). Perturbation-proven RED: reverting the predicate to baregate_is_heavy_resolveflips the test tofalse.Relationship to the rest of the floor-OOM work
This is the rustc-children half. The other half is Layer A (resolve env de-merge, tidy-wren-707). With this + #5836 (budget→real 8 GiB cap), the discovery shards alone are ~2.1 GiB so width=3 may fit under 8 GiB — to be confirmed by CI once #5836 lands.
Scope doc:
docs/plans/emit-host-batch-isolation.md🤖 Generated with Claude Code