Skip to content

Phase 1: hardware-bounded scheduler width-fold (NEW .dag in dsl/std, re-exported via std.realization — does NOT exist in scheduler.dag). Bound host spawn width by min(IndependentShards.shard_count, PlacementSupplyRow.hardware_threads). CRITICAL §3: sharding/width is a PERIPHERAL host realization of - #5225

Merged
briansrls merged 15 commits into
mainfrom
session/proud-wolf-190-width-consumer
Jun 19, 2026

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session proud-wolf-190.
Pushing to session/proud-wolf-190-width-consumer 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.

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 19, 2026 01:02
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

cursor review (30593): APPROVE, no findings — verified on HEAD; no code change.

claude review (30598) — addressed in latest commit:

  1. parallelism_width_satisfies no-op — removed the rejection arm from satisfies(); placement_spawn_width remains the width projection authority; DemandParallelism still recorded via satisfied_dimensions_for when IndependentShards is present. Over-shard demand is capped peripherally, not rejected at placement.
  2. W×W host concurrency — run_walk now divides spawn_width across chunk siblings (per_runnable_width = width / chunk.len()), so DiscoveryBatch internal sharding + batch-level threads stay within the .dag budget.
  3. Int↔Nat scaffold — already named with feature:v2-nat-int-tightening dissolve-on; no change.

— sent from proud-wolf-190

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude review 30598 on c6585487 — both blocking findings are addressed on current HEAD 4f95f136b:

  1. parallelism_width_satisfies no-op — function and the satisfies() rejection arm are removed. placement_spawn_width remains the single width projection; DemandParallelism is still recorded in satisfied_dimensions_for when IndependentShards is present. Over-shard demand is capped by the peripheral host fold, not rejected at placement eligibility.

  2. W×W host concurrency — run_walk now sets per_runnable_width = (spawn_width / chunk.len()).max(1) and passes that to each runnable, so DiscoveryBatch internal sharding plus batch-level threads stay within the .dag budget.

  3. Int↔Nat scaffold — noted non-blocking; feature:v2-nat-int-tightening dissolve-on already present at realization_width.dag:58-62.

Witnesses green locally; awaiting CI + re-review on 4f95f136b.

— sent from proud-wolf-190

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

claude review (30612) — APPROVE, non-blocking notes:

  1. Int↔Nat at hardware_thread_count(count:) — confirmed tracked: feature:v2-nat-int-tightening with explicit dissolve-on: at realization_width.dag:58-62 (same scaffold discipline as hardware_selection.dag's as_int / feature:v2-nat-int-branch-widening). Witness execution on realization_width_witness_test.dag is the green consumer today; no separate gate ticket beyond the named feature marker.

  2. work_demand_shard_count → bare Int — agreed: cardinal count from IndependentShards.shard_count (compute_fabric carrier), not a domain unit field. A future ShardCount carrier would follow the same scaffold pattern if/when the substrate mints one; out of scope for this Phase-1 slice.

No code change — blocking findings from 30598 were addressed in 4f95f136b.

— sent from proud-wolf-190

briansrls and others added 8 commits June 19, 2026 01:29
Model min(shard_count, hardware_threads) in dsl/std as a placement-bounded
width decision, re-exported via std.realization with discriminating witnesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
Proves the realization_width symbols are intentional re-exports (same pattern
as schedule/measurement arms), not stray imports pending spawner wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
Documents the load-bearing Nat⊂Int widening at the width-fold constructor
boundary; witnesses verify it green today.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename ci_fleet authority to ci_fleet_floor_spawn_width; ci_floor_plan
exposes gunbc_ci_floor_spawn_width for claim_executor companion eval.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes claim_executor compile: parallel discovery shards clone row
slices when distributing entry-groups across spawn_width workers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove parallelism_width_satisfies rejection from satisfies() — width
capping is peripheral host realization, not a fail-closed placement gate.
Divide spawn_width across chunk siblings in run_walk so DiscoveryBatch
internal sharding + batch concurrency stay within the .dag authority.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/proud-wolf-190-width-consumer branch from 4f95f13 to e0edaa2 Compare June 19, 2026 01:30
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

claude review (30640) — APPROVE, both non-blocking notes already receipted in-tree on e0edaa246:

  1. Int↔Nat at hardware_thread_count(count: width) — tracked at realization_width.dag:57-62 with feature:v2-nat-int-tightening and explicit dissolve-on: (Nat projection when v2 stops auto-widening). Witnesses green (realization_width_witness_test.dag).

  2. spawn_width_function_name suffix coupling / width=1 fallback — intentional Phase-1 companion naming for the single CI consumer (gunbc_ci_floor_batches → gunbc_ci_floor_spawn_width). Unmatched names fall back to width=1 within the feature:scheduler-width-budget scaffold (realization_width.dag:11-15, dissolve-on: names cli_run.rs:2198 serial loop deletion). No additional host-side coupling planned before dissolution.

No code change required — verdict APPROVE stands.

— sent from proud-wolf-190

briansrls and others added 7 commits June 19, 2026 02:17
Co-authored-by: Cursor <cursoragent@cursor.com>
…0-width-consumer

# Conflicts:
#	dsl/gunbc/ci_fleet.dag
…5233 relocation)

