Skip to content

emrg: sandbox default rule — configured wins, else workspace-write - #895

Merged
argszero merged 1 commit into
masterfrom
feature/sandbox-unified-default
Aug 20, 2026
Merged

emrg: sandbox default rule — configured wins, else workspace-write#895
argszero merged 1 commit into
masterfrom
feature/sandbox-unified-default

Conversation

@argszero

Copy link
Copy Markdown
Owner

Simplify sandbox tier resolution in _resolve_sandbox (scheduler.py), per host rant 2026-08-20T18:05:20.

Before: explicit sandbox → config.sandbox (excluding danger-full-access) → task-name builtin defaults (emrg-task → workspace-write, *-opensource-task → read-only) → None (= implicit danger-full-access).

After: tasks.yml sandbox: / config.sandbox wins when set to any valid mode (read-only / workspace-write / danger-full-access), otherwise the unified default is workspace-write. No name-based special cases, no implicit danger-full-access fallback.

Tests: +1 pinning the rule (name-based cases removed, invalid values fall through to default); pytest 982 passed + 1 skipped (was 981); Agent.md count synced 982→983.

Rant 2026-08-20T18:05:20: remove task-name builtin defaults and the
implicit danger-full-access fallback from _resolve_sandbox. Unified rule:
tasks.yml sandbox field / config.sandbox wins (any valid mode), otherwise
the default is workspace-write. Add test pinning the rule (982->983).

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 1 (3 files +48/−16: _resolve_sandbox unified rule — configured value wins for any valid mode, else default workspace-write; name-based builtin defaults and implicit danger-full-access removed; test pins explicit>config>default precedence and invalid-value fallback; pytest 982 passed + 1 skipped, Agent.md 982→983 synced; test + test-windows CI PASS)

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 2 (independent re-review: signature (name,config,explicit)→(config,explicit) consistent with the single call site; name-based builtin defaults and the old cand != "danger-full-access" filter removed — explicit danger-full-access is now honored, matching the 'configured wins, any valid mode' rule; default workspace-write; tests pin explicit>config>default precedence, no name special-casing, and invalid-value fallback. pytest 982 passed + 1 skipped, test + test-windows CI PASS)

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 3 (fresh re-review: head 5809877 unchanged, diff identical to prior reviews; unified rule — configured wins for any valid mode, default workspace-write; tests pass 982 + 1 skipped locally; test + test-windows CI PASS)

@argszero
argszero merged commit 742a9eb into masterAug 20, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 20, 2026
* emrg: remove Ask/Auto mode — session sandbox three-tier switcher
Rant 2026-08-20T18:18: the orthogonal Ask/Auto dimension is dropped;
every interactive message allows tools, and file permissions are
controlled by a per-session sandbox tier (read-only / workspace-write /
danger-full-access, default workspace-write).
- daemon.py: allow_tools always True (mode=ask empty-tool-set branch
removed); ask_injected stays for signature compat, always False
- GUI: mode-switcher (Ask/Auto) → sandbox-switcher three-tier control;
state.mode → state.sandbox; sendMessage/queuedSends carry sandbox
- main.js + daemon_client.js: sandbox passthrough on every task message
- i18n: composer.sandboxTitle/ReadOnly/WorkspaceWrite/FullAccess added,
composer.modeTitle + app.askModeNotice removed
- tests: app-commands setMode → setSandbox; smoke queuedSends sandbox;
daemon_client payload asserts sandbox default; ws_e2e ask-empty-tools
→ sandbox-queued-keeps-tools
* emrg: sync Agent.md Python test count 983→984 (#895 added one test)
---------
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
argszero added a commit that referenced this pull request Aug 20, 2026
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/sandbox-unified-default branch August 23, 2026 02:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero