Skip to content

floor spawn_width: derive from spec breadth (parallelize CI batch-2, 1→7) - #5356

Merged
briansrls merged 5 commits into
mainfrom
session/warm-crane-135
Jun 20, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/warm-crane-135

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session warm-crane-135.
Pushing to session/warm-crane-135 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

briansrls and others added 2 commits June 20, 2026 00:52
…minating witness

Floor ran serially because the corpus WorkDemand hardcoded shard_count=1, so
spawn_width = min(1, threads) = 1. Now the floor plan derives breadth from the
single-authority spec (one unit per gate) and the fleet supplies the thread cap:
spawn_width = min(breadth, hardware_threads). Verified by execution: 1 -> 7.

Witnesses: spawn_width tracks breadth (the relationship), and floor-not-serial
(discriminating — reverting to a constant shard_count goes RED).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 20, 2026 00:55
@gunbai-bot gunbai-bot Bot changed the title CI is extremely flakey floor spawn_width: derive from spec breadth (parallelize CI batch-2, 1→7) Jun 20, 2026
claude-opus-4-7 review on #5356: the +1 fold is just length(). Verified
length resolves on gunbc_ci_spec.gates across the v2->dsl bridge and still
yields 7; witness stays green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@briansrls
briansrls force-pushed the session/warm-crane-135 branch from 9bf04d6 to 412206f Compare June 20, 2026 01:16
@briansrls
briansrls merged commit 028022c into main Jun 20, 2026
1 check passed
@briansrls
briansrls deleted the session/warm-crane-135 branch June 20, 2026 01:58
briansrls added a commit that referenced this pull request Jun 20, 2026
…) into Arc 1 branch to resolve serial-floor OOM
briansrls added a commit that referenced this pull request Jun 20, 2026
Rebased onto green main; bash_exit_code_lex phrase projection is upstream.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 20, 2026
… HEAD; main side == #5356 subset)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 20, 2026
…budget, not CPU only (#5375)

* WIP: CI is extremely flakey

* floor spawn_width: derive from spec breadth (no hand-tuning) + discriminating witness

Floor ran serially because the corpus WorkDemand hardcoded shard_count=1, so
spawn_width = min(1, threads) = 1. Now the floor plan derives breadth from the
single-authority spec (one unit per gate) and the fleet supplies the thread cap:
spawn_width = min(breadth, hardware_threads). Verified by execution: 1 -> 7.

Witnesses: spawn_width tracks breadth (the relationship), and floor-not-serial
(discriminating — reverting to a constant shard_count goes RED).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* review nit: use length(gates) instead of fold-count for breadth

claude-opus-4-7 review on #5356: the +1 fold is just length(). Verified
length resolves on gunbc_ci_spec.gates across the v2->dsl bridge and still
yields 7; witness stays green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: CI is extremely flakey

* WIP: CI is extremely flakey

* fix(ci-floor): memory-aware spawn_width — bound batch-2 fan-out by cgroup budget, not CPU only

placement_spawn_width was memory-blind (min of shard_count and hardware_threads).
At width=7 the batch-2 corpus resolves OOM-killed (exit 137) deterministically as the
corpus grows (eager-boar-790, 3 runs). Wire the already-modeled memory terms
(PlacementSupplyRow.ram_bytes + ResourceEnvelope.memory) into the width:
spawn_width = min(shard_count, hardware_threads, memory_budget / per_unit_peak).

Verified by execution: floor spawn_width 7 -> 4 (4x14GiB=56GiB <= 0.50x125GiB budget,
safe under srv1's ~65GiB cgroup cap); gunbc_ci_floor_spawn_fits_memory_budget -> true;
ci_floor_plan_witnesses -> true (adds witness_floor_width_fits_memory_budget +
witness_floor_width_memory_bounded, discriminating vs the memory-blind regression).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: resolve auto-committed merge conflict markers (take memory-aware HEAD; main side == #5356 subset)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Brian Searls <11205878+briansrls@users.noreply.github.com>
briansrls added a commit that referenced this pull request Jun 20, 2026
…errors (#5363)

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* Fix missing bash_lex_rule exposed by parse-resilient resolve.

Slice 5d exit-code lex rules call bash_lex_rule but the helper was never
defined; whole-tree discovery now reaches resolve and failed on bash.dag.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop out-of-scope bash_lex_rule hotfix from parse-resilience PR.

§3-correct lex authority fix lands separately on main (eager-boar-790);
keep #5363 scoped to front_end_sources only (compile.dag + stage0 seed + test).

Co-authored-by: Cursor <cursoragent@cursor.com>

* hotfix(bash): bash_exit_code_lex projects from a fixed-span phrase, not the undefined bash_lex_rule (main-red fix)

#5347 (slice 5d Exit) left `bash_exit_code_lex()` calling a `bash_lex_rule(...)`
constructor that is defined nowhere in the tree. The whole-tree CI floor resolves
every *_test.dag closure, so this dangling call failed `resolve` for
bash_emit_command_test.dag and turned main RED for every open PR (since #5347
merged at 01:12 UTC; pre-#5347 5c493fc was green).

Fix per §3 single authority (lexing.dag LexicalPhrase): the lex rule set PROJECTS
from the construct's FIXED-spelling spans via `phrase_to_lex_rules(p: phrase([...]))`,
exactly as the bound-token sibling `bash_env_prefixed_cargo_lex` does — NOT a direct
rule constructor (the "authored three times that could silently disagree" anti-pattern).
Only the `exit ` keyword is a fixed span; the exit code is an emit-time BOUND token
(^bash_token_exit_code via binding_spellings), so it contributes no literal lex rule —
preserving the original single-rule behavior bit-for-bit.

NOTE: this is a tighter fix than the two-span suggestion (incl. the code span) —
a LexicalPhrase is fixed-spelling-only by contract, so the bound code cannot be a
span; a literal span for it would over-generate a spurious rule. Confirmed with the
bash arc owner (warm-badger-46) who also cleared the colliding bash_lex_rule
constructor in #5363.

Verified by execution (prebuilt claim_batch, --source-root dsl --source-root src/v2):
  - bash_emit_command_test.dag now RESOLVES clean (43 modules, was resolve-FAIL)
  - bash_emit_command_accepts / bash_emit_bound_words: PASS
  - bash_emit_exit_code_{0,1}: PASS
  - bash_emit_exit_code_1_quoted_wrong_{ne_correct,model,rejects}: PASS (discriminating RED intact)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* test(#5363): discovery advisory classification + execution receipt.

Unit test pins is_discovery_corpus_blocking_diagnostic boundary (typecheck
advisory vs parse/resolve hard-fail). Ignored receipt proves 255 discovery
entry resolves green with advisory gate (0 failures).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* fix(#5363): scope advisory gate to discovery-only resolve entry points.

Thread ResolveTypecheckGate through resolve paths: Strict default on
resolve_entry_with_index / compile consumers; DiscoveryCorpusAdvisory only
via resolve_entry_with_index_for_discovery_corpus and discover_owned_data_decls.
Fixes compile error (CompilerDiagnostic import) from prior scope commit.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(#5363): drop bash.dag from PR — fix already on main (#5356).

Rebased onto green main; bash_exit_code_lex phrase projection is upstream.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* fix(#5363): satisfy clippy in parse-cache resilience test.

rust_monolith_gate runs cargo clippy --all-targets -D warnings; use
from_ref instead of cloned slice literal for build_multi_entry_index.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: front_end_sources PARSE-RESILIENCE root fix: a parse error in ONE file m

* fix(#5363): discovery advisory gate must retain typed graph in merged resolve.

resolved_graph_from_sources called compile_to_resolved, which nils graph on
any typecheck error even when DiscoveryCorpusAdvisory would demote them —
breaking discover_owned_data_decls. Thread the gate through a gated compile
path so advisory-only typecheck debt still returns a ResolvedGraph.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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