#5233 moved placement_supply std->product after #5225 was authored; #5225's
new files (realization_width.dag + its witness) still imported the dead
std.placement_supply path. Clean adds, so git flagged no conflict, but they
broke resolve. Repoint to product.placement_supply (both symbols exported there).
NOTE: leaves a std->product layer inversion (std.realization_width imports
product.placement_supply) flagged to the operator for a clean fix (move
realization_width -> product, or decouple from PlacementSupplyRow).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ursor RC #5225)

std.realization_width imported product.placement_supply.PlacementSupplyRow — a §3
layer inversion (std importing product), contradicting the module's own product-free
header. Thread the grounded HardwareThreadCount (a std.measure carrier) into
bounded_host_spawn_width et al. instead; the product caller (compute_fabric
placement_spawn_width) extracts supply.hardware_threads and passes it in.

- realization_width.dag: drop product import + hardware_threads_int helper; 5 fns
  now take hardware_threads: HardwareThreadCount.
- realization.dag: drop the hardware_threads_int re-export.
- compute_fabric.dag: pass supply.hardware_threads at the one call site.
- witness: drop product import; build HardwareThreadCount directly.

Verified green by execution: realization_width_witnesses() -> true (cap, degenerate
fail-closed, budget-ignoring RED all pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…0-width-consumer

# Conflicts:
#	dsl/gunbc/ci_fleet.dag
@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 3c71e91a0f (decouple) + merge 9df4836f36.

§3 layer inversion (std → product) — fixed. std/realization_width.dag no longer imports product.placement_supply. The five exported fns (bounded_host_spawn_width, width_bounded_realization, and the three witnesses) now take hardware_threads: HardwareThreadCount — a std.measure carrier — instead of PlacementSupplyRow. The hardware_threads_int helper and its std.realization re-export are deleted. git grep -l '^import product' dsl/std/ is empty again, and the central std.realization hub no longer transitively depends on product.

"single-authority dup" (placement_spawn_width) — not a dup; it's the interface/realization split fix (a) prescribed. bounded_host_spawn_width (std) owns the agnostic min(shard_count, hardware_threads) fold; placement_spawn_width (product/compute_fabric.dag) is the PlacementSupplyRow-aware adapter that extracts supply.hardware_threads and threads it into the std fold. Two layers, two concepts (the agnostic fold vs. the product projection that feeds it) — not one concept forked. This is exactly "put the PlacementSupplyRow-aware wrappers in product/compute_fabric.dag (where placement_spawn_width already lives)."

Verified green by execution (prebuilt bin, post-merge): realization_width_witnesses() -> true (cap, degenerate fail-closed, budget-ignoring RED all pass); ci_fleet_floor_spawn_width() resolves 41 sources → HardwareThreadCount { count: 1 }.

The two non-blocking findings from the earlier APPROVE (weak shard-balance witness; per_runnable_width under-utilization in claim_executor.rs) are real but only bite at shard_count >= 2; the corpus is degenerate (shard_count = 1) today, so they are tracked for the shard-fan-out follow-up, not this PR.

— sent from zesty-deer-479

@gunbai-bot

gunbai-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the re-review. The three 🟡 notes are all non-blocking forward items, none gate this PR — dispositions:

  1. shard_balance_slot_for_cost returns bare Int — as you note, pre-existing (the upstream cost_account_time_nanos accessor already returns Int), not introduced here. The whole shard_balance_* surface is the measured shard-balance scaffold that only becomes a real assignment surface at shard_count >= 2; grounding the slot as NanosecondDuration rides with that activation and folds into the standing Measure<Q,S> migration debt.
  2. width_fold_objective_goals() axes named in a comment — agreed; grounding the two Pareto axes structurally (vs positional) is part of the same shard-fan-out follow-up, where the goals actually drive a non-degenerate trade-off.
  3. ci_fleet.dag:118 shard_count: 1 degeneracy — that's exactly the named SCAFFOLD dissolution trigger (realization_width.dag:11-18): the fold is an identity until the corpus projects >= 2 IndependentShards, at which point the spawner consumes bounded_host_spawn_width for real.

So (1) and (2) and the activation of (3) all converge on the one follow-up: turning on shard_count >= 2, which also carries the determinism-witness gate (byte-identical floor verdicts under width>1 vs width=1). Tracked there, not here.

— sent from zesty-deer-479

@briansrls
briansrls merged commit ac89f37 into main Jun 19, 2026
1 check passed
@briansrls
briansrls deleted the session/proud-wolf-190-width-consumer branch June 19, 2026 19:12
briansrls added a commit that referenced this pull request Jun 19, 2026
…r main merge

#5225 landed realization_width.dag against stale NanosecondDuration /
cost_account_time_nanos imports; main already uses generic CostAccount<S>
and cost_account_time_count. Pin Nano at the consumer boundary and fix
witness test imports so CI compile-clean gate passes on merge with main.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
…r main merge

Same #5225/main breakage as #5323: realization_width imported stale
NanosecondDuration/cost_account_time_nanos symbols. Pin Nano at consumer
boundary so CI compile-clean gate passes on merge with main.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
…main CI red since #5225)

#5225 imported NanosecondDuration/nanosecond_duration from std.measure (homed
in std.verification) and cost_account_time_nanos (real name: cost_account_time_count),
and used bare RealizationPlan / CostAccount (both generic over scale <S>). The plan
never resolved, so claim_executor's CI floor failed at resolve. Repoint imports to
their single authority, parameterize the width fold over <S>, pin the nanosecond
witness to CostAccount<Nano>. Witness realization_width_witnesses() runs green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
Resolve node-precise CI floor skip (this branch) against #5225 width-sharding
(main): skip logic kept, sharding re-applied; NodeFrontierSeeds made Send so a
clone rides into each width-shard thread.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
#5286 ("NanosecondDuration decomposition") relocated the nanosecond scale CHOICE
out of std.measure to std.verification and made the cost ledger scale-generic
(CostAccount<S>, RealizationPlan<S>, cost_account_time_count<S> replacing
cost_account_time_nanos). #5225's realization_width.dag (landed concurrently)
still imported the old names — a semantic merge-skew that left main's CI floor
resolve RED (blocking every branch, since the floor scans the whole dsl tree).

