Repository navigation
fix(sop): provide a default sandbox and validate sandbox selection - #176
Conversation
|
LoopForge PR Review Bot
Checks performed (isolated worktree):
Code check: the new No blocking issues found. Removing the hardcoded |
e2e7cc5 to
cf7cd01
Compare
|
LoopForge PR Review — head Verdict: ✅ Pass
|
PR #176 review — head
|
Stored local — step 2 |
No row (fallback) — step 2 | Fallback — summary |
|---|---|---|
![]() |
![]() |
![]() |
No page errors.
Non-blocking design note
- Where:
internal/repo/sandbox_defaults.go:15-16andinternal/repo/catalog.go:339. The fallback isShared: truewithDriver: local. - Concern: outside Compose (
AGENTFLOW_LOCAL_SANDBOXunset),localexecutes on the platform host. An installation that never importedmigrations/seed/001_public_catalog.sqlpreviously had no host-execution sandbox. After this change it exposes one to every project. The seed row (本地执行(仅可信任务)) is also not markedshared. - Suggestion: consider giving the fallback a name that says host execution / trusted only (like the seed row), or not sharing it outside Compose. The behaviour is documented in
docs/deployment.md, so I am not blocking on it.
Executed checks
go test ./internal/repo -run DefaultSandbox, targeted./internal/httpapisandbox tests: ok.node --test webtest/tests/sop-sandbox-selection.test.mjs: 6/6.
|
✅ 结论:Approve(通过) 审查 head 结论:未发现阻塞问题,可以合入。 后端
前端向导
非阻塞建议
验证
|
|
LGTM |



What changed
A fresh database could serve the UI without any sandbox catalog rows. Creating a blank SOP then submitted the hardcoded
sandboxProfileId: "local"and failed withsandbox profile not found. Reproduced this using the published 0.3.4 image and a real browser: plain Compose startup produced an empty sandbox/template catalog and HTTP 400; running the complete installer against the same database restored the seeded profiles and made the unchanged UI succeed.The platform now provides a built-in default
localsandbox when that database row is absent. Both catalog listing and lookup expose it without writing seed data. Persisted operator configuration takes priority; database failures or malformed stored configuration do not trigger fallback. The default cannot be deleted. Compose's existingAGENTFLOW_LOCAL_SANDBOX=dockerpolicy still executes it in a separate Docker container; native deployment policy is unchanged. Project-scoped asset queries now include globally shared profiles while continuing to exclude private foreign/global assets.The SOP wizard also selects from actual project/shared/global profiles, preserves valid template settings, requires an explicit replacement for an unavailable regular-template profile, and keeps generic-template adoption on its existing clone endpoint. Defensive empty/stale-catalog guidance and refresh preserve the entered draft fields.
Scope
Compatibility
localprofiles retain their names, scope, driver and environment; the built-in fallback only applies when the physical row is absent. Other missing profile IDs still fail validation.localis reserved as the non-deletable default; operators can edit its persisted configuration or select another sandbox. Runtime Docker isolation and configured non-local drivers are preserved.Validation
go vet ./...,go test ./web -count=1 -timeout=180s, frontend syntax check,python3 scripts/check-public.py,bash scripts/scan-secrets.shandgit diff --check: passed.Safety