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
- Fix each finding the way a public-repo maintainer would:
- 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 theclirepository. - Python entry points are invoked as
python ...from the active interpreter (sys.executablewhere a subprocess is needed); usage text no longer says.venv/bin/python. scripts/e2e/e2e_build_and_test.pyandscripts/e2e/quick_build_test.pyrequireACR_NAMESPACE(no personal default; clear exit message), registry/repo/tag stay overridable (ACR_REGISTRY,ACR_REPO,ACR_TAG).- The
abxexecutable used byscripts/e2e/cloud_e2e_test.pyandexamples/compat-demos/e2e_capability_validation.pycomes fromPATH, overridable withABX_BIN. .env.example:ACR_NAMESPACE=<your-namespace>.- Docs: a user-home absolute path to
mcp.jsonbecame~/.cursor/mcp.json. - Ignored
.agents/evidencelogs:.venv/bin/python/.venv/bin/ruffreplaced bypython/ruff. - Add a regression guard:
scripts/check-no-local-paths.sh(bash + grep only, norg) scans every tracked or untracked-but-not-ignored file for user-home paths, Windows user paths,Documents/Qoder/chat-Nproject 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 intoscripts/local-paths.allowlist(<path-glob>[|<regex>], narrow entries with a justification). - Wire it in:
make hygiene(also part ofmake ci) and a dedicatedhygienejob in.github/workflows/ci.yml.
Rationale
- Product names such as "Qoder" are legitimate in docs; only the path forms are
rejected.
/home/user(the sandbox's default home) is exempt. platform="linux/amd64"in the e2e build script is the sandbox runtime architecture, not a host assumption, and stays.- Default
cn-hangzhouregion /*.aliyuncs.comendpoints are public product defaults, not account identifiers.
Known gaps
docs/en/design/repository-layout.md(split audit) quotes the leaks it describes and is allowlisted temporarily; remove the entry once the literal paths are scrubbed..agents/evidence/research/*pypi*and*ai-native*(gitignored) mention the former personalanycodes/*placeholder project URLs; scrub them if the directory is ever un-ignored.client-sdk/tests/test_protocol/test_filesystem.pyusesC:\Users\test\...as Windows-path parser test data (allowlisted)..github/SECURITY.md/CODE_OF_CONDUCT.mdcontain the maintainer contact email on purpose (not checked)..env(gitignored, local) holds real credentials; it is never committed, but must not be copied into the published repository.