Use the resolved remoteWorkspaceFolder from Devsy workspace-up JSON directly
as projectRoot. Remove the separate SSH pwd probe, physical-path normalization,
and Git-root equality constraint, saving one SSH invocation per create attempt.
Require a nonempty absolute path and preserve existing downstream shell quoting.
Devsy v1.23.2 already includes upstream PR #1462 and is already pinned in
mise.toml and mise.lock. Document that minimum host version. Test returned
subdirectory paths with spaces and shell metacharacters, absence of root
probing, and rejection of empty and malformed workspace metadata.
Validation: mise run check and mise run test passed (75 MoonBit tests,
34 Bun tests, 191 assertions). Independent review found no actionable issues.
Actual provider E2E was not exercised.
## Transcript
- U1:
> devsy-org/devsy#1462
> これが入ったdevsyなら不要になる処理があるか?
- A: Inspected PR #1462 and the adapter implementation read-only. The PR fills an empty JSON remoteWorkspaceFolder with the resolved container workspace folder. Initially recommended retaining the physical-path and Git-root checks.
- U2:
> 2,3がなんで必要なの?
- A: Corrected the prior claim: physical-path normalization and the Git-root equality requirement were adapter constraints without a verified downstream necessity.
- U3:
> 余分な制約だ。それを除けば追加ssh接続を減らせるか?
- A: Confirmed that removing the resolve-root probe eliminates one separate SSH invocation per create attempt; later Git operations remain.
- U4:
> devsy最新版で入っているはずだ。pinを更新してからssh接続を減らして
- A: Verified the latest Devsy release is v1.23.2 and its tag equals PR merge commit 0f248a8502ca609e494ec58064556342e30441cb. The E2E pin and generated lock already use that release, so neither needs an update. Fetched origin and retained main. Requested patch release approval, removed root probing and empty-folder fallback, retained absolute-path validation and downstream quoting, documented Devsy 1.23.2+, and added boundary coverage.
- U5:
> patch release対象にする
- A: Patch release approved. mise run check and mise run test passed: native release build, 75 MoonBit tests and 34 Bun tests with 191 assertions. Independent fresh review of the exact three-file diff found no actionable issues. Runtime history was retrieved and checked through this checkpoint. Actual Devsy/provider E2E was not run; no push or release publication is authorized.
Co-authored-by: Codex <noreply@openai.com>
I’m integrating Devsy with an external tool that starts a workspace and then connects over SSH to run commands in the project directory. I want to obtain the container-side workspace folder from the successful
workspace up --result-format jsonresult, alongside the container ID and remote user.Currently,
remoteWorkspaceFoldercan be empty whenworkspaceFolderis omitted, even though Devsy has already resolved the folder. The integration must then discover the path separately or reproduce Devsy’s default-path logic.Return the already-resolved folder so integrations can use Devsy’s result directly. This fits the existing success output:
containerIdidentifies the actual container,remoteUseris the resolved user, andworkspace buildalready reports the resolved workspace folder.When emitting the success JSON, use
SubstitutionContext.ContainerWorkspaceFolderonly if the existing workdir is empty. Preserve explicitworkspaceFolder, Git subpath, and CLI override results. Keep the shared resolver and the workdir passed to SSH configuration and tunnels unchanged.This intentionally changes the previously accepted empty-folder behavior when the folder is unspecified.
Validation:
cmd/workspace/upandpkg/devcontainer/config.Summary by CodeRabbit