Skip to content

fix(flow-driver): isolate build artifacts per run invocation (#817) - #893

Merged
godofecht merged 1 commit into
mainfrom
fix/817-build-isolation
Sep 13, 2026
Merged

godofecht merged 1 commit into
mainfrom
fix/817-build-isolation

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Closes #817. flow run emitted every executable to the repo-global build/<basename>, so two projects both entered at src/main.flow raced through the same build/main artifact and one run could launch the other's binary. This threads a FLOW_BUILD_ROOT override through the compile and runtime-generation paths and gives each flow run a mktemp build root, cleaned up on exit or interrupt. flow compile keeps its persistent build output. Adds tests/integration/test_run_build_isolation.py (two same-basename projects run concurrently, each must execute its own program). Verified locally: 0 cross-executions over repeated concurrent pairs, and single runs clean up their build dir.

flow run emitted every executable to the repo-global build/<basename>, so
two projects both entered at src/main.flow raced through the same
build/main artifact and one run could launch the other's binary. Thread a
FLOW_BUILD_ROOT override through the compile and runtime-generation paths,
and give each run invocation a mktemp build root that is cleaned up on
exit or interrupt. flow compile keeps its persistent build output.

Adds tests/integration/test_run_build_isolation.py, which runs two
same-basename projects concurrently and asserts each executes its own
program. Verified: 0 cross-executions over repeated concurrent pairs.

Co-Authored-By: Claude <[email protected]>
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.

flow run projects race through shared build/main artifact

1 participant