{"category_id":"repository","default_severity":"error","description":"Tracked .pyc, .pyo, .tsbuildinfo, .bak, .orig, .backup, .log and .err filenames, exact .DS_Store, Thumbs.db, .eslintcache and .coverage basenames, Coverage.py parallel data filenames, and every path under a _backups, _chats, .firecrawl, .pytest_cache or .mypy_cache directory need review as local residue. Matching is case-insensitive. Parallel data filenames require the generated hostname, process ID and random suffix shape. Other directories grant no exemptions.","examples":[{"after":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"src/package/client.py\"]}","before":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"src/package/client.py\",\"src/package/__pycache__/client.cpython-315.pyc\"]}","expected_severity":"error","id":"sarj-artifact-local-residue-bytecode","language":"json","title":"Retain Python source and untrack its local cache"},{"after":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"tsconfig.json\"]}","before":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"tsconfig.json\",\"tsconfig.tsbuildinfo\"]}","expected_severity":"error","id":"sarj-artifact-local-residue-build-cache","language":"json","title":"Retain build settings and untrack incremental state"},{"after":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"assets/theme.css\"]}","before":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"assets/theme.css\",\"assets/Thumbs.db\"]}","expected_severity":"error","id":"sarj-artifact-local-residue-desktop-metadata","language":"json","title":"Retain the asset and untrack desktop thumbnail metadata"},{"after":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"eslint.config.ts\"]}","before":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"eslint.config.ts\",\".eslintcache\"]}","expected_severity":"error","id":"sarj-artifact-local-residue-eslint-cache","language":"json","title":"Retain lint settings and untrack local lint state"},{"after":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"services/ledger/tests/test_amount.py\"]}","before":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\"services/ledger/tests/test_amount.py\",\"services/ledger/.pytest_cache/v/cache/nodeids\"]}","expected_severity":"error","id":"sarj-artifact-local-residue-pytest-cache","language":"json","title":"Retain the test and untrack pytest's local cache"},{"after":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\".coveragerc\"]}","before":"{\"manifest\":\"repository_id = \\\"example-repository\\\"\\ncomponents = []\\n\",\"tracked\":[\".coveragerc\",\".coverage.worker.pid4242.Xabc123x\"]}","expected_severity":"error","id":"sarj-artifact-local-residue-coverage-data","language":"json","title":"Retain coverage settings and untrack measured state"}],"fix":"Review the file's behavior and distribution contract. Untrack disposable output and ignore future copies; gitignore does not affect existing tracked files. Retain required fixtures or runtime artifacts with an existing exact, dated fingerprint exception. Do not rename the file or delete a distinct test contract merely to silence the finding.","kind":"rule","references":[],"rule_id":"repository/artifacts/local-residue","rule_version":3,"slug":"local-residue","source":{"path":"src/repo_standards/policy_sarj/policy.py","symbol":"repository/artifacts/local-residue"},"title":"Review tracked caches, backups, logs, coverage data and OS metadata","topic_id":"artifacts","why":"Interpreter bytecode, incremental build or lint state, coverage data and desktop metadata can drift from checked source or local tools. Some distributions and fixtures are intentional, so a matching filename is review evidence rather than proof that deletion is safe."}
