Make workdir consistent with the sidecar structure.#359
Conversation
Chunk sidecars use /home/user as the home dir, this makes the command logic reference that known location instead of relative paths.
| ) | ||
|
|
||
| const workspaceDir = "./workspace" | ||
| const workspaceDir = "/home/user" |
There was a problem hiding this comment.
If repo is empty, ResolveWorkspace returns bare /home/user. The retry path at line 92 runs rm -rf on whatever ResolveWorkspace returned — previously that would have been rm -rf ./workspace (contained), now it's rm -rf /home/user (wipes the sidecar home dir). DetectOrgAndRepo guards the Sync flow, but ResolveWorkspace is public — shouldn't this at least validate that the final path is deeper than the base before returning it?
| ) | ||
|
|
||
| const workspaceDir = "./workspace" | ||
| const workspaceDir = "/home/user" |
There was a problem hiding this comment.
The old relative ./workspace worked regardless of which OS user ran the process. /home/user assumes the sidecar user is literally user — if the image ever changes the default user, or someone invokes this outside the expected sidecar, it silently targets the wrong location. Worth deriving from $HOME or an env var instead?
Chunk sidecars use /home/user as the home dir, this makes the command logic reference that known location instead of relative paths.