Systematically audit and clean up all-language SDKs: docs, tests, comments, logic fixes, deduplication

Author: PangjipingCreated Sep 8, 2026Updated Sep 15, 2026

Summary

Systematically review and clean up all OpenSandbox SDKs across languages (sdks/sandbox/{python,javascript,kotlin,csharp,go}, sdks/code-interpreter/*, sdks/mcp/sandbox/python, sandbox/kotlin/code-interpreter), covering documentation, tests, comments, code logic, and duplicate-code abstraction.

Motivation

The SDKs grew feature-by-feature and across five languages. Drift has accumulated: outdated docs, inconsistent test depth, noisy/stale comments, language-specific logic bugs, and repeated logic that should live in shared handwritten adapters. A systematic pass is needed to bring them to a consistent, maintainable baseline.

Audit Dimensions

  1. Documentation fixes

    • Correct outdated examples, wrong parameter descriptions, broken links in READMEs and docstrings
    • Align quick-start samples with current server behavior
    • Ensure each language SDK README documents the same feature set; note language gaps explicitly
  2. Test governance

    • Inventory test coverage per language/SDK; identify and fill critical gaps
    • Remove flaky/duplicate/meaningless tests; standardize test structure and naming
    • Align cross-language behavioral coverage for identical capabilities (mirror tests in tests/ where applicable)
  3. Comment governance

    • Remove stale/misleading comments and commented-out dead code
    • Keep docstrings accurate and consistent in style per language conventions
    • No noisy inline comments restating the code
  4. Code logic fixes

    • Fix language-specific bugs and behavior drift against specs/ (auth, retry, timeout, error mapping, lifecycle methods)
    • Align error handling and typed exceptions/errors across languages
  5. Duplicate code abstraction

    • Extract repeated logic (URL building, retry/backoff, pagination, auth refresh, multipart upload) into shared handwritten modules per language
    • Keep generated code untouched; abstractions live in handwritten adapters only
    • Where multiple languages repeat the same design, document the common pattern in sdks/AGENTS.md

Guardrails

  • Generated code paths (e.g. sandbox/python/src/opensandbox/api/**, sandbox/javascript/src/api/*.ts, sandbox/kotlin/sandbox-api/build/generated/**) must not be hand-edited as the fix
  • No public API breaking changes; behavior changes must follow specs/ and be aligned across languages
  • Work should land as per-language incremental PRs, not one big-bang change

Suggested Execution

  • Phase 0: audit report (per language x dimension matrix of findings)
  • Phase 1..N: per-language cleanup PRs, ordered by severity (logic fixes first, then tests, docs, comments, abstraction)

Acceptance Criteria

  • Audit report checklist fully triaged (fixed or explicitly wontfix with reason)
  • All SDK unit tests pass per language with their standard toolchain
  • Cross-language e2e tests in tests/ pass
  • READMEs/docstrings accurate; no dead code from this effort remains

Source: opensandbox-group/OpenSandbox