Agent Sandbox Registry

agent-sandbox

Decision: P0+P1 Overdesign Cleanup

无中文版

.agents/notes/implemented/architecture/2026-09-23-overdesign-cleanup.md

Decision: P0+P1 Overdesign Cleanup

Status: implemented

Problem

The codebase contained several over-engineered abstractions and unused features that added complexity without serving the current use case (project not yet live, no external consumers):

  1. integrations/ — Empty plugin system with only an abstract base class
  2. session/base.py — Abstract SessionStore base class with only one concrete implementation (LocalSessionStore)
  3. TEMPLATE_CATALOG phantom entries — Three templates (code-interpreter, python-data-science, full-stack) referenced in inference but never backed by real template YAML/Dockerfile
  4. check_capability runtime gating — 14 call-sites checking capabilities at runtime that added overhead without protecting against real misconfiguration
  5. Multi-format serializer — PICKLE and MSGPACK serialization modes in @sandbox decorator that were never exercised in practice
  6. macOS Keychain integration — Platform-specific keychain via subprocess calls in SecretStore, adding platform/subprocess imports for a feature not validated on CI
  7. qwen-cli / qwen-browser documentation — Docs referenced non-existent CLI tools and browser agents

Decision

Delete all P0+P1 overdesign items in a single coordinated cleanup. The project has no live consumers, so no backward-compatibility shims are needed.

What was deleted

Item Files removed Files modified
integrations/ src/agent_sandbox/integrations/ (2 files), tests/test_integrations/ 4 docs files
SessionStore ABC src/agent_sandbox/session/base.py session/local.py, session/__init__.py, api/session_manager.py, 4 docs
TEMPLATE_CATALOG phantoms — agent/infer.py, 3 test files, 4 docs
check_capability gating — api/capability.py, api/commands.py, api/files.py, api/code.py, api/network.py, api/sandbox.py, 3 test files
PICKLE/MSGPACK serializer — declarative/serializer.py, declarative/decorator.py, 2 test files
macOS Keychain — utils/keychain.py, 1 test file
qwen-cli docs — 4 docs files

What was preserved

API Design

# Public-surface changes from the cleanup:
# Removed:   integrations plugin base, SessionStore ABC (session/base.py),
#            runtime check_capability() gating call-sites, PICKLE/MSGPACK serializer modes,
#            macOS Keychain path in SecretStore
# Preserved: ResolvedCapabilities, resolve_capabilities(), CapabilityNotSupportedError (E3004),
#            LocalSessionStore, file-based SecretStore

Alternatives considered

Dependencies

No new dependencies. Removed implicit dependencies on cloudpickle, msgpack, platform, and subprocess from affected modules.

Test Strategy

Acceptance criteria

Post-cleanup follow-ups (2026-09-23)

Additional doc/config/test alignment performed after adversarial review:

Documentation alignment

Test/example alignment

Code robustness

Dependency sync

Breaking changes record