fix(workspace): store workspace-state.json in workspace root, not .openclaw/ subdir#1298
Open
BingqingLyu wants to merge 1 commit into
Open
fix(workspace): store workspace-state.json in workspace root, not .openclaw/ subdir#1298BingqingLyu wants to merge 1 commit into
BingqingLyu wants to merge 1 commit into
Conversation
…enclaw/ subdir Moves workspace-state.json from <workspace>/.openclaw/workspace-state.json to <workspace>/workspace-state.json. This removes the requirement to create a dot-prefixed subdirectory inside the workspace, which fails on filesystems that reserve dot-prefixed paths (e.g., TigerFS FUSE mounts). Read falls back to the legacy .openclaw/ path for existing workspaces. Write always uses the new root path. Closes openclaw#44783
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workspace-state.jsonfrom<workspace>/.openclaw/workspace-state.jsonto<workspace>/workspace-state.json.openclaw/path for existing workspacesmkdirfor.openclaw/subdirWhy
Dot-prefixed directories fail on filesystems that reserve them — specifically TigerFS FUSE mounts, where
.prefixes are reserved for built-in operations (.build/,.history/,.filter/, etc.). This blocks using TigerFS-mounted PostgreSQL as a workspace backend.Also addresses the nested
.openclaw/.openclaw/workspace/.openclaw/path issue reported in openclaw#44783.Changes
1 file, 11 insertions, 3 deletions:
resolveWorkspaceStatePath()→ returnsdir/workspace-state.json(wasdir/.openclaw/workspace-state.json)resolveLegacyWorkspaceStatePath()for backward-compatible readsreadWorkspaceSetupStateForDir()tries new path first, falls back to legacywriteWorkspaceSetupState()removesmkdirfor.openclaw/subdir (workspace root already exists)Testing
Existing workspace tests should pass. Legacy workspaces with
.openclaw/workspace-state.jsonare read correctly via fallback.Closes openclaw#44783
Related: openclaw#39446 (cloud storage sync issues with
.openclawdirectory)