Agent Sandbox Registry

python-sdk

Decision: Open-source hygiene sweep and check-no-local-paths guard

无中文版

.agents/notes/implemented/process/2026-10-12-open-source-hygiene.md

Decision: Open-source hygiene sweep and check-no-local-paths guard

Status: implemented

Problem

Before the python-sdk repository is published, files inherited from the original single repository still carried developer-machine specifics: an absolute home-directory path used as the benchmark working directory, .venv/bin/python in script usage text and evidence logs, a personal ACR namespace (as .env.example value and as an implicit default in the e2e scripts), a hard-coded abx invocation in the e2e scripts, and a personal home directory in sample MCP output.

Decision

  1. Fix each finding the way a public-repo maintainer would:
  2. Benchmarks and scripts derive paths from __file__ (Path(__file__).resolve()), never from a fixed location; benchmarks/bench_cli_startup.py (which hard-coded the author's directory and the removed Python CLI) no longer exists here - the CLI benchmark lives in the cli repository.
  3. Python entry points are invoked as python ... from the active interpreter (sys.executable where a subprocess is needed); usage text no longer says .venv/bin/python.
  4. scripts/e2e/e2e_build_and_test.py and scripts/e2e/quick_build_test.py require ACR_NAMESPACE (no personal default; clear exit message), registry/repo/tag stay overridable (ACR_REGISTRY, ACR_REPO, ACR_TAG).
  5. The abx executable used by scripts/e2e/cloud_e2e_test.py and examples/compat-demos/e2e_capability_validation.py comes from PATH, overridable with ABX_BIN.
  6. .env.example: ACR_NAMESPACE=<your-namespace>.
  7. Docs: a user-home absolute path to mcp.json became ~/.cursor/mcp.json.
  8. Ignored .agents/evidence logs: .venv/bin/python / .venv/bin/ruff replaced by python / ruff.
  9. Add a regression guard: scripts/check-no-local-paths.sh (bash + grep only, no rg) scans every tracked or untracked-but-not-ignored file for user-home paths, Windows user paths, Documents/Qoder / chat-N project directories, .venv/bin|Scripts/, agent scratch locations, the personal ACR namespace / fixed e2e tag, and AccessKey / API-key / token / private-key shaped strings (values are never echoed). Legitimate matches go into scripts/local-paths.allowlist (<path-glob>[|<regex>], narrow entries with a justification).
  10. Wire it in: make hygiene (also part of make ci) and a dedicated hygiene job in .github/workflows/ci.yml.

Rationale

Known gaps