Repository navigation
feat(sandbox): label worker-owned containers - #55
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 1:55 AM ET / 05:55 UTC (Revision 11). ClawSweeper reviewWhat this changesAdds optional Docker container labels so supervising workers can identify containers belonging to a scan, with CLI help, documentation, and focused tests. Merge readiness✅ Ready for maintainer review Keep open: the capability is absent from current main and the latest release, and no blocking defect was found. The previous draft-state blocker is resolved. Priority: P2 Review scores
Verification
How this fits togetherClawScan runs command-backed scanners and judges through a shared Docker runner. The new labels connect those containers to a supervising worker's scan run; the worker remains responsible for cleanup after cancellation. flowchart TD
A[Supervising worker] --> B[ClawScan process]
B --> C[Docker command runner]
C --> D{Run ID supplied?}
D -->|Yes| E[Validate ID and attach labels]
D -->|No| F[Ordinary Docker container]
E --> G[Labeled Docker container]
G --> H[Worker selects and cleans up]
A --> H
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep container identification opt-in and generic, with cancellation cleanup owned by the supervising worker. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature request; source confirms existing containers lack ownership labels, and the body reports a real before/after worker-cancellation run. Is this the best way to solve the issue? Yes: adding labels at the shared Docker runner is a narrow solution that supports scanners and judges while preserving existing execution and cleanup behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ca811e0e73ce. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Allow supervising workers to identify and clean up their own scan containers after cancellation. Preserve unsupervised behavior and keep deletion ownership with the supervisor. Replace redundant mount slice comparison with slices.Equal. Co-authored-by: Jesse Merhi <79823012+jesse-merhi@users.noreply.github.com>
41d779a to
556dc83
Compare
Supervisors can set
CLAWSCAN_SANDBOX_RUN_IDto identify Docker containers belonging to a terminated scan and clean them up without touching unrelated work. Each container gets the supplied run ID and a random command ID; ordinary runs retain their existingdocker run --rmbehavior. Cleanup remains the supervisor’s responsibility.The implementation validates run IDs, does not implicitly forward the ID into the container environment, and documents the ownership contract. The nearby duplicate mount-comparison helper now uses Go’s equivalent
slices.Equal.Contributor proof: the same real worker deadline left one container before this change and zero afterward; an unrelated container survived. Regression tests cover ordinary runs, invalid IDs, unique command IDs, and environment isolation.
Validation on Go 1.27.1/Linux:
go test -count=1 ./...,go vet ./...,make docs-site, and the built-in static scanner CLI smoke test all passed on AWS Crabbox. Independent Codex review is clean through P2. GitHub checks must pass on the exact PR head before merge.