mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-17 23:52:34 +00:00
|
Some checks failed
Rust / Format (push) Has been cancelled
Rust / Clippy (push) Has been cancelled
Rust / Generated Docs (push) Has been cancelled
TypeScript / Build (push) Has been cancelled
Rust / Test (Linux) (push) Has been cancelled
Rust / Test (macOS) (push) Has been cancelled
TypeScript / Typecheck (push) Has been cancelled
TypeScript / Test (push) Has been cancelled
## Problem The `local` sandbox uses the run's `source_directory` (the CLI's cwd at invocation time) as its working directory and `create_dir_all`s it on the server (`LocalSandbox::initialize` in `fabro-sandbox`). That is correct when the CLI and the server share a host — the agent operates directly on the user's project tree. When the server is **remote** from the CLI — e.g. `fabro serve` running in a container in Kubernetes, driven over HTTP with the `local` sandbox — the client's cwd (e.g. `/Users/alice/project`) does not exist on the server. The sandbox then tries to create that path as the (often unprivileged) server user and fails at init: ``` sandbox.failed provider="local" error="Failed to create working directory" causes=["Permission denied (os error 13)"] ``` and the run dies with `workflow_error` before the agent starts. ## Fix When `source_directory` is absent or does not exist on the server, fall back to a server-writable `workspace` directory under the run's scratch dir instead of recreating the client path. **Same-host behavior is unchanged**: an existing `source_directory` is still used as-is. The selection is extracted into a small pure helper, `local_working_directory(source_directory, run_dir)`, so it can be unit-tested directly. ## Testing - `cargo test -p fabro-workflow local_working_directory` — 3 new tests (existing source dir → used; absent → fallback; present-but-missing-on-server → fallback) - `cargo check -p fabro-workflow` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Thanks for fabro @brynary! --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agent_session_activated_props_round_trip.rs | ||
| automation_round_trip.rs | ||
| billed_token_counts_round_trip.rs | ||
| command_termination_round_trip.rs | ||
| completion_message_round_trip.rs | ||
| cost_source_round_trip.rs | ||
| diff_stats_round_trip.rs | ||
| diff_summary_round_trip.rs | ||
| environment_round_trip.rs | ||
| event_envelope_round_trip.rs | ||
| git_context_round_trip.rs | ||
| interview_option_round_trip.rs | ||
| interview_question_record_round_trip.rs | ||
| model_costs_round_trip.rs | ||
| model_features_round_trip.rs | ||
| model_limits_round_trip.rs | ||
| model_round_trip.rs | ||
| model_test_mode_round_trip.rs | ||
| pair_round_trip.rs | ||
| pending_interview_record_round_trip.rs | ||
| pre_run_push_outcome_round_trip.rs | ||
| principal_round_trip.rs | ||
| provider_id_round_trip.rs | ||
| provider_round_trip.rs | ||
| pull_request_round_trip.rs | ||
| question_type_round_trip.rs | ||
| run_billing_stage_round_trip.rs | ||
| run_event_round_trip.rs | ||
| run_failure_round_trip.rs | ||
| run_integrations_round_trip.rs | ||
| run_projection_round_trip.rs | ||
| run_sandbox_round_trip.rs | ||
| run_summary_round_trip.rs | ||
| sandbox_details_round_trip.rs | ||
| sandbox_inventory_round_trip.rs | ||
| sandbox_services_round_trip.rs | ||
| secret_metadata_round_trip.rs | ||
| secret_type_round_trip.rs | ||
| server_settings_round_trip.rs | ||
| session_contract_round_trip.rs | ||
| stage_completion_round_trip.rs | ||
| stage_handler_round_trip.rs | ||
| stage_model_usage_round_trip.rs | ||
| stage_outcome_round_trip.rs | ||
| stage_projection_round_trip.rs | ||
| stage_state_round_trip.rs | ||
| status_round_trip.rs | ||
| submit_answer_request_round_trip.rs | ||
| system_integrations_round_trip.rs | ||
| variable_round_trip.rs | ||
| workflow_settings_round_trip.rs | ||