fix(transcend): skip repository copies in scratchpads

A scan on the real host offered 4276 candidates, 4253 of them files of two repository copies in one peer's scratchpad. scratch_candidates now walks with os.walk, skips any directory holding .git, roles, plugins, pyproject.toml, package.json or a Makefile, and descends at most one level below a scratchpad; the real scan drops to 59 candidates. test_transcend adds a nested helper that stays, a deeper one and a repository copy that drop out (negative control against the unfiltered scan fails).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-03 17:57:08 +01:00
1 parent 194f5e28bd
commit 3e2f7a7ddb
3 files changed
+25 -6

No files matched your search

+5
View File
@@ -40,6 +40,10 @@ class TestTranscend(unittest.TestCase):
self._write(self.own / "auth_token.py", "secret")
self._write(self.own / "big.py", "x" * 1_000_001)
self._write(self.peer / "helper.sh", "echo hi")
self._write(self.peer / "probe" / "nested.py", "print(2)")
self._write(self.peer / "probe" / "deep" / "too_deep.py", "print(3)")
self._write(self.peer / "copy" / "pyproject.toml", "[project]")
self._write(self.peer / "copy" / "copied.py", "print(4)")
for name in ("kvb-x", "caveman", "custom"):
self._write(self.home / ".claude" / "skills" / name / "SKILL.md", name)
self._write(self.home / ".codex" / "rules" / "default.rules", "allow")
@@ -78,6 +82,7 @@ class TestTranscend(unittest.TestCase):
"probe.py": ("own", "self", "script"),
"test_probe.py": ("own", "self", "test"),
"helper.sh": ("peer", "Peer", "script"),
"nested.py": ("peer", "Peer", "script"),
"custom": ("home", "operator", "skill"),
"default.rules": ("home", "operator", "rule"),
},