Skip to content

refactor(flows): collapse per-flow env injection in release-smoke runner#476

Closed
bussyjd wants to merge 1 commit into
mainfrom
refactor/release-smoke-env-injection
Closed

refactor(flows): collapse per-flow env injection in release-smoke runner#476
bussyjd wants to merge 1 commit into
mainfrom
refactor/release-smoke-env-injection

Conversation

@bussyjd
Copy link
Copy Markdown
Collaborator

@bussyjd bussyjd commented May 12, 2026

Summary

  • run_flow now accepts optional env_name env_value args, replacing three hand-coded if name == flow-XX branches.
  • env "VAR=val" bash \$flow is semantically identical to inline VAR=val bash \$flow for child-only export — validated end-to-end on spark1 where flow-11-receipts/, flow-13-receipts/, and flow-14-receipts/ all got populated with the expected on-chain JSON receipts.
  • Defensive ${var:-0} on FAIL/SKIP grep counters so a missing log can't crash the [ "$var" -eq 0 ] arithmetic under set -e.
  • Inlined the one-shot cleanup_default_stack_before_dual helper.
  • Brief comment explaining why flow-10 sits between flow-07 and flow-08 (flow-08 header explicitly requires flow-10's Anvil facilitator).

Test plan

  • bash -n flows/release-smoke.sh clean
  • Self-contained harness with 8 stub-flow cases proving env-injection, no-leak between calls, PASS/SKIP/FAIL classification, and defensive :-0 defaults (run on spark1, bash 5.2.21)
  • Full flows/release-smoke.sh run on spark1 with RELEASE_SMOKE_INCLUDE_OBOL=true RELEASE_SMOKE_INCLUDE_OBOL_FORK=true — receipt dirs populated by all three of flow-11/13/14

run_flow now accepts optional env_name/env_value args, replacing three
hand-coded `if name == flow-XX` branches. env "VAR=val" bash $flow is
semantically identical to the inline `VAR=val bash $flow` form for
child-only export. Validated end-to-end on spark1: flow-11/13/14
each populated their FLOW{11,13,14}_ARTIFACT_DIR receipt subdirs.

Also:
- Defensive ${var:-0} on FAIL/SKIP grep counters so a missing log
  can't crash the [ "$var" -eq 0 ] arithmetic under set -e.
- Inlined the one-shot cleanup_default_stack_before_dual helper.
- Brief comment on why flow-10 sits between flow-07 and flow-08
  (flow-08 header explicitly requires flow-10's Anvil facilitator).
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