Skip to content

fix(state): tolerate a sidecar deleted while hardening the state database - #125451

Merged
obviyus merged 4 commits into
openclaw:mainfrom
ayaangazali:fix/state-db-sidecar-chmod-enoent-race
Aug 29, 2026
Merged

obviyus merged 4 commits into
openclaw:mainfrom
ayaangazali:fix/state-db-sidecar-chmod-enoent-race

Conversation

@ayaangazali

@ayaangazali ayaangazali commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem

OpenClaw can abort a shared state database open when SQLite removes an optional -wal, -shm, or -journal sidecar after the permission sweep observes it but before chmod runs.

Root cause

The shared state permission owner checked each SQLite file with existsSync and then hardened it. SQLite can remove sidecars inside that time-of-check/time-of-use window. The generic permission helper correctly treats ENOENT as fatal because other credentials-adjacent targets are required.

Fix

The shared state permission owner now ignores ENOENT only for a suffixed SQLite sidecar that vanished after the existence check. It still rethrows main database ENOENT and every other permission error. This prevents a missing main database from falling through to a writable SQLite open that could create an empty replacement.

Proof

  • Exact current-main red: a deterministic fault removed each existing sidecar inside chmod; the real state database open aborted with ENOENT for -wal, -shm, and -journal.
  • Exact-head green: the same three sidecar cases opened successfully, while the identical main database removal remained fatal.
  • Focused state coverage: 191 tests passed across the permission and state database suites.
  • Local guards: formatting, lint, assertion safety, max-lines, conflict markers, and native schema checks passed.
  • Exact-head CI: run 33256187233 passed for 1ff92f61d55bd2214a83561b9373b998b8568f7d.

Change size

  • Production: +13/-1 lines.
  • Tests: +46/-0 lines.

The production growth keeps the exception at the only boundary that knows the main file from optional SQLite sidecars. Moving ENOENT into the generic permission helper would weaken unrelated required-file checks.

AI-assisted: yes. The contributor and maintainer verified the failure path, SQLite lifecycle contract, owner boundary, and exact-head behavior.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@ayaangazali
ayaangazali marked this pull request as ready for review August 17, 2026 23:33
Copilot AI lite review requested due to automatic review settings August 17, 2026 23:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 10:00 AM ET / 14:00 UTC.

ClawSweeper review

What this changes

The branch tolerates an SQLite WAL, SHM, or journal sidecar disappearing during shared state-database permission hardening while keeping a disappearing main database fatal.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this PR open: current main still has the check-then-chmod race, and the branch repairs it at the shared-state permission owner without weakening the main database loss boundary. No blocking correctness finding was identified; wait for exact-head CI before merge.

Priority: P1
Reviewed head: 1ff92f61d55bd2214a83561b9373b998b8568f7d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and well-supported by real race evidence; exact-head CI remains the merge gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied contributor evidence exercises the production shared-state permission owner against a real isolated SQLite database with a second process deleting an actually present sidecar, and records six pre-fix ENOENT failures versus zero after the repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The supplied contributor evidence exercises the production shared-state permission owner against a real isolated SQLite database with a second process deleting an actually present sidecar, and records six pre-fix ENOENT failures versus zero after the repair.
Evidence reviewed 7 items Current main remains affected: Current main retains the original exists-then-chmod loop with no sidecar-specific ENOENT handling.
Introduced repair is narrowly scoped: The verified PR delta catches only ENOENT after an observed candidate vanishes and explicitly rethrows for the unsuffixed main database and every other error.
Correct owner and caller boundary: The shared-state opener invokes permission hardening immediately before opening SQLite and again after setup, making this the correct owner for the race classification.
Findings None None.
Security None None.

How this fits together

Gateway and CLI startup open OpenClaw’s shared SQLite state database after hardening its directory, main file, and transient sidecars. This permission step feeds directly into the state database used by later runtime and session operations.

flowchart LR
A[Gateway or CLI startup] --> B[Shared state database opener]
B --> C[Permission hardening]
C --> D{Existing SQLite candidate}
D --> E[Main database errors stay fatal]
D --> F[Vanished sidecar is skipped]
E --> G[Open shared SQLite state]
F --> G
Loading

Before merge

  • Resolve merge risk (P1) - The shared-state startup error boundary changes, and the supplied exact-head check rollup is still incomplete; merge should wait for required CI to finish.
Agent review details

Security

None.

PR surface

Source +12, Tests +46. Total +58 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 13 1 +12
Tests 1 46 0 +46
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 59 1 +58

Review metrics

Metric Value Why it matters
Production versus test delta production +12/-1, tests +46/-0 The production change modifies shared-state startup error handling; added tests cover all three sidecars and the main-file fail-loud boundary.

Merge-risk options

Maintainer options:

  1. Wait for exact-head validation (recommended)
    Retain the narrow sidecar repair and merge after the current head’s required state and CI checks complete successfully.

Technical review

Best possible solution:

Keep the sidecar-only catch in the shared-state permission owner: a global ENOENT exemption would weaken unrelated credentials-adjacent chmod failures, while copying the per-agent sweep would break its pre-create contract.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: the changed test creates each sidecar, removes it in the existence-to-chmod interval, and exercises the production state opener. Supplied two-process evidence corroborates the real cross-process race.

Is this the best way to solve the issue?

Yes. The shared-state permission sweep is the only owner that knows both that the candidate was observed and whether it is the durable main database or a transient sidecar.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 55f127f10294.

Labels

Label justifications:

  • P1: A normal concurrent state-database open can intermittently abort gateway or CLI startup with ENOENT.
  • merge-risk: 🚨 session-state: The changed exception handling runs immediately before the shared SQLite state database opens.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The supplied contributor evidence exercises the production shared-state permission owner against a real isolated SQLite database with a second process deleting an actually present sidecar, and records six pre-fix ENOENT failures versus zero after the repair.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied contributor evidence exercises the production shared-state permission owner against a real isolated SQLite database with a second process deleting an actually present sidecar, and records six pre-fix ENOENT failures versus zero after the repair.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Created the split shared-state permissions module and the invariant-sharing per-agent permissions module. (role: introduced the state permission owner; confidence: high; commits: e01a880084dc, e8566596e032; files: src/state/openclaw-state-db-permissions.ts, src/state/openclaw-agent-db-permissions.ts)
  • Eden: Blame identifies this contributor on the documented per-agent transient-sidecar handling that shares the relevant SQLite lifecycle invariant. (role: recent adjacent contributor; confidence: medium; commits: a6ccf6ad8f94; files: src/state/openclaw-agent-db-permissions.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the current head’s required CI and state checks to complete green.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-22T17:13:46.005Z sha 251482777d4cec2e4cf4b8e704e0c87471d868ba :: needs real behavior proof before merge. :: [P1] Restrict ENOENT suppression to SQLite sidecars
  • reviewed 2026-08-22T17:57:30.318Z sha 251482777d4cec2e4cf4b8e704e0c87471d868ba :: needs real behavior proof before merge. :: [P1] Keep main-database ENOENT fatal
  • reviewed 2026-08-23T05:35:44.719Z sha 6e42b7fdb39acb26bdc9e76a696f475fe8648e06 :: needs maintainer review before merge. :: none
  • reviewed August 24, 2026, 4:29 AM ET / 08:29 UTC sha unknown :: needs changes before merge. :: [P1] Keep per-agent main-database ENOENT fatal
  • reviewed 2026-08-24T20:23:36.168Z sha af89e343e26b687ed48f0d78f26cc1160cff9c14 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-24T22:28:32.786Z sha e58fbb8c1e650330f610dfcf83c36e1dcf06d5e2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T22:38:04.671Z sha 44d137d45430e13c83ae8e69014e58f958cb1e1b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T04:49:06.872Z sha b55af763330eb7920abe36e198babab844574d4f :: needs maintainer review before merge. :: none

@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from 22096a3 to bf708a9 Compare August 21, 2026 01:27
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 21, 2026
@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from bf708a9 to 3e06b08 Compare August 21, 2026 19:40
@openclaw-barnacle openclaw-barnacle Bot removed the docs Improvements or additions to documentation label Aug 21, 2026
@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from 3e06b08 to 2514827 Compare August 22, 2026 17:05
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 22, 2026
@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from 2514827 to 6e42b7f Compare August 23, 2026 05:29
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Both P1 items addressed in 6e42b7fdb39.

Keeping the main database fatal. The finding was right, and it was a regression I introduced. SQLITE_DATABASE_FILE_SUFFIXES is ["", "-wal", "-shm", "-journal"], so the unsuffixed main database is the first candidate and my catch swallowed its ENOENT too. The skip is now confined to sidecars:

if (candidate === pathname || !hasErrnoCode(error, "ENOENT")) {
  throw error;
}

New regression test: rethrows when the main database vanishes between the existence check and the chmod. It fails on the unfixed code for the right reason (I reverted just that condition and confirmed 1 failed | 10 passed), and it asserts the main path actually reached chmod so it cannot pass vacuously.

Real behavior proof. You asked for a real state database surviving removal of a real sidecar rather than mocked chmod faults. Worth noting why the shape is what it is: ensureOpenClawStatePermissions is fully synchronous, so nothing in-process can run between existsSync and chmodSync. Only a second process can land in that window, which is also how it happens in production with a concurrent opener. So the harness spawns a real second process unlinking real sidecars while the parent hardens a real isolated state database. No mocks anywhere.

Same harness, only src/state/openclaw-state-db-permissions.ts swapped between main and this branch:

pre-fix (main):   25732 hardening passes with a real sidecar present, 6 threw
  ENOENT: no such file or directory, chmod '<redacted>/state/openclaw.sqlite-journal'
  ENOENT: no such file or directory, chmod '<redacted>/state/openclaw.sqlite-wal'

post-fix:         30563 hardening passes with a real sidecar present, 0 threw

Main database present at the end of both runs. Paths redacted, isolated dir under os.tmpdir().

My first attempt at this proof was vacuous and I nearly posted it: I opened and closed the database in a loop, got 400 clean opens, and only noticed because the counter I had added reported iterations with a real sidecar present: 0. SQLite removes -wal/-shm on clean close, so that version never exercised the path at all.

node scripts/run-vitest.mjs src/state: 531 passed, 7 skipped, 41 files. Production delta for the new commit is +11/-1 net inside the existing guard, and it is now strictly narrower than before rather than wider.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 23, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 24, 2026
@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from 6e42b7f to af89e34 Compare August 24, 2026 20:16
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased to af89e343e26, 0 behind. On the P1 I have to push back, with evidence: I implemented it, it broke the normal path, and I think the two functions are genuinely different rather than one being an unfixed copy of the other.

I applied exactly the suggested change to src/state/openclaw-agent-db-permissions.ts, the same candidate === pathname || distinction this PR adds to the shared-state sweep, plus matching regressions. The regression behaved correctly (it failed on the unfixed condition and passed with it). But the wider suite went red:

FAIL src/state/openclaw-database-preflight.test.ts
  > collects newer state and registered agent schemas with writer builds
Error: ENOENT: no such file or directory, chmod
  '.../openclaw-database-preflight-ZwIoDL/agents/worker-1/agent/openclaw-agent.sqlite'
 ❯ ensureOpenClawAgentDatabasePermissions src/state/openclaw-agent-db-permissions.ts:29

Tests  12 failed  (openclaw-database-preflight.test.ts, openclaw-database-verify.test.ts)

The reason is a precondition difference I had not noticed until it broke:

  • shared state, openclaw-state-db-permissions.ts:51, guards each candidate: if (existsSync(candidate)) { ... }. A main-file ENOENT there really does mean the database vanished after it was seen, which is the loss boundary this PR protects.
  • per-agent, openclaw-agent-db-permissions.ts:27-29, chmods unconditionally, with no existsSync at all. Its own comment says that is deliberate: "an existsSync guard would just reintroduce the TOCTOU window."

So on the per-agent path a main-file ENOENT is the ordinary pre-create case: callers ensure permissions on a database path that does not exist yet, and the swallow is what makes that work. Making it fatal turns first-run and preflight into hard failures, which is what those 12 tests are.

Recovering the same protection there would need the file's existence established before the sweep, which is the TOCTOU window that comment is explicitly avoiding. That looks like a real design question about the per-agent sweep rather than a mechanical mirror of this PR, so I do not think it belongs in this change.

I have reverted the attempt; the branch carries only the shared-state repair it started with. Happy to be told I have misread the per-agent contract, or to open a separate issue for it if you would rather track it.

Branch state at af89e343e26: src/state 543 tests, 535 passed, 7 skipped, and the one failure I first saw (openclaw-state-ownership.test.ts > does not expose rolled-back ownership from a rollback-journal race) does not reproduce: 23 of 23 three times on a clean tree, and 23 of 23 on main. I had measured it mid-revert with a dirty tree.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 24, 2026
@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from af89e34 to e58fbb8 Compare August 24, 2026 22:22
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 24, 2026
@ayaangazali
ayaangazali force-pushed the fix/state-db-sidecar-chmod-enoent-race branch 2 times, most recently from b4e63b5 to 44d137d Compare August 25, 2026 22:32
@ayaangazali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (44d137d4543), 0 behind. The three red checks here are GitHub API failures, not this branch, and I want that on the record so the PR does not read as broken.

security-sensitive-guard-detect : 500 Internal Server Error
dependency-guard-detect         : 500 Internal Server Error
auto-response                   : Server Error: "Sorry, this diff is temporarily
                                  unavailable due to heavy server load."
                                  {"resource":"PullRequest","field":"diff","code":"not_available"}

All three are guard/automation workflows that call the GitHub API and got 500s or a temporarily-unavailable diff back. None of them ran a test, and there is no test failure anywhere in those jobs.

Worth noting for anyone triaging by check colour: these are exactly the checks a reader would expect to mean "this PR touches security-sensitive paths and failed review". They do not. security-sensitive-guard-detect never got far enough to evaluate the diff.

The substantive state of the PR is unchanged from the last review round: the main-file ENOENT boundary is scoped to sidecars, the regression fails on the unfixed condition, and the two-process real-relay proof is in the body. src/state is 543 tests, 535 passed, 7 skipped locally at this head.

Nothing to push. These should clear on any re-run that lands while the API is healthy.

@ayaangazali

Copy link
Copy Markdown
Contributor Author

The three red checks here are all the same GitHub-side failure, not this branch.

security-sensitive-guard-detect, dependency-guard-detect and auto-response each ended with 500 Internal Server Error and exit 1 (job logs 97992072775, 97992073709, 97992073543). No guard evaluated the diff, so none of those marks carries a security or dependency signal. The same guard failed identically on #120736 in the same window, which places it on the API rather than on either branch.

This is the second time these three have gone red this way here, so rather than leave the marks sitting, I rebased onto current main (the branch was 211 behind, no conflicts) to get a fresh run. src/state is 542 passed / 7 skipped at the new head b55af763330.

The change itself is unchanged: one existsSync guard so a sidecar deleted between the directory scan and the chmod does not abort state-database hardening.

ayaangazali and others added 4 commits August 29, 2026 15:49
…base

ensureOpenClawStatePermissions checked existsSync on each SQLite sidecar and
then chmodded it. SQLite deletes -wal and -shm at checkpoint or close, so a
concurrent opener can remove a sidecar inside that window. ENOENT is not in
CHMOD_UNSUPPORTED_CODES, so applyPrivateModeSync rethrew it and the database
open failed outright.

A sidecar that no longer exists has nothing left to harden, so treat ENOENT as
a skip and keep every other chmod fault fatal. The agent database sweep in
openclaw-agent-db-permissions.ts already does this; the state sweep was left
behind when both files were split out of their monoliths.

Keeps the existsSync fast path: unlike the agent sweep, the state sweep
classifies EPERM and EROFS through hasRestrictivePermissions, which needs the
target to exist, so chmodding absent candidates would make those codes fatal.
… guard

The assertion-safety ratchet grandfathers this file at zero uncommented type
assertions, and `(error as NodeJS.ErrnoException).code` added one. src/infra/errno.ts
already owns this narrowing, so use hasErrnoCode instead of annotating a cast.
…cars

resolveSqliteDatabaseFilePaths lists the unsuffixed database first, so the
ENOENT skip added for transient sidecars also swallowed the main database
disappearing between the existence check and the chmod. That turned a
fail-loud boundary into a silent fall-through to a SQLite open that would
create a fresh empty database instead of surfacing the loss.

Confine the skip to sidecar candidates and cover the main-file case.
@obviyus
obviyus force-pushed the fix/state-db-sidecar-chmod-enoent-race branch from b55af76 to 1ff92f6 Compare August 29, 2026 13:53
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 29, 2026
@obviyus
obviyus merged commit f5eea31 into openclaw:main Aug 29, 2026
262 of 263 checks passed
@obviyus

obviyus commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Thanks @ayaangazali!

Proof: Exact current main failed the real shared-state open when each existing SQLite sidecar disappeared before chmod. Exact head 1ff92f61d55bd2214a83561b9373b998b8568f7d opened successfully for -wal, -shm, and -journal, kept main database loss fatal, passed 191 focused state tests, and passed exact-head CI run 33256187233.

  • Bug: A normal SQLite sidecar cleanup race could abort Gateway or command-line startup with ENOENT even though the state database was healthy.
  • Fix: The shared-state permission owner now skips only a vanished sidecar and keeps required-file and permission failures loud.

Example

Before After
A disappearing openclaw.sqlite-shm aborts state database open. State database open continues because the optional sidecar no longer needs hardening.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 30, 2026
Keep shared state database opens alive when SQLite removes a transient WAL, shared-memory, or rollback-journal sidecar during permission hardening.

Ignore only sidecar `ENOENT` after a positive existence check. Keep main database loss and every other permission error fatal.

Co-authored-by: Ayaan Gazali <[email protected]>

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants