From 059f76a1e8039f979165726ba61b3f15015eb170 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 14 Jul 2026 03:41:13 +0000 Subject: [PATCH 1/3] =?UTF-8?q?WIP:=20Shell=E2=86=92dag=20P2b=20consumer?= =?UTF-8?q?=20slice=20(successor=20to=20archived=20bold-pike-629;=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dag/gunbc/fleet_converge_emit.dag | 119 ++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 6 deletions(-) diff --git a/dag/gunbc/fleet_converge_emit.dag b/dag/gunbc/fleet_converge_emit.dag index 6351da7047e..aba1427cf34 100644 --- a/dag/gunbc/fleet_converge_emit.dag +++ b/dag/gunbc/fleet_converge_emit.dag @@ -37,6 +37,17 @@ import gunbc.host_converge { dag_root_binding_path, fleet_converge_policy, } +import v2.std.orchestration { + PipelineStep, + Let, + Call, + ExprLit, + ExprCmdSubst +} +import v2.std.collection { Optional } +import v2.std.diagnostic { Accepted, Rejected } +import v2.compiler.emit_orchestration { orch_emit_step } +import v2.extdeps.languages.bash_orchestration_emit { bash_orchestration_emit_medium } data fleet_converge_protocol: LayoutProtocol = LayoutProtocol { indent_unit: "" } @@ -54,6 +65,93 @@ fn sh_cmd(cmd: String, args: List) -> String { fold(args, init: cmd, f: (acc, p) => concat(concat(acc, " "), sh_arg(s: p))) } +data fresh_standup_bootstrap_emit_refused_poison: String = "__GUNBC_ORCH_EMIT_REFUSED__ fresh-standup bootstrap intent emission was rejected by v2.compiler.emit_orchestration; this marker is not valid fleet-converge shell, so the committed .github/fleet-converge.sh drift gate goes red rather than a hand-spelled fallback masking the refusal (DESIGN §5: refuse, never widen)\n" + +fn fresh_standup_bootstrap_emit_step(s: PipelineStep) -> String { + match orch_emit_step(s: s, medium: bash_orchestration_emit_medium()) { + Accepted { value: source, diagnostics: d } => + match d { + None => source.carried + Some { diagnostics: _ } => fresh_standup_bootstrap_emit_refused_poison + } + Rejected { diagnostics: _ } => fresh_standup_bootstrap_emit_refused_poison + } +} + +fn fresh_standup_dag_pin_cmdsubst_intent() -> PipelineStep { + Let { + name: "dag_pin", + value: ExprCmdSubst { + callee: "converge_read_gunbc_host_pin", + args: ["\"$checkout\""] + } + } +} + +fn fresh_standup_dag_pin_cmdsubst_line() -> String { + concat(" ", fresh_standup_bootstrap_emit_step(s: fresh_standup_dag_pin_cmdsubst_intent())) +} + +fn fresh_standup_dag_pin_empty_intent() -> PipelineStep { + Let { name: "dag_pin", value: ExprLit { spelling: "\"\"" } } +} + +fn fresh_standup_dag_pin_else_line() -> String { + concat( + " else ", + concat(fresh_standup_bootstrap_emit_step(s: fresh_standup_dag_pin_empty_intent()), "; fi") + ) +} + +fn fresh_standup_effective_absent_intent() -> PipelineStep { + Let { name: "effective", value: ExprLit { spelling: "ABSENT" } } +} + +fn fresh_standup_verdict_absent_intent() -> PipelineStep { + Let { name: "verdict", value: ExprLit { spelling: "absent" } } +} + +fn fresh_standup_then_branch_line() -> String { + concat( + fresh_standup_bootstrap_emit_step(s: fresh_standup_effective_absent_intent()), + concat( + "; ", + fresh_standup_bootstrap_emit_step(s: fresh_standup_verdict_absent_intent()) + ) + ) +} + +fn fresh_standup_decide_verdict_call_intent() -> PipelineStep { + Call { + callee: "decide_verdict", + args: ["\"$dag_pin\"", "\"$desired_pin\""] + } +} + +fn fresh_standup_effective_dag_pin_intent() -> PipelineStep { + Let { name: "effective", value: ExprLit { spelling: "\"$dag_pin\"" } } +} + +fn fresh_standup_else_branch_line() -> String { + concat( + fresh_standup_bootstrap_emit_step(s: fresh_standup_decide_verdict_call_intent()), + concat( + "; ", + fresh_standup_bootstrap_emit_step(s: fresh_standup_effective_dag_pin_intent()) + ) + ) +} + +fn fresh_standup_verdict_gate_line() -> String { + concat( + " if [ -z \"$dag_pin\" ]; then ", + concat( + fresh_standup_then_branch_line(), + concat("; else ", concat(fresh_standup_else_branch_line(), "; fi")) + ) + ) +} + fn converge_script_header() -> Doc { doc_concat(parts: map([ "#!/usr/bin/env bash", @@ -303,8 +401,8 @@ fn converge_script_header() -> Doc { " if [ -d \"$checkout/.git\" ]; then", " (cd \"$checkout\" && git fetch --prune origin >/dev/null 2>&1) || true", " (cd \"$checkout\" && git checkout --detach \"$ctrl_pin\" >/dev/null 2>&1) || true", - " dag_pin=\"$(converge_read_gunbc_host_pin \"$checkout\")\"", - " else dag_pin=\"\"; fi", + fresh_standup_dag_pin_cmdsubst_line(), + fresh_standup_dag_pin_else_line(), " mkdir -p \"$7\"", " if [ ! -x \"$7/${13}\" ]; then", " echo \"binary pull ${11}@sha:$ctrl_pin into $7 (steady-state CAS/ghcr transport keyed by derived pin)\" >&2", @@ -314,7 +412,7 @@ fn converge_script_header() -> Doc { " fi", " fi", " if [ -x \"$7/${13}\" ]; then export \"$6=$7\"; fi", - " if [ -z \"$dag_pin\" ]; then effective=ABSENT; verdict=absent; else decide_verdict \"$dag_pin\" \"$desired_pin\"; effective=\"$dag_pin\"; fi", + fresh_standup_verdict_gate_line(), " emit_receipt \"$1\" \"$2\" \"$3\" \"$desired_pin\" \"$effective\" \"$verdict\"", " record \"$verdict\"", "}", @@ -466,18 +564,27 @@ data fleet_converge_steady_state_doc_projection_dissolution_trigger: Disposition data fleet_converge_fresh_standup_bootstrap_emit_frontier: List = [ FleetConvergeEmitFrontierRow { construct: "orch_construct_procedure", - site: "converge_gunbc_pinned_tree fresh_standup: decide_verdict/converge_read_gunbc_host_pin shell function calls" + site: "converge_gunbc_pinned_tree fresh_standup: decide_verdict/converge_read_gunbc_host_pin shell function calls — CONSUMED by fresh_standup_bootstrap_emit_step (P2b)" }, FleetConvergeEmitFrontierRow { construct: "orch_construct_cmdsubst_assign", - site: "converge_gunbc_pinned_tree fresh_standup: dag_pin=$(converge_read_gunbc_host_pin ...) cmdsubst assignment" + site: "converge_gunbc_pinned_tree fresh_standup: dag_pin=$(converge_read_gunbc_host_pin ...) cmdsubst assignment — CONSUMED by fresh_standup_dag_pin_cmdsubst_line (P2b)" }, FleetConvergeEmitFrontierRow { construct: "orch_construct_let_assign", - site: "converge_gunbc_pinned_tree fresh_standup: verdict=/effective=/export shell assignments" + site: "converge_gunbc_pinned_tree fresh_standup: verdict=/effective=/export shell assignments — CONSUMED by fresh_standup_*_intent rows (P2b; export line remains literal until modeled)" } ] +data fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger: Disposition = Scaffold { + dissolves_to: RealizationDispatch, + bind: DeclarationRef { + module_path: "gunbc.fleet_converge_emit", + decl_name: "converge_script_header", + field: WholeDeclaration + } +} + fn fleet_converge_fresh_standup_bootstrap_emit_frontier_count() -> Int { list_length(items: fleet_converge_fresh_standup_bootstrap_emit_frontier) } From ba4512308fa6051f66b744ad0b60cbcc913fccde Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 14 Jul 2026 03:51:44 +0000 Subject: [PATCH 2/3] =?UTF-8?q?WIP:=20Shell=E2=86=92dag=20P2b=20consumer?= =?UTF-8?q?=20slice=20(successor=20to=20archived=20bold-pike-629;=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dag/gunbc/fleet_converge_emit.dag | 1 - dag/test/claim/fleet_converge_emit_test.dag | 22 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dag/gunbc/fleet_converge_emit.dag b/dag/gunbc/fleet_converge_emit.dag index aba1427cf34..5d6f59d387c 100644 --- a/dag/gunbc/fleet_converge_emit.dag +++ b/dag/gunbc/fleet_converge_emit.dag @@ -44,7 +44,6 @@ import v2.std.orchestration { ExprLit, ExprCmdSubst } -import v2.std.collection { Optional } import v2.std.diagnostic { Accepted, Rejected } import v2.compiler.emit_orchestration { orch_emit_step } import v2.extdeps.languages.bash_orchestration_emit { bash_orchestration_emit_medium } diff --git a/dag/test/claim/fleet_converge_emit_test.dag b/dag/test/claim/fleet_converge_emit_test.dag index 8b60d8b709a..c3d926cc5fe 100644 --- a/dag/test/claim/fleet_converge_emit_test.dag +++ b/dag/test/claim/fleet_converge_emit_test.dag @@ -67,6 +67,11 @@ import gunbc.fleet_converge_emit { fleet_converge_drifted, fleet_converge_steady_state_doc_projection_dissolution_trigger, fleet_converge_fresh_standup_bootstrap_emit_frontier_count, + fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger, + fresh_standup_bootstrap_emit_refused_poison, + fresh_standup_dag_pin_cmdsubst_line, + fresh_standup_dag_pin_else_line, + fresh_standup_verdict_gate_line, } import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } @@ -312,6 +317,21 @@ fn witness_sessions_membership_line_emitted() -> Bool { && has(s: sh, p: "ls -d \"$2\"/docker-*.scope 2>/dev/null | wc -l | tr -d ' ' || true") } +fn witness_fresh_standup_bootstrap_emit_bytes_hold() -> Bool { + let sh = expected_fleet_converge_sh() + has(s: sh, p: fresh_standup_dag_pin_cmdsubst_line()) + && has(s: sh, p: fresh_standup_dag_pin_else_line()) + && has(s: sh, p: fresh_standup_verdict_gate_line()) + && !has(s: sh, p: fresh_standup_bootstrap_emit_refused_poison) +} + +fn witness_fresh_standup_bootstrap_emit_dissolution_scaffold() -> Bool { + match fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger { + Scaffold { dissolves_to: _, bind: _ } => true + Terminal { reason: _ } => false + } +} + test fn fleet_converge_emit_holds() -> Bool { witness_live_converge_is_conservation_sound() && witness_drift_red_receipt() @@ -329,6 +349,8 @@ test fn fleet_converge_emit_holds() -> Bool { && witness_gunbc_apply_mode_srv3_fresh_standup() && witness_gunbc_pinned_tree_runs_first() && witness_sessions_membership_line_emitted() + && witness_fresh_standup_bootstrap_emit_bytes_hold() + && witness_fresh_standup_bootstrap_emit_dissolution_scaffold() && fleet_converge_fresh_standup_bootstrap_emit_frontier_count() == 3 && match fleet_converge_steady_state_doc_projection_dissolution_trigger { Scaffold { dissolves_to: _, bind: _ } => true From 501ff5ed87ce6f1198f89dc8f5f976df008c1c43 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 14 Jul 2026 04:20:13 +0000 Subject: [PATCH 3/3] =?UTF-8?q?WIP:=20Shell=E2=86=92dag=20P2b=20consumer?= =?UTF-8?q?=20slice=20(successor=20to=20archived=20bold-pike-629;=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dag/gunbc/fleet_converge_emit.dag | 80 +++++++++++++------ dag/test/claim/fleet_converge_emit_test.dag | 12 ++- src/v2/compiler/05_emit_orchestration.dag | 34 +------- src/v2/extdeps/languages/bash_orch_tier2.dag | 6 -- .../languages/bash_orchestration_emit.dag | 13 +-- src/v2/std/orchestration.dag | 3 - src/v2/std/orchestration_emit.dag | 2 - src/v2/workflow/orchestration_bash_test.dag | 15 +--- .../orchestration_tier2_emit_test.dag | 59 +------------- 9 files changed, 70 insertions(+), 154 deletions(-) diff --git a/dag/gunbc/fleet_converge_emit.dag b/dag/gunbc/fleet_converge_emit.dag index 5d6f59d387c..6426a990ff4 100644 --- a/dag/gunbc/fleet_converge_emit.dag +++ b/dag/gunbc/fleet_converge_emit.dag @@ -50,12 +50,6 @@ import v2.extdeps.languages.bash_orchestration_emit { bash_orchestration_emit_me data fleet_converge_protocol: LayoutProtocol = LayoutProtocol { indent_unit: "" } -type FleetConvergeEmitFrontierRow { - construct: String - site: String -} - - fn sh_arg(s: String) -> String { concat(concat("\"", s), "\"") } @@ -151,6 +145,61 @@ fn fresh_standup_verdict_gate_line() -> String { ) } +fn fresh_standup_bootstrap_arm_golden() -> String { + concat( + " # fresh_standup: restart-free apply path for greenfield hosts (srv3 exemplar).\n", + concat( + " if [ -d \"$checkout/.git\" ]; then\n", + concat( + " (cd \"$checkout\" && git fetch --prune origin >/dev/null 2>&1) || true\n", + concat( + " (cd \"$checkout\" && git checkout --detach \"$ctrl_pin\" >/dev/null 2>&1) || true\n", + concat( + " dag_pin=\"$(converge_read_gunbc_host_pin \"$checkout\")\"\n", + concat( + " else dag_pin=\"\"; fi\n", + concat( + " mkdir -p \"$7\"\n", + concat( + " if [ ! -x \"$7/${13}\" ]; then\n", + concat( + " echo \"binary pull ${11}@sha:$ctrl_pin into $7 (steady-state CAS/ghcr transport keyed by derived pin)\" >&2\n", + concat( + " if [ ! -x \"$7/${13}\" ] && [ -d \"$checkout\" ]; then\n", + concat( + " (cd \"$checkout\" && cargo build -p v1-compiler --release --bin \"${13}\" >/dev/null 2>&1) || true\n", + concat( + " if [ -x \"$checkout/target/release/${13}\" ]; then cp \"$checkout/target/release/${13}\" \"$7/${13}\" 2>/dev/null || true; fi\n", + concat( + " fi\n", + concat( + " fi\n", + concat( + " if [ -x \"$7/${13}\" ]; then export \"$6=$7\"; fi\n", + concat( + " if [ -z \"$dag_pin\" ]; then effective=ABSENT; verdict=absent; else decide_verdict \"$dag_pin\" \"$desired_pin\"; effective=\"$dag_pin\"; fi\n", + concat( + " emit_receipt \"$1\" \"$2\" \"$3\" \"$desired_pin\" \"$effective\" \"$verdict\"\n", + " record \"$verdict\"" + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) +} + fn converge_script_header() -> Doc { doc_concat(parts: map([ "#!/usr/bin/env bash", @@ -560,21 +609,6 @@ data fleet_converge_steady_state_doc_projection_dissolution_trigger: Disposition } } -data fleet_converge_fresh_standup_bootstrap_emit_frontier: List = [ - FleetConvergeEmitFrontierRow { - construct: "orch_construct_procedure", - site: "converge_gunbc_pinned_tree fresh_standup: decide_verdict/converge_read_gunbc_host_pin shell function calls — CONSUMED by fresh_standup_bootstrap_emit_step (P2b)" - }, - FleetConvergeEmitFrontierRow { - construct: "orch_construct_cmdsubst_assign", - site: "converge_gunbc_pinned_tree fresh_standup: dag_pin=$(converge_read_gunbc_host_pin ...) cmdsubst assignment — CONSUMED by fresh_standup_dag_pin_cmdsubst_line (P2b)" - }, - FleetConvergeEmitFrontierRow { - construct: "orch_construct_let_assign", - site: "converge_gunbc_pinned_tree fresh_standup: verdict=/effective=/export shell assignments — CONSUMED by fresh_standup_*_intent rows (P2b; export line remains literal until modeled)" - } -] - data fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger: Disposition = Scaffold { dissolves_to: RealizationDispatch, bind: DeclarationRef { @@ -583,7 +617,3 @@ data fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger: Dispositio field: WholeDeclaration } } - -fn fleet_converge_fresh_standup_bootstrap_emit_frontier_count() -> Int { - list_length(items: fleet_converge_fresh_standup_bootstrap_emit_frontier) -} diff --git a/dag/test/claim/fleet_converge_emit_test.dag b/dag/test/claim/fleet_converge_emit_test.dag index c3d926cc5fe..0af3e7f4fdd 100644 --- a/dag/test/claim/fleet_converge_emit_test.dag +++ b/dag/test/claim/fleet_converge_emit_test.dag @@ -66,9 +66,9 @@ import gunbc.fleet_converge_emit { fleet_converge_sh_for, fleet_converge_drifted, fleet_converge_steady_state_doc_projection_dissolution_trigger, - fleet_converge_fresh_standup_bootstrap_emit_frontier_count, fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger, fresh_standup_bootstrap_emit_refused_poison, + fresh_standup_bootstrap_arm_golden, fresh_standup_dag_pin_cmdsubst_line, fresh_standup_dag_pin_else_line, fresh_standup_verdict_gate_line, @@ -319,12 +319,18 @@ fn witness_sessions_membership_line_emitted() -> Bool { fn witness_fresh_standup_bootstrap_emit_bytes_hold() -> Bool { let sh = expected_fleet_converge_sh() - has(s: sh, p: fresh_standup_dag_pin_cmdsubst_line()) + has(s: sh, p: fresh_standup_bootstrap_arm_golden()) + && has(s: sh, p: fresh_standup_dag_pin_cmdsubst_line()) && has(s: sh, p: fresh_standup_dag_pin_else_line()) && has(s: sh, p: fresh_standup_verdict_gate_line()) && !has(s: sh, p: fresh_standup_bootstrap_emit_refused_poison) } +fn witness_fresh_standup_bootstrap_arm_perturb_red() -> Bool { + !has(s: expected_fleet_converge_sh(), p: concat(fresh_standup_bootstrap_arm_golden(), "x")) + && !has(s: expected_fleet_converge_sh(), p: concat(fresh_standup_dag_pin_cmdsubst_line(), "x")) +} + fn witness_fresh_standup_bootstrap_emit_dissolution_scaffold() -> Bool { match fleet_converge_fresh_standup_bootstrap_emit_dissolution_trigger { Scaffold { dissolves_to: _, bind: _ } => true @@ -350,8 +356,8 @@ test fn fleet_converge_emit_holds() -> Bool { && witness_gunbc_pinned_tree_runs_first() && witness_sessions_membership_line_emitted() && witness_fresh_standup_bootstrap_emit_bytes_hold() + && witness_fresh_standup_bootstrap_arm_perturb_red() && witness_fresh_standup_bootstrap_emit_dissolution_scaffold() - && fleet_converge_fresh_standup_bootstrap_emit_frontier_count() == 3 && match fleet_converge_steady_state_doc_projection_dissolution_trigger { Scaffold { dissolves_to: _, bind: _ } => true Terminal { reason: _ } => false diff --git a/src/v2/compiler/05_emit_orchestration.dag b/src/v2/compiler/05_emit_orchestration.dag index 992c828c773..609ce8165c2 100644 --- a/src/v2/compiler/05_emit_orchestration.dag +++ b/src/v2/compiler/05_emit_orchestration.dag @@ -16,8 +16,7 @@ import v2.std.orchestration_emit { orch_construct_procedure, orch_construct_call, orch_construct_cmdsubst_assign, - orch_construct_let_assign, - orch_construct_arith + orch_construct_let_assign } import v2.extdeps.languages.bash { bash_stmt_negation_emitted, @@ -57,10 +56,7 @@ import v2.std.orchestration { Expr, ExprLit, ExprVarRef, - ExprArith, ExprCmdSubst, - ArithAdd, - ArithSub, EscalationLevel, Predicate, ExitZero, @@ -352,34 +348,6 @@ fn orch_emit_expr_spelling(e: Expr, medium: OrchestrationEmitMedium) -> Outcome< match e { ExprLit { spelling: s } => outcome_accepted(s) ExprVarRef { name: n } => outcome_accepted(concat("$", n)) - ExprArith { op: op, lhs: lhs, rhs: rhs } => - bind_outcome( - o: orch_emit_expr_spelling(e: lhs, medium: medium), - f: fn(lhs_spelling) { - bind_outcome( - o: orch_emit_expr_spelling(e: rhs, medium: medium), - f: fn(rhs_spelling) { - bind_outcome( - o: match op { - ArithAdd => - orch_emit_from_registry( - medium: medium, - construct_tag: orch_construct_arith, - target: medium.realize_arith(lhs_spelling, "+", rhs_spelling) - ) - ArithSub => - orch_emit_from_registry( - medium: medium, - construct_tag: orch_construct_arith, - target: medium.realize_arith(lhs_spelling, "-", rhs_spelling) - ) - }, - f: fn(m) { outcome_accepted(m.carried) } - ) - } - ) - } - ) ExprCmdSubst { callee: c, args: args } => outcome_accepted(orch_emit_cmdsubst_word_spelling(callee: c, args: args)) } diff --git a/src/v2/extdeps/languages/bash_orch_tier2.dag b/src/v2/extdeps/languages/bash_orch_tier2.dag index f657ee09713..99b4b4e01f4 100644 --- a/src/v2/extdeps/languages/bash_orch_tier2.dag +++ b/src/v2/extdeps/languages/bash_orch_tier2.dag @@ -132,9 +132,3 @@ fn orch_cmdsubst_assign_target_model(name: String, body: String) -> TargetModel fn orch_let_assign_target_model(name: String, value: String) -> TargetModel { bash_stmt_assign_target_model(name: name, value: value) } - -fn orch_arith_target_model(lhs: String, op: String, rhs: String) -> TargetModel { - let inner = concat(lhs, concat(" ", concat(op, concat(" ", rhs)))) - let arith_spelling = concat("$((", concat(inner, "))")) - bash_orch_call_target_model(spelling: arith_spelling) -} diff --git a/src/v2/extdeps/languages/bash_orchestration_emit.dag b/src/v2/extdeps/languages/bash_orchestration_emit.dag index 65c46fd42ba..cc37c2522cf 100644 --- a/src/v2/extdeps/languages/bash_orchestration_emit.dag +++ b/src/v2/extdeps/languages/bash_orchestration_emit.dag @@ -26,8 +26,7 @@ import v2.extdeps.languages.bash_orch_tier2 { orch_procedure_target_model, orch_call_target_model, orch_cmdsubst_assign_target_model, - orch_let_assign_target_model, - orch_arith_target_model + orch_let_assign_target_model } import v2.extdeps.languages.bash_command_fold { bash_fold_raw_line_target_model } import std.algebra { FreeMonoid } @@ -55,8 +54,7 @@ import v2.std.orchestration_emit { orch_construct_procedure, orch_construct_call, orch_construct_cmdsubst_assign, - orch_construct_let_assign, - orch_construct_arith + orch_construct_let_assign } import v2.std.text { String } @@ -107,10 +105,6 @@ fn bash_orchestration_emit_registry_node() -> Node { bash_named_edge( name: orch_construct_let_assign, target: bash_stmt_assign_emitted - ), - bash_named_edge( - name: orch_construct_arith, - target: bash_orch_call_emitted ) ], occurrence_id: SyntheticOccurrence @@ -190,7 +184,6 @@ fn bash_orchestration_emit_medium() -> OrchestrationEmitMedium { realize_procedure: orch_procedure_target_model, realize_call: orch_call_target_model, realize_cmdsubst_assign: orch_cmdsubst_assign_target_model, - realize_let_assign: orch_let_assign_target_model, - realize_arith: orch_arith_target_model + realize_let_assign: orch_let_assign_target_model } } diff --git a/src/v2/std/orchestration.dag b/src/v2/std/orchestration.dag index 9678aaeb182..3bca2badd9a 100644 --- a/src/v2/std/orchestration.dag +++ b/src/v2/std/orchestration.dag @@ -53,12 +53,9 @@ type EscalationLevel { type FailurePolicy = FailFast | Continue -type ArithOp = ArithAdd | ArithSub - type Expr = ExprLit { spelling: String } | ExprVarRef { name: String } - | ExprArith { op: ArithOp, lhs: Expr, rhs: Expr } | ExprCmdSubst { callee: String, args: List } type Procedure { diff --git a/src/v2/std/orchestration_emit.dag b/src/v2/std/orchestration_emit.dag index 90afc464033..c6a1a4f87d9 100644 --- a/src/v2/std/orchestration_emit.dag +++ b/src/v2/std/orchestration_emit.dag @@ -16,7 +16,6 @@ data orch_construct_procedure: Symbol = ^orch_construct_procedure data orch_construct_call: Symbol = ^orch_construct_call data orch_construct_cmdsubst_assign: Symbol = ^orch_construct_cmdsubst_assign data orch_construct_let_assign: Symbol = ^orch_construct_let_assign -data orch_construct_arith: Symbol = ^orch_construct_arith type OrchRunEmitPlan { construct_tag: Symbol @@ -44,5 +43,4 @@ type OrchestrationEmitMedium { realize_call: fn(String, String) -> TargetModel realize_cmdsubst_assign: fn(String, String) -> TargetModel realize_let_assign: fn(String, String) -> TargetModel - realize_arith: fn(String, String, String) -> TargetModel } diff --git a/src/v2/workflow/orchestration_bash_test.dag b/src/v2/workflow/orchestration_bash_test.dag index 31435b02592..1daacd5c26d 100644 --- a/src/v2/workflow/orchestration_bash_test.dag +++ b/src/v2/workflow/orchestration_bash_test.dag @@ -25,9 +25,7 @@ import v2.extdeps.languages.bash_orch_if { bash_log_matches_grep_target_model } import v2.extdeps.languages.bash_orch_tier2 { - orch_cmdsubst_assign_target_model, - orch_arith_target_model, - bash_orch_call_emitted + orch_cmdsubst_assign_target_model } import v2.std.collection { Map } import v2.std.compilers.target_model { TargetModel } @@ -197,14 +195,3 @@ test fn orch_bash_cmdsubst_assign_row_holds() -> Bool { Rejected { diagnostics: _ } => false } } - -test fn orch_bash_arith_row_holds() -> Bool { - match orch_emit_bash( - root: bash_orch_call_emitted, - target: orch_arith_target_model(lhs: "applied", op: "+", rhs: "1") - ) { - Accepted { value: source, diagnostics: dg } => - (source.carried == "$((applied + 1))") && (dg == None) - Rejected { diagnostics: _ } => false - } -} diff --git a/src/v2/workflow/orchestration_tier2_emit_test.dag b/src/v2/workflow/orchestration_tier2_emit_test.dag index 57185bf95f9..66365942bf5 100644 --- a/src/v2/workflow/orchestration_tier2_emit_test.dag +++ b/src/v2/workflow/orchestration_tier2_emit_test.dag @@ -15,8 +15,6 @@ import v2.std.orchestration { Procedure, ExprLit, ExprCmdSubst, - ExprArith, - ArithAdd, StrEmpty } import v2.std.collection { Absent } @@ -25,7 +23,7 @@ import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -data orch_tier2_golden_note: String = "Goldens below are hand-authored bytes from fleet_converge_emit.dag converge_gunbc_pinned_tree fresh_standup arm ONLY (docs/plans/shell-to-dag-residual-census-and-arc-completion.md §1B frontier rows). Ubuntu-media for/heredoc and steady-state arith sites are EXCLUDED per purity-trap fence (FLAG B1). Each test compares emit against its golden independently of the grammar rows." +data orch_tier2_golden_note: String = "Goldens below are hand-authored bytes from fleet_converge_emit.dag converge_gunbc_pinned_tree fresh_standup arm ONLY (docs/plans/shell-to-dag-residual-census-and-arc-completion.md §1B frontier rows). Ubuntu-media for/heredoc sites are EXCLUDED per purity-trap fence (FLAG B1). Each test compares emit against its golden independently of the grammar rows." fn fresh_standup_cmdsubst_assign_intent() -> PipelineStep { Let { @@ -188,61 +186,6 @@ test fn orch_tier2_procedure_definition_band_holds() -> Bool { } } -fn arith_add_band_intent() -> PipelineStep { - Let { - name: "applied", - value: ExprArith { - op: ArithAdd, - lhs: ExprLit { spelling: "applied" }, - rhs: ExprLit { spelling: "1" } - } - } -} - -fn arith_add_band_golden() -> String { - "applied=$((applied + 1))" -} - -test fn orch_tier2_arith_add_band_holds() -> Bool { - match orch_emit_step( - s: arith_add_band_intent(), - medium: bash_orchestration_emit_medium() - ) { - Accepted { value: src, diagnostics: dg } => - (src.carried == arith_add_band_golden()) && (dg == None) - Rejected { diagnostics: _ } => false - } -} - -fn expr_cmdsubst_in_arith_lhs_intent() -> PipelineStep { - Let { - name: "n", - value: ExprArith { - op: ArithAdd, - lhs: ExprCmdSubst { - callee: "wc", - args: ["-l", "\"$f\""] - }, - rhs: ExprLit { spelling: "0" } - } - } -} - -fn expr_cmdsubst_in_arith_lhs_golden() -> String { - "n=$(($(wc -l \"$f\") + 0))" -} - -test fn orch_tier2_expr_cmdsubst_word_in_arith_lhs_holds() -> Bool { - match orch_emit_step( - s: expr_cmdsubst_in_arith_lhs_intent(), - medium: bash_orchestration_emit_medium() - ) { - Accepted { value: src, diagnostics: dg } => - (src.carried == expr_cmdsubst_in_arith_lhs_golden()) && (dg == None) - Rejected { diagnostics: _ } => false - } -} - test fn orch_tier2_cmdsubst_assign_has_teeth_holds() -> Bool { match orch_emit_step( s: fresh_standup_cmdsubst_assign_intent(),