* fix: prevent relay fs.rename from clobbering an existing destination
The remote file-explorer rename path (provider.rename -> relay
fs.rename) called fs.rename unconditionally, silently overwriting any
file/folder already at the destination. The local rename already
guards via assertFileExplorerRenameDestinationAvailable; apply the
same guard on the relay to restore local/remote parity (case-only
renames on case-insensitive filesystems still allowed).
Moved the collision helper from src/main to src/shared so both the
main process and the remotely-deployed relay share one implementation.
Closes#2926
* review: make SSH safe rename explicit
- keep relay fs.rename raw and add fs.renameNoClobber for user-facing renames
- route SSH file-explorer rename paths through renameNoClobber
- add relay/provider/runtime regression coverage and stale-relay fail-closed handling
- verified live SSH rename behavior on openclaw 2
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
* fix: reject short SSH stream chunks instead of zero-filling reads
The stream reader validated chunk COUNT but not chunk byte length, so a
short chunk (e.g. a 1-byte final chunk for a 2-chunk file) passed the
count check and resolved with the pre-allocated buffer's tail left
zero-filled — silent corruption of remote file reads. Validate each
chunk's exact length, and add a last-line bytesReceived === totalSize
invariant guard before resolving.
Closes#2930
* review: harden SSH stream byte validation
- fill relay protocol chunks across short fs.read returns before emitting streamChunk
- cover short final and non-final client chunks
- add relay pump coverage for short reads before EOF
- verified lint, typecheck, targeted stream tests, relay round-trip, and Electron boot smoke
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
- Detect existing non-archived workspaces linked to GitHub PRs and open them instead of starting duplicates.
- Show the attached workspace label in PR lists and detail pages, with a menu action to start a new workspace when needed.
* fix: reject file writes with missing content
files.write / files.writeBase64 coerced a missing or non-string
`content` to '' and wrote it, silently truncating the target file.
Require a real string instead; an explicit '' (empty file) is still
allowed. Applies to writeBase64Chunk via its base schema.
Closes#2925
* review: add files.writeBase64Chunk missing-content test
Code review noted the chunk variant's missing-content rejection was only
covered transitively via schema inheritance. Add an explicit test.
* review: expand file write content validation tests
- cover null and non-string write content for text, base64, and chunk writes
- keep explicit empty base64 writes valid
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Treat empty terminal layout snapshots like temporarily missing layout metadata for agent hook routing, and let inactive hook completion notifications fall back to tab-level PTY liveness in that same state.
Verified locally with focused format, lint, unit tests, and droid notification E2E.