Repository navigation
fix(gateway): derive lock and coordinator paths from the resolved state dir - #120110
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 7, 2026 02:16
This was referenced Aug 7, 2026
vincentkoc
added a commit
to VACInc/openclaw
that referenced
this pull request
Aug 7, 2026
* origin/main: (58 commits) fix(test): restart shared gateway after migration convergence (openclaw#120089) fix(ui): make active-run steering reliable (openclaw#120083) fix(telegram): preserve voice fallback text test(swift): preserve queued websocket frames (openclaw#120106) fix: reject missing oxlint shard selectors (openclaw#120096) test(channels): align prerelease fallback catalog spec (openclaw#120092) fix(node-cli): warn when systemd user lingering is disabled after install (openclaw#118430) fix(diagnostics): preserve CLI turn usage totals (openclaw#120100) fix(gateway): derive lock and coordinator paths from the resolved state dir (openclaw#120110) fix(release): isolate private Telegram QA harness (openclaw#120088) test(agents): exercise execution attribution ingress guard fix(gateway): defer attribution until admission succeeds refactor(agents): centralize exact execution attribution fix(google): accept base64url provider media (openclaw#116204) fix(plugins): warn when registerHook uses a typed hook event name (openclaw#118601) fix(canvas): serve Content-Length on A2UI HEAD responses (openclaw#117961) fix(gateway): make doctor dreaming timestamp comparators NaN-safe (openclaw#118749) fix(heartbeat): explain target-none skips (openclaw#119689) fix(security): stop recommending retired install-policy bypasses (openclaw#120011) fix(plugins): preserve startup release during repair (openclaw#120085) ... # Conflicts: # CHANGELOG.md # src/config/sessions/session-accessor.sqlite-transcript-write.ts
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 7, 2026
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.
What Problem This Solves
Gateway lock and coordination files were written under the process temp dir (
os.tmpdir()/openclaw-<uid>) even whenOPENCLAW_STATE_DIRpointed elsewhere, so a fully sandboxed second instance littered — and in principle contended with — the live instance's tmp tree. On macOS the service env pinsTMPDIRinto the default state tree, which is exactly where the reported leak landed.Fixes #118371 (reported by @peterkaynie).
Why This Change Was Made
resolveGatewayLockDir()owned the location but never received the resolved state dir. It now derives$OPENCLAW_STATE_DIR/tmp/openclaw-<uid>from the canonical state dir, so gateway state/config locks, device-identity coordinator DBs, and transient reclaim guards are all state-local — total isolation for sandboxed instances.This is a deliberate clean break (maintainer decision): older binaries keep using process temp and do not mutually exclude a state-local binary during a mixed-version upgrade window. The tradeoff is recorded at the lock-dir owner (
src/config/paths.ts) and indocs/gateway/gateway-lock.md. Old process-temp locks are neither migrated nor cleaned (transient state; OS tmp cleanup owns them). Hash simplification: the state-dir hash in lock filenames is now redundant (the directory is the state identity) and was removed; the config hash (distinguishes explicit configs sharing one state) and device database hash (arbitrary DB paths) remain.User Impact
Sandboxed/canary instances with
OPENCLAW_STATE_DIRset no longer write anything into the real~/.openclaw; isolation is total. Net −14 production LOC.Evidence
gateway-lock.state-dir.test.ts,device-identity.state-dir.test.ts): withOPENCLAW_STATE_DIRoverridden, every lock/coordinator path resolves under the override and nothing is created under the default home.node scripts/check-deadcode-exports.mjs: clean. Local changed gate: exit 0. Docs MDX 768 files + 6,401 links: clean.gpt-5.6-sol, high), worker closeout + independent coordinator pass on the frozen diff: clean both times, "patch is correct (0.95)".docs/gateway/gateway-lock.md,docs/install/fly.md).