Skip to content

Grow bash AST: EnvUnset node + multi-binding env nesting (dissolve orch_emit_run_env_welded) - #5846

Closed
gunbai-bot[bot] wants to merge 7 commits into
mainfrom
session/snappy-newt-85
Closed

gunbai-bot[bot] wants to merge 7 commits into
mainfrom
session/snappy-newt-85

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • EnvUnsetCmd node added to ShellStmt in dsl/extdeps/languages/bash/program.dag (renamed from EnvUnset to avoid collision with EnvBinding.EnvUnset from orchestration module), with serialize_stmt arm producing env -u NAME cmd
  • Bash grammar node bash_stmt_env_unset added to src/v2/extdeps/languages/bash.dag with env -u fixed prefix + bound name + bound command tokens
  • shell_emit dispatch arm added for EnvUnsetCmd in shell_emit.dag
  • Multi-binding via nesting modeled in src/v2/workflow/orch_env_lower.dag: lower_env_bindings folds FreeMonoid<EnvBinding> into nested EnvPrefixed/EnvUnsetCmd ShellStmt tree (no separate list-based node needed — nesting IS the composition)
  • Dissolution trigger updated on orch_run_env_reduction_dissolution_trigger naming the gated integration path: wire emit_shell_stmt(lower_env_bindings(r.env, RawLine { text: r.command })) in orch_emit_run after Ground String into realization: dissolve emit-kernel codepoint straddle (unblocks env-prefix/cmdsubst/concat emit welds post-#5828) #5841 lands, delete orch_emit_run_env_welded

Witnesses (green-by-execution)

  • stmt_env_unset_byte_identical_holds — EnvUnsetCmd emits env -u TMPDIR true byte-identical to oracle ✓
  • stmt_env_unset_has_teeth_holds — discriminating input (different name) ✓
  • stmt_env_multi_binding_byte_identical_holds — nested EnvPrefixed { EnvUnsetCmd { ... } } emits byte-identical ✓
  • stmt_env_multi_binding_has_teeth_holds — discriminating input (different value) ✓

Gated on #5841

orch_emit_run still calls orch_emit_run_env_welded for env-bearing Runs. The weld dissolution + orch_run_multi_binding_env_emits_correctly witness are gated on #5841 (String-grounding, emit-kernel straddle fix). The modeling is complete; wiring lands as a follow-on after #5841 merges.

Pre-existing failures (not caused by this PR)

  • contracts_sidecar_wired_into_emit_scope — fails on main HEAD before this branch
  • live_tree_has_no_orphan_docs — pre-existing orphan doc

🤖 Generated with Claude Code

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 26, 2026 19:23
briansrls added a commit that referenced this pull request Jun 26, 2026
My follow-on work-item duplicated snappy-newt-85's in-flight #5846,
which is the correct per-spec EnvUnset + multi-binding nesting and
dissolves orch_emit_run_env_welded outright. Point the trigger at the
single authority instead of the now-superseded duplicate work-item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 27, 2026
…le (unblocks env-prefix/cmdsubst/concat emit welds post-#5828) (#5841)

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* Wire orch env-weld follow-on work-item id into dissolution trigger

The bash-AST EnvUnset + multi-binding modeling gap (the residual blocker
after String grounding) is now tracked at node://adhoc-44b6225c-69f.
Carrier names its own follow-on (DESIGN §6 mark-on-carrier).

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

* Repoint env-weld dissolution trigger to gunbc#5846 (real authority)

My follow-on work-item duplicated snappy-newt-85's in-flight #5846,
which is the correct per-spec EnvUnset + multi-binding nesting and
dissolves orch_emit_run_env_welded outright. Point the trigger at the
single authority instead of the now-superseded duplicate work-item.

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

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* WIP: Ground String into realization: dissolve emit-kernel codepoint straddle

* Name .chars() Value::List straddle residual on-carrier (DESIGN §6, latent)

The Value::List exemption in the String-straddle wall is a ratchet with a
named hole: .chars() materializes a string as a Value::List of codepoint
Ints, indistinguishable at the Value level from a generic Int list. Latent
(no .dag program evaluates chars into a Str-concat; the two .chars() rows in
languages.dag/rust/emit.dag are emit templates). Dissolves when Char is
regrounded so a codepoint-sequence is distinguishable (grounding root, #5428).

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls and others added 2 commits June 27, 2026 02:25
…modeling both cleared)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tness

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #5868, which is the full superset (modeling + integration + dissolution of orch_emit_run_env_welded). Landing #5868 as the single clean PR per parent session's direction.

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