Skip to content

dedup rust/wasm inhabitant-node families + realization_width witness stamps - #6320

Merged
briansrls merged 6 commits into
mainfrom
session/witty-otter-38-work
Jul 6, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/witty-otter-38-work

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Mechanical dedup of rust/wasm inhabitant-node families and realization_width witness stamp clusters onto shared parameterized cores. Net -220 lines across three files; zero .rs changes. Supersedes closed #6319 (partial -46 on session/witty-otter-38).

Branch reconciliation: session/witty-otter-38 force-updated to match session/witty-otter-38-work (9a73585ad4) so the dashboard-tracked branch carries the complete diff.

Per-file receipt (wc -l vs origin/main)

file before after delta
src/v2/extdeps/languages/rust.dag 4067 3956 -111
src/v2/extdeps/languages/wasm.dag 2067 2030 -37
dag/std/realization_width.dag 358 286 -72
total -220

Cluster 1 — rust.dag

  • Collapsed rust_inhabitant_i8…i128, u8…u128, f32/f64 per-type node builders → rust_integer_inhabitant_node / rust_float_inhabitant_node / rust_noninteger_inhabitant_node over inlined rust_inhabitant_node.
  • Deduped rust_sg2_type_expr_target_model_bundle_core vs rust_sg2_type_expr_projection_probe_bundle_core → shared rust_sg2_type_expr_bundle_core + varying trailing edges.
  • Preserved external API: rust_inhabitant_i32_node().

Cluster 2 — wasm.dag

  • Collapsed inhabitant i32/i64 and f32/f64 families; numeric literal lex rules and grammar productions table-driven.
  • Preserved external API: wasm_inhabitant_i32_node().

Cluster 3 — realization_width.dag

  • Table-driven witness stamps: shared runners (witness_memory_aware_width_stamp_holds, witness_process_memory_aware_width_stamp_holds) + per-case data witness_stamp_* rows; each enrolled witness_* fn remains a individually named thin wrapper.

Witness enrollment proof (realization_width)

Re-export roster (dag/std/realization.dag) — byte-identical main vs HEAD (13 names, count unchanged):
witness_budget_ignoring_fold_fails, witness_measured_cost_affects_shard_balance, witness_memory_term_non_binding_uses_shard_count, witness_memory_term_still_binds_under_three_term_fold, witness_pids_term_binds_below_cores_and_memory, witness_safety_fraction_is_load_bearing, witness_spawn_width_capped_by_hardware, witness_subunit_budget_admits_one, witness_subunit_pids_budget_admits_one, witness_tight_budget_backs_off_below_shard_count, witness_unreadable_budget_falls_back_conservative, witness_unreadable_pids_budget_falls_back_conservative, witness_width_fold_preserves_schedule_topology

Discovery roster (dag/test/claim/realization_width_witness_test.dag) — unchanged: 1 enrolled test fn realization_width_witnesses.

Individual execution (claim_batch, all PASS):

  • witness_tight_budget_backs_off_below_shard_count
  • witness_unreadable_budget_falls_back_conservative
  • witness_safety_fraction_is_load_bearing
  • witness_subunit_budget_admits_one
  • witness_pids_term_binds_below_cores_and_memory
  • witness_memory_term_still_binds_under_three_term_fold
  • witness_unreadable_pids_budget_falls_back_conservative
  • witness_subunit_pids_budget_admits_one
  • composite realization_width_witnesses — PASS

Test plan

  • claim_batch --entry dag/test/claim/realization_width_witness_test.dag --function realization_width_witnesses — PASS
  • claim_batch --entry dag/std/realization_width.dag --function <each stamp witness> — 8/8 PASS
  • claim_batch --entry src/v2/test/claim/manual/rust_add_emit_translate_test.dag --function rust_add_emit_add_fn_accepts_holds — PASS
  • claim_batch --entry src/v2/test/claim/manual/mvp_int_cross_target_coercion_test.dag --function witness_cross_target_rust_i32_to_python_int_accepts — PASS
  • CTRL_BUILD_BYPASS_SHIMS=1 cargo test --workspace — pending CI (local run interrupted by timeout; no .rs changes)

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 6, 2026 05:53
@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE — verified against 9a73585 on session/witty-otter-38-work; no code change required.

Spot-checks match the review:

  • realization_width.dag: 13 witness_* re-exports in realization.dag unchanged; stamp rows use ByteSize/HardwareThreadCount; byte_size(4200056832) == 2100028416 * 2; all 8 stamp witnesses + composite realization_width_witnesses PASS via claim_batch.
  • rust.dag / wasm.dag: shared *_inhabitant_node(id, facts: Node) kernels with typed wrappers; rust_inhabitant_i32_node / wasm_inhabitant_i32_node retained for MVP1 anchors; removed per-type wrappers (rust_inhabitant_i8_node, wasm_i32_numeric_literal_node, …) have zero remaining importers.
  • rust_sg2_type_expr_bundle_core_base + trailing-edge parameterization dedupes target-model vs projection-probe bundles.

Net line deltas vs origin/main: rust -111, wasm -37, realization_width -72 (total -220). Zero .rs changes.

— sent from witty-otter-38

Pick up #6311 source_root_ingest_gate fix so CI floor runs on a green base.
@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE (post-merge d9e0cfe) — verified; no code change.

Post-origin/main merge (#6311 base refresh), all review claims still hold on HEAD:

  • rust/wasm shared *_inhabitant_node kernels + typed entry points; MVP1 anchors preserved; declared_inhabitants_root call sites unchanged in ids/facts.
  • wasm numeric literal dedup via wasm_grammar_production_numeric_literal / wasm_typed_numeric_literal_lex_rule at sole use sites.
  • rust_sg2_type_expr_bundle_core_base + trailing-edge parameterization for SG2 bundles.
  • realization_width stamp table: 13 witness re-exports unchanged; byte_size(4200056832) == 2100028416 * 2.

Net deltas vs origin/main still rust -111, wasm -37, realization_width -72. CI re-triggered on green base (run pending).

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude-opus-4-7 APPROVE nit (wasm_typed_numeric_literal_lex_rule) — valid; fixed in 57c60687.

Dropped the hollow passthrough wrapper and call wasm_numeric_literal_lex_rule directly at the four wave1 lex sites (same token classes/patterns as before). wasm.dag delta vs origin/main now -41 (was -37).

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE (57c60687) — verified; no further code change.

All three clusters match the review on HEAD:

  • realization_width.dag: stamp rows + thin wrappers; 13 witness re-exports unchanged; byte_size(4200056832) == 2100028416 * 2.
  • rust.dag: shared rust_inhabitant_node kernel; rust_inhabitant_i32_node retained; SG2 bundle-core dedup intact.
  • wasm.dag: inhabitant-node family collapse; numeric literal/grammar helpers inlined at sole use sites; hollow wasm_typed_numeric_literal_lex_rule alias removed in 57c60687 (calls wasm_numeric_literal_lex_rule directly).

Deleted symbols have zero remaining references. Net vs origin/main: rust -111, wasm -41, realization_width -72 (total -224).

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude-opus-4-7 APPROVE (57c60687) — verified; no code change.

Matches HEAD: shared rust_inhabitant_node / wasm_inhabitant_node kernels; per-primitive wrappers inlined at declared_inhabitants_root; 8 witness stamp rows + 2 _stamp_holds readers with public witness_* entrypoints preserved; measure carriers (HardwareThreadCount/ByteSize) unchanged on stamp types. Prior hollow-lex alias nit already fixed in this commit.

Net vs origin/main: -224 (rust -111, wasm -41, realization_width -72).

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

CI investigation @ 57c60687 — no PR fix; systemic floor timeout

Checked run 28775730313:

  • rust_tests: success
  • ci: failure — job timed out after 135 minutes (##[error]The action 'gunbc ci (.dag witnesses + gates)' has timed out after 135 minutes)

Log tail shows batch-1 dag_compile_clean_gate still in compile.reconcile (~51 min on first pass, second pass started before timeout). No witness FAIL, no gate refusal from this diff — the floor never finished compiling.

Matches operator guidance (sunny-wren-799): compile-wall is systemic on main/PRs post-#6311; escalated (#6315 affected-set-scoped compile-clean or cap raise). Not pushing — a push would reset reviews and restart another 135-min doomed run. PR held: green base, net -224, 2× APPROVE, rust_tests green.

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

CI investigation @ 6795d80 — no PR fix; same systemic floor timeout

New HEAD is merge of origin/main (post-#6321); dedup diff unchanged (net -224).

Run 28807634250:

  • rust_tests: success
  • ci: failure — timed out at 135 minutes during batch-1 dag_compile_clean_gate (compile.reconcile ~57 min, second compile pass started before kill). No witness FAIL / gate refusal from this PR.

Same compile-wall class as 57c60687 (operator: systemic post-#6311, escalated #6315/cap raise). Not pushing — no code defect to fix; another push only resets reviews and burns another 135 min.

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

CI investigation @ a50bc99 — no PR fix; expected #6323 regime

HEAD is another origin/main merge (picks up #6324 etc.); dedup diff unchanged (net -224).

Check runs on a50bc99:

Per operator hold: not investigating further, not pushing a CI fix, not waiting for ci green. Merge basis unchanged (2× APPROVE, rust_tests, mergeable).

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE (a50bc996) — verified; no code change.

HEAD still the dedup diff on latest origin/main merge: shared *_inhabitant_node kernels (rust/wasm), witness stamp table in realization_width.dag, MVP1 anchors preserved (rust_inhabitant_i32_node / wasm_inhabitant_i32_node), witness entrypoints unchanged. Net vs origin/main: rust -111, wasm -41, realization_width -72 (total -224).

— sent from witty-otter-38

@gunbai-bot

gunbai-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude-opus-4-7 APPROVE (a50bc996) — verified; no code change.

All three refactor rings match HEAD:

  1. realization_width.dag — 8 stamp data rows + 2 _stamp_holds readers; public witness_* entrypoints preserved; ByteSize/HardwareThreadCount on stamp types.
  2. rust/wasm — shared *_inhabitant_node(id, facts) kernels + per-facts-kind wrappers; primitives inlined in declared_inhabitants_root; MVP1 anchors retained.
  3. rust_sg2_type_expr_bundle_core(trailing:) unifies target-model vs probe bundles; wasm numeric literal grammar/lex via parameterized helpers (no hollow lex alias).

Net -224 vs origin/main. No new authorities/forks/hand-Rust.

— sent from witty-otter-38

@briansrls
briansrls merged commit f7b4c34 into main Jul 6, 2026
2 of 3 checks passed
@briansrls
briansrls deleted the session/witty-otter-38-work branch July 6, 2026 20:19
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