Decision: Open-source hygiene sweep and check-no-local-paths guard
Status: implemented
Problem
Before the cli repository is published, files inherited from the original single
repository still carried developer-machine specifics: an absolute home-directory
path used as a working directory, .venv/bin/python assumptions, a personal ACR
namespace and fixed e2e tags in deploy scripts and .env.example, agent
scratch locations under the system temp directory in docs/PORTING.md, a personal home directory in sample command
output, and real sandbox / template identifiers captured in the e2e workflow guide.
Decision
- Fix each finding the way a public-repo maintainer would:
- Scripts and benchmarks resolve the repo root from their own location
(
$(dirname "${BASH_SOURCE[0]}")/..,import.meta.url), never from a fixed path. - The
abxexecutable comes fromPATH, overridable withABX_BIN(benchmarks/bench_cli_startup.mjs,scripts/*.sh). scripts/build_hermes.sh,deploy_all_templates.sh,deploy_remaining.sh:ACR_NAMESPACEis required (no personal default),TAGdefaults todev,REGIONdefaults tocn-hangzhou,DOCKER_PLATFORMdefaults tolinux/amd64(sandbox runtime architecture), result summaries go to amktempfile (RESULTS_FILEoverrides) instead of fixed temp-directory file names, the wheel is the newestpython-sdk/dist/agent_sandbox-*.whl(WHEELoverrides)..env.example:ACR_NAMESPACE=<your-namespace>.docs/PORTING.md: scratch paths replaced by$ORIG_REPO/$ORACLE_VENV.- Docs: user-home absolute paths to
.abx/and.cursor/mcp.jsonbecame~/...; real sandbox UUID and template IDs ine2e-template-workflow.md(en/zh) became placeholders. - Ignored
.agents/evidencelogs scrubbed of local file URLs under user homes and agent-cache paths (they are gitignored today but would leak if un-ignored). - 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:
npm run check:hygiene,make hygiene(also part ofmake ci), and a step in thelintjob of.github/workflows/ci.yml.
Rationale
- Product names such as "Qoder" (the agent integration documented in
SKILL.md,docs/) are legitimate; only the path forms (Documents/Qoder,Qoder/<date>-...) are rejected./home/user(the sandbox's default home) is exempt. - The allowlist keeps the guard strict by default while letting the repo-health checker (which contains the detection regexes) pass.
Known gaps
docs/design/repository-layout.md(split audit) quotes the leaks it describes and is allowlisted temporarily; remove the entry once the literal paths are scrubbed..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.