Repository navigation
fix(agents): guard vanished workspaces - #88485
Conversation
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed May 31, 2026, 9:09 PM ET / 01:09 UTC. Summary PR surface: Source +520, Tests +530, Docs +2. Total +1052 across 17 files. Reproducibility: yes. Source inspection on current main shows an empty workspace with missing state and no Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the guard after CI completes and maintainers explicitly accept the fail-closed workspace contract, or move the attestation into the shared state DB before merge if the file-backed exception is not acceptable. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows an empty workspace with missing state and no Is this the best way to solve the issue? Yes, if maintainers accept the fail-closed contract. The fix is in the workspace owner boundary, preserves first-run bootstrap, and includes cleanup paths; the remaining question is policy around marker persistence and upgrade behavior. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 570e2db25210. Label changesLabel justifications:
Evidence reviewedPR surface: Source +520, Tests +530, Docs +2. Total +1052 across 17 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
ac1c4d6 to
b534585
Compare
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
b534585 to
0b42a65
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
e61c884 to
6eebd22
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Fixes #88333
Summary
Verification
pnpm test src/agents/workspace.test.tspnpm exec oxfmt --check --threads=1 src/agents/workspace.ts src/agents/workspace.test.ts docs/concepts/agent.md CHANGELOG.mdgit diff --checkReal behavior proof
ensureAgentWorkspaceno longer silently re-seedsBOOTSTRAP.mdand.openclaw/workspace-state.jsonover an agent workspace that was previously initialized and then disappeared or was wiped./Users/andy/openclaw/openclaw-88333on macOS, using the realsrc/agents/workspace.jsentrypoint through the repo tsx loader and a real temporary filesystem workspace under/tmp.node --import tsx --eval <script>where the script calledensureAgentWorkspace({ ensureBootstrapFiles: true }), verified the sibling.attestedmarker, removed the workspace directory, calledensureAgentWorkspaceagain, caught the thrown error code, and checked whetherBOOTSTRAP.mdor.openclaw/workspace-state.jsonhad been recreated.{ "attestedExists": true, "errorCode": "WORKSPACE_VANISHED", "bootstrapExists": false, "stateExists": false }WORKSPACE_VANISHED; the attestation marker remained the signal, and bothBOOTSTRAP.mdand workspace state stayed absent.Attribution
If maintainers squash or rework this PR, please preserve author attribution or include
Co-authored-by: Andy Ye <[email protected]>.