feat(exec): support interpreter on serial and parallel steps - #442
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
jahvon
force-pushed
the
feat/step-interpreter
branch
from
August 27, 2026 04:28
8b27964 to
69e5a4a
Compare
jahvon
force-pushed
the
feat/step-interpreter
branch
from
August 27, 2026 05:48
69e5a4a to
91b3d5f
Compare
jahvon
force-pushed
the
feat/step-interpreter
branch
from
August 27, 2026 06:24
91b3d5f to
eace042
Compare
jahvon
force-pushed
the
feat/step-interpreter
branch
from
August 27, 2026 06:44
eace042 to
7b6876c
Compare
Inline `cmd` steps in serial/parallel executables now take their own `interpreter`, so one workflow can mix shell and Python without splitting into separate executables. A step that omits it runs under the shell as before, and a `ref` step ignores it — the referenced executable brings its own. Both step configs $ref the same ExecInterpreter definition the exec type uses, so there is one enum rather than three parallel ones. This also lifts the restriction added with the --interpreter flag: the flag now applies to every --cmd in an invocation, in serial and parallel mode alike. ExecutableForCmd takes the interpreter as a new parameter; its unused int parameter is left alone to keep this diff to the one concern. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R328pa3FUUfga4gYah1iQi
jahvon
force-pushed
the
feat/step-interpreter
branch
from
August 27, 2026 06:50
7b6876c to
366fea8
Compare
jahvon
added a commit
that referenced
this pull request
Aug 27, 2026
**Part 5/5.** Stacked on #442. # Summary Adds `.py` to the script types `imports:` can turn into executables, so a repo's Python scripts become named, discoverable flow executables alongside its shell ones. ```yaml imports: - "scripts/analyze.py" ``` ```python #!/usr/bin/env python3 # f:name=metrics f:verb=analyze # f:description="Analyze project metrics" # f:tag=reporting ``` → `flow analyze metrics` **Notable Changes** - Python uses `#` line comments, so the existing `f:name=` / `f:verb=` metadata syntax and its parser work unchanged — the new parser is the shell one with a different extension. - The generated executable leaves `interpreter` unset: the `.py` extension already routes it (Part 1), and setting the field would add noise to every generated definition. - Docs updated in both `executables.md` (import table + a Python tab in the metadata examples) and `generated-config.md` (supported types, comment-prefix note, and Python tabs in the params/args examples). # Testing - Parser tests mirroring the ps1 set (simple / complex / params), plus two cases the others do not have: metadata following a shebang line — idiomatic in Python scripts, and it must not shadow the comments beneath it — and that the generated executable leaves `interpreter` unset while still resolving to Python via its extension. - An import-dispatch test alongside the existing `.sh`/`.bat`/`.ps1` ones. - Verified end-to-end outside the test suite: a scratch workspace importing a `.py`, synced, then run — metadata, tags, and description all landed, and `flow analyze metrics` executed it under Python. - `flow validate` passes; `generate` produces no diff. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01R328pa3FUUfga4gYah1iQi Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 4/5. Stacked on #441.
Summary
Inline
cmdsteps inserial/parallelexecutables now take their owninterpreter, so one workflow can mix shell and Python without splitting into separate executables.Notable Changes
$refthe sameExecInterpreterdefinition theexectype uses, so there is one enum rather than three parallel ones. (Part 1 hoisted it to a top-level definition for exactly this.)interpreterruns under the shell as before; arefstep ignores the field — the referenced executable brings its own.--interpreternow applies to every--cmdin an invocation, in serial and parallel mode alike.ExecutableForCmdtakes the interpreter as a new parameter (5 call sites). Its unusedintparameter is left alone to keep the diff to the one concern.Testing
echo, a shell builtin, so it only passes if the step really stayed there); and--interpreterapplied across a multi-command batch.flow validatepasses;generateproduces no diff.🤖 Generated with Claude Code
https://claude.ai/code/session_01R328pa3FUUfga4gYah1iQi