Skip to content

chore: replace machine-specific paths and internal hosts with placeholders - #529

Merged
amiddavid merged 3 commits into
mainfrom
docs/scrub-internal-paths
Oct 15, 2026
Merged

amiddavid merged 3 commits into
mainfrom
docs/scrub-internal-paths

Conversation

@OsherElhadad

@OsherElhadad OsherElhadad commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

What

Docs, code comments, a test fixture and the benchmark scripts contained one developer machine's home-directory paths, two personal laptop paths, and internal service and mail-relay hostnames. This PR replaces them. There is no change to the proxy's behaviour.

Where Before After
docs (REPRODUCE.md, extract_llm.md, skeleton.md, offload-reducers.md), Go comments absolute home-directory paths /path/to/... placeholders; $CG / $HARBOR in REPRODUCE.md
deploy/harbor/*.py, run-proxy.sh, run-bench.sh hard-coded checkout paths the checkout is found from the script's own location; Harbor and headroom come from HARBOR_DIR / HEADROOM_DIR (default: beside this checkout)
deploy/eval-containers/sweep.py a laptop path EVAL_ROOT (default: the parent of this checkout)
run027.sh, sweep_when.py, stage022.sh home-directory literals ~ / $HOME
AGENTS.md, deploy/service/REDEPLOY-caller-pays.md, proxy/mail_live_test.go, scripts/analysis/README.md internal hostnames, a personal path cg.example.com, mail-relay.internal.example.com, ~/cgssh2, "the eval box"
components/reformat/toolschema_test.go fixed capture paths CG_BENCH_DIR (the test still skips when no capture is present)
components/offload/testdata/read_lifecycle.json file paths under a home directory /work/context-guru/...

| deploy/service/prices.example.yaml (comments only), reference docs, comments | the internal gateway's service name | litellm-gateway |
| docs/hosted.md, REDEPLOY-caller-pays.md, dash/csp_test.go | the corporate address range | "the corporate network" |
| proxy/statsgate_test.go | remote-peer IPs in that range | 203.0.113.9 (TEST-NET-3) |

Left as is: public example hostnames (*.example.com, gw.internal in tests), the public Bob API URL, and a third-party path inside a quoted SWE-bench issue in apply/testdata.

Tests

  • mkdocs build --strict passes; prices.example.yaml still loads (internal/modelinfo table tests pass).
  • gofmt and go vet are clean; go test ./components/offload ./components/reformat ./apply passes.
  • Every changed Python script compiles (py_compile); every changed shell script passes bash -n.

@OsherElhadad OsherElhadad left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: APPROVE at f3e98b9. (Posted as a comment: GitHub does not let the author account approve.)

Completeness. I searched the whole tree at the head, not only the diff. These patterns have no hits: /home/vpcuser, vpcuser, cloud9, na.relay, res.ibm.com, ete-litellm, cg-program, cg-research, m2/, vpc-int, ai-models, u_ plus 22 characters, and private or corporate IP ranges outside test and doc examples. The only remaining hits are expected:

  • /Users/aldcroft/... inside the quoted third-party SWE-bench issue (apply/testdata/anthropic_tool_use.json)
  • www.w3.org/2000/svg namespaces
  • 9.9.9.9 (a public DNS resolver) as a forged hop in proxy/adversarial_test.go
  • *.ibm.com only as the public Bob API URL and as test or doc placeholders (cg.ibm.com, evil.ibm.com, cg.example.ibm.com, [email protected])

Gateway rename. litellm-gateway appears only in comments (internal/modelinfo, dash, apply). No code matches on the gateway name, so the rename cannot change behaviour.

Script paths. For deploy/harbor/*.py, parents[2] is the checkout and parents[3] is its parent, as intended. The HARBOR_DIR and HEADROOM_DIR fallbacks are siblings of the checkout. In the shell scripts, $(dirname "$0")/../.. is the checkout and ../../.. its parent. py_compile and bash -n pass on all 18 modified scripts.

Tests.

  • With CG_BENCH_DIR unset, TestCompactToolSchemasRealCaptures skips ("no captures on this machine") rather than failing.
  • gofmt and go vet are clean.
  • go test passes for apply, components/offload, components/reformat, dash (including CSP) and internal/modelinfo, so prices.example.yaml still loads.
  • For proxy, the stats, CSP, security, tenancy and adversarial tests pass. One full run under host load failed, and a second full run passed.
  • mkdocs build --strict passes.

Attribution. Both commits are by Osher-Elhadad and signed off, with no AI attribution.

Non-blocking nit: in deploy/eval-containers/sweep.py, DEPLOY = f"{ROOT}/lab-context-engineering/deploy/eval-containers" still assumes the checkout sits beside eval-containers/ under its old directory name. os.path.dirname(os.path.abspath(__file__)) would point at this checkout's own deploy/eval-containers.

Note: this cleans the current tree only. The removed strings are still in the public repository's earlier commits (git log -S'/home/vpcuser' finds 8 commits on main).

@OsherElhadad OsherElhadad left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: APPROVE at 889b886. The only change since f3e98b9 is one line: deploy/eval-containers/sweep.py now finds DEPLOY from its own path. Signed off, no AI attribution. This approval covers 889b886.

Osher-Elhadad added 3 commits October 15, 2026 13:14
…lders

Docs, comments, test fixtures and benchmark scripts named one developer
machine's home directory, two personal laptop paths, and internal service
and mail-relay hostnames.

- Docs and comments: /path/to/... placeholders, $CG / $HARBOR in
  REPRODUCE.md, cg.example.com and mail-relay.internal.example.com hosts.
- deploy/harbor and deploy/eval-containers scripts: the checkout is found
  from the script's own location; Harbor and headroom from HARBOR_DIR /
  HEADROOM_DIR (default: beside this checkout), eval root from EVAL_ROOT.
- reformat's capture-corpus test reads the four bench captures from
  CG_BENCH_DIR instead of a fixed home directory.
- read_lifecycle.json fixture paths are rooted at /work/context-guru.

Signed-off-by: Osher-Elhadad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants