Skip to content

Fix #3: terraphim_spawner SpawnContext for per-call working_dir#821

Closed
AlexMikhalev wants to merge 0 commit intomainfrom
task/adf-fleet-3-spawn-context
Closed

Fix #3: terraphim_spawner SpawnContext for per-call working_dir#821
AlexMikhalev wants to merge 0 commit intomainfrom
task/adf-fleet-3-spawn-context

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Refs terraphim/adf-fleet#3

Summary

  • Add SpawnContext struct with global(), with_working_dir(), and with_env() constructors
  • Thread ctx: SpawnContext through all public spawn methods and internal helpers
  • spawn_process now uses ctx.working_dir (highest priority) over Configuration.working_dir over spawner default; applies ctx.env_overrides after spawner and provider env vars
  • Migrated orchestrator callers to pass SpawnContext::global() preserving existing behaviour
  • 4 new code_review_checklists: global preserves defaults, working_dir override, env override, inherited env flows through

Test plan

  • cargo test -p terraphim_spawner -- 53 passed, 0 failed
  • cargo build --workspace -- clean
  • cargo clippy -p terraphim_spawner -p terraphim_orchestrator -- -D warnings -- clean
  • cargo fmt --check -- no diff

Notes

Pre-existing clippy warnings in terraphim_agent (unrelated dead code) not introduced by this PR. Orchestrator callers use SpawnContext::global() for now; issue #4 will wire real per-project context.

@AlexMikhalev AlexMikhalev force-pushed the task/adf-fleet-3-spawn-context branch from 5974354 to 853df15 Compare April 20, 2026 14:21
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