Skip to content

Confirm sequential runner reuse is safe in artisan build command#1403

Closed
Copilot wants to merge 1 commit intoalmas/chorefrom
copilot/sub-pr-1402
Closed

Confirm sequential runner reuse is safe in artisan build command#1403
Copilot wants to merge 1 commit intoalmas/chorefrom
copilot/sub-pr-1402

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Addresses the review question on whether reusing runner across the go generate and go build steps in Handle() is safe.

Findings

  • runner is identical to r.processProcess.Env() mutates the receiver and returns r, not a clone
  • Both Run() calls are strictly sequential; Run() blocks until the subprocess exits
  • The Process contract documents "should not be reused concurrently" — sequential reuse is the intended pattern
  • WithSpinner() is called before each Run(), and loading/loadingMessage are copied by value into the Running instance inside start(), so later mutations to the process state cannot affect an in-flight execution
  • Env vars (CGO_ENABLED, GOOS, GOARCH) are intentionally shared between both commands via the single runner

No code changes required — the implementation is correct as-is.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix feedback on artisan build command generate flag usage Confirm sequential runner reuse is safe in artisan build command Mar 10, 2026
@hwbrzzl hwbrzzl closed this Mar 10, 2026
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.

2 participants