{
  "id": 12821757,
  "title": "Ship a Scrubbed Mirror, Not Your Working Tree",
  "url": "https://urgent.news/2026/10/08/ship-a-scrubbed-mirror-not-your-working-tree",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-08T08:09:51.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/devrs_886/ship-a-scrubbed-mirror-not-your-working-tree-3c5k"
  },
  "original_language": "en",
  "account": "Do not place your everyday working tree on a free remote coding server, as it is not a clean source drop. The chat box is merely a label on the suitcase, while the checkout underneath still carries remote references, ignored files, and local notes. If any process can read the directory, you have already shared whatever remains in it. Only after defining what a scrubbed mirror can contain should you proceed. A borrowed desk in a shared office is a good analogy for this decision. Just as you would not unpack your entire backpack onto the desk, you should only take out the specific notebook pages needed for the task and leave your house keys in your bag. A remote coding server functions similarly, even when the invoice is zero and model calls are included. Your working tree is prepared for you, not for a stranger's process. Git remembers remote URLs, some of which may contain tokens or usernames that should not leave your machine. Files you intentionally ignore, such as environment files and local databases, remain readable by any tool pointed at the folder. Editor swap files, IDE folders, and stray notes accompany the code if you copy the directory as it stands. Uncommitted diffs pose a quieter issue because even a deleted line can contain a password you thought you had removed. This error occurs before you type, when the server receives the checkout. Write a careful prompt, as mistakes can happen even if the agent mistakenly lists the directory or opens git config. Treat the directory listing as the real request and the prompt as a comment beside that request. Construct the mirror on your own machine before any remote process exists. If the task requires an uncommitted patch, review the diff locally and copy only the hunks that pass the same gate. Do not use your normal clone as the source for this copy, as it retains the remote URL and object store. An archive of HEAD provides source text without the old remote configuration, as the archive does not include the git directory. Confirm this difference by checking git status for ignored files before considering the mirror complete. You still need the gate, as tracked files can still contain tokens that a cautious commit should not store. The example gate script below refuses a context bundle that still resembles a laptop tree and is not executed in this article. Extend patterns for your team's naming scheme and keep the file outside any bundle you plan to scan. Run the gate on a fixture that must fail and then run it on the mirror that must pass, before uploading anything. The script is saved as bundle_gate.py and can be run locally before any upload. Unexecuted example code for the gate is provided below.",
  "summary": "You should never place your everyday working tree on a free remote coding server, because that tree is a suitcase, not a clean source drop. The chat box is only the label on the suitcase, while the checkout underneath still carries remotes, ignored files, and local notes. If a model or a helper process can read the directory, you have already shared whatever the directory still holds. Start from…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}