Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 24, 2026, 8:45 AM ET / 12:45 UTC. ClawSweeper reviewWhat this changesThis PR adds an opt-in Merge readiness⛔ Blocked until stronger real behavior proof is added - 7 items remain Keep open: this protected maintainer draft still owns the linked lifecycle feature, but it is dirty against current main and lacks current-head final-effect proof that an old owner cannot delete a new owner’s sandbox. Priority: P2 Review scores
Verification
How this fits togetherSandbox configuration creates a runtime and workspace keyed to a session owner. Session lifecycle handlers and stale pruning later coordinate resource removal while locks and registry rows protect reuse and cleanup retries. flowchart LR
Config[Sandbox lifecycle setting] --> Owner[Session owner]
Owner --> Runtime[Runtime browser and workspace]
Owner --> End[Reset delete or rollover]
End --> Locks[Admission and scope locks]
Locks --> Cleanup[Backend registry and workspace cleanup]
Cleanup --> Retry[Pending cleanup or stale-prune recovery]
Decision needed
Why: This adds a durable operator configuration and plugin-facing contract around destructive session-owned resource cleanup; implementation evidence cannot decide the permanent product boundary. Before merge
Findings
Agent review detailsSecurityNeeds attention: Destructive cleanup is owner-authorized, but the current-head evidence does not prove that a different or reassigned owner is rejected before backend and filesystem removal. PR surfaceSource +3202, Tests +3927, Docs +63, Generated 0. Total +7192 across 69 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the lifecycle design onto current main, preserve its backend-target contract, then land only after the opt-in config and SDK contract are sponsored and real Docker evidence proves both allowed cleanup and forbidden-owner preservation. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug report: this is a new opt-in lifecycle feature. The supplied prior Docker run demonstrates some behavior, but not the current head or the forbidden-owner case needed for merge evidence. Is this the best way to solve the issue? No: the lifecycle shape is plausible, but the dirty base omits current main's Podman ownership contract and the destructive owner boundary remains unproven on the reviewed head. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e30279f89ff5. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Rebased onto current main (post #99816/#99817). Conflict resolutions:
Local proof on head 165e68c: Remaining before merge per prior review: sandbox/session-owner security sign-off on |
87ac766 to
165e68c
Compare
|
Retiring this stale branch. Session-end sandbox destruction changes durable cleanup and reset/delete/rollover semantics across 69 files, and the sandbox registry and session owners have since moved (SQLite worker operations, #175837), so it conflicts. Idle and max-age pruning stay the supported cleanup. Closed in a sweep of maintainer PRs open longer than a week. Reopen with a current reproduction if this still matters. |
Closes #98516
What Problem This Solves
Long-running digital-employee and team-operations sessions can need an isolated sandbox that persists across turns in the same owner scope, but still gets cleaned up deterministically when the owning session resets, is deleted, rolls over, or becomes stale. Before this change, session-scope sandbox ownership and cleanup semantics were not managed as one lifecycle, which made deterministic reuse and terminal cleanup harder to reason about for operators.
Why This Change Was Made
This adds an opt-in managed lifecycle for ephemeral session-owned sandboxes using the existing sandbox backend, Docker, registry, workspace, and reset/session primitives. The implementation records lifecycle ownership, locks scope cleanup, reuses the same sandbox inside the owner scope, blocks conflicting reset/delete/compaction work while cleanup is pending, removes terminal runtime/workspace resources, and keeps idle/age pruning as crash-recovery retry behavior.
AI-assisted implementation disclosure: this draft was prepared with AI assistance. No transcript attachment is included.
User Impact
Operators can enable session-scoped sandboxing for long-running agents and expect stable reuse within a session owner plus deterministic cleanup on reset/delete/rollover. Sandboxing remains opt-in; this does not introduce a global default sandbox requirement or a breaking runtime default.
Evidence
codex/managed-sandbox-lifecycleat87ac76653d217d6b7560257102a1eb0c4856b3f5node scripts/run-vitest.mjs src/gateway/server.sessions.compaction.test.ts src/agents/sandbox/prune.test.ts src/agents/sandbox/lifecycle.test.ts-> 2 Vitest shards, 54 tests passed.node scripts/run-vitest.mjsover sandbox lifecycle/scope/registry/prune/manage/SSH/Docker/media/session/gateway/extension tests -> 6 Vitest shards, 755 tests passed.tbx_01kwfsm0ghknxt7qfpe945k9w8, providerblacksmith-testbox, Actions https://github.com/openclaw/openclaw/actions/runs/28549202714, passed. Marker:DOCKER_LIFECYCLE_PROOF, head87ac76653d217d6b7560257102a1eb0c4856b3f5, reusedtrue, removed 1 container and 1 workspace, 0 failures.tbx_01kwfs806qdy3zdybdmmj1nmqj, providerblacksmith-testbox, Actions https://github.com/openclaw/openclaw/actions/runs/28548859859. It failed only in core test typecheck forsrc/commands/daemon-install-helpers.test.ts, which this PR does not touch.tbx_01kwfscbzbkc4b0c3vh67jx9h0, providerblacksmith-testbox, Actions https://github.com/openclaw/openclaw/actions/runs/28548971551, exact maineb417fa206e6ec76df12c500d08f8fd8691298e9; reproduced the samesrc/commands/daemon-install-helpers.test.tsTS2741/TS2322 failures. This PR does not patch that unrelated mainline failure..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --codex-bin /Applications/Codex.app/Contents/Resources/codex-> clean, no accepted/actionable findings.git diff --check origin/main...HEAD-> passed.Risks / Non-goals
daemon-install-helperstest-type failure until main is fixed.