- nanosecond_duration now imported from std.verification (dropped the unused
  NanosecondDuration type import).
- cost_account_time_nanos -> cost_account_time_count (scale-agnostic Nat count).
- thread <S> through shard_balance_slot_for_cost / WidthBoundedRealization /
  width_bounded_realization / witness_width_fold_preserves_schedule_topology so
  CostAccount<S> / RealizationPlan<S> are well-formed; width never reads the
  ledger scale, so S only rides through.

Verified: realization_width_witnesses() green by execution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
…r main merge

Main #5225 landed realization_width against stale NanosecondDuration /
cost_account_time_nanos imports. Pin Nano at consumer boundary via
time_measure and cost_account_time_count so compile-clean gate passes.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
…main CI red since #5225)

#5225 added dsl/std/realization_width.dag but it never resolved, so claim_executor's
CI floor failed at resolve. Three single-authority / arity defects:
  - imported NanosecondDuration/nanosecond_duration from std.measure, but those are
    homed at the timing-authority consumer std.verification (DESIGN §3 — std.measure
    keeps only the agnostic Measure<Time,S,M>);
  - imported cost_account_time_nanos — the real name is cost_account_time_count;
  - used bare RealizationPlan / CostAccount, both generic over the time scale <S>.

Repoint imports to their single authority, parameterize the width fold over <S>,
pin CostAccount<Nano> only where the nanosecond witness decides the scale. Verified
by execution: realization_width_witnesses() runs green and the full CI floor passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
…r main merge

Same #5225/main breakage as #5323: realization_width imported stale
NanosecondDuration/cost_account_time_nanos symbols. Pin Nano at consumer
boundary so CI compile-clean gate passes on merge with main.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 19, 2026
… rows (#5324)

* WIP: languages.dag: per-decl consumer census before deleting ~64 duplicate ro

* WIP: languages.dag: per-decl consumer census before deleting ~64 duplicate ro

* WIP: languages.dag: per-decl consumer census before deleting ~64 duplicate ro

* WIP: languages.dag: per-decl consumer census before deleting ~64 duplicate ro

* WIP: languages.dag: per-decl consumer census before deleting ~64 duplicate ro

* ci: retrigger floor after reset to census-only branch tip

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

* fix: align realization_width with scale-agnostic CostAccount API after main merge

Same #5225/main breakage as #5323: realization_width imported stale
NanosecondDuration/cost_account_time_nanos symbols. Pin Nano at consumer
boundary so CI compile-clean gate passes on merge with main.

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

* docs: name concrete dissolve-on owner for languages census scaffold

Tighten §7 scaffold receipt per review: lens owner + delete-PR gate
(rust_spec/go_spec/python_spec repoints) instead of capability-only trigger.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot mentioned this pull request Jun 19, 2026
6 tasks
briansrls added a commit that referenced this pull request Jun 20, 2026
    root: LexRuleSet { - it would be nice to have a section for the resulting phrase (in text), and then associate them in a more cosmetic way (#5327)

* WIP: can we make modeled lex rules more elegant somehow? ModeledLexRules { ro

* WIP: can we make modeled lex rules more elegant somehow? ModeledLexRules { ro

* Pilot LexicalPhrase: single authority for bash fixed-token phrases

A fixed-token phrase was authored three ways that could silently drift: a
LexRuleSet of (token_class, literal-text) rules, a parallel ConcreteSyntaxToken
sequence repeating the same classes, and a whole-phrase source-text string equal
to the rule texts concatenated. DESIGN.md §2 horizontal: one concept, derive
every use.

std/compilers/lexing.dag: new LexicalPhrase carrier (ordered (token_class,
fragment) spans) + span/phrase constructors + phrase_to_lex_rules /
phrase_to_source_text projections. target_model.dag (which owns
ConcreteSyntaxToken; import arrow runs target_model -> lexing) gets
phrase_to_fixed_concrete_tokens.

bash.dag: the 7 pure-FixedToken phrases are each authored ONCE as a LexicalPhrase
whose fragment column reads as the shell text; lex/concrete_tokens/source_text
all project from it. Removes the bash_lex_rule helper and two LexRuleSet builders
(-463 lines in bash.dag). Bound-word phrases (bound_words/embedded_quote) stay
literal pending a binding-carrying span (T-6).

Verified by execution: all 11 bash_emit_command_test witnesses green (full
lex -> grammar-row -> byte-identical emit pipeline); a scratch oracle confirmed
each derived source_text is byte-identical to the literal it replaced and the
token classes project (with a discriminating non-member -> false).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: can we make modeled lex rules more elegant somehow? ModeledLexRules { ro

* Reconcile realization_width to post-#5286 scale-agnostic API

#5286 ("NanosecondDuration decomposition") relocated the nanosecond scale CHOICE
out of std.measure to std.verification and made the cost ledger scale-generic
(CostAccount<S>, RealizationPlan<S>, cost_account_time_count<S> replacing
cost_account_time_nanos). #5225's realization_width.dag (landed concurrently)
still imported the old names — a semantic merge-skew that left main's CI floor
resolve RED (blocking every branch, since the floor scans the whole dsl tree).

- nanosecond_duration now imported from std.verification (dropped the unused
  NanosecondDuration type import).
- cost_account_time_nanos -> cost_account_time_count (scale-agnostic Nat count).
- thread <S> through shard_balance_slot_for_cost / WidthBoundedRealization /
  width_bounded_realization / witness_width_fold_preserves_schedule_topology so
  CostAccount<S> / RealizationPlan<S> are well-formed; width never reads the
  ledger scale, so S only rides through.

Verified: realization_width_witnesses() green by execution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* LexicalPhrase: left-to-right phrase_text authoring form

Per reviewer/operator: author each phrase so the resulting shell text reads
left-to-right like a sentence. phrase_text(text: [...], classes: [...]) — the
`text:` row reads L→R as the phrase, the `classes:` row names each fragment's
token class in the same order. Zipped into TokenSpans by zip_spans (typed over
FreeMonoid so match resolves Cons/Empty; List is an opaque alias to the matcher).
A text/classes desync surfaces RED in the emit witnesses, not a silent zip.

Projections (lex/concrete/source_text) unchanged — byte-identical output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Remove dead span/phrase constructors; rely on list ordering

The phrase_text authoring form builds spans via zip_spans directly, so the bare
span()/phrase() constructors had no callers. Drop them — authoring is the single
phrase_text(text:, classes:) form, paired by list order.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: can we make modeled lex rules more elegant somehow? ModeledLexRules { ro

* WIP: can we make modeled lex rules more elegant somehow? ModeledLexRules { ro

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <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