Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
fix(ingestion): index e2e specs so they can get a wiki page (#1842)
Nehal kanak kuniyil thottathil0bc04e94db65
diff --git a/packages/core/src/repowise/core/ingestion/traverser.py b/packages/core/src/repowise/core/ingestion/traverser.pyindex d628db670..c8e791b7f 100644--- a/packages/core/src/repowise/core/ingestion/traverser.py+++ b/packages/core/src/repowise/core/ingestion/traverser.py@@ -222,10 +222,20 @@ _BLOCKED_DIRS: frozenset[str] = frozenset(# is_test_related_path() so downstream consumers can filter them# when appropriate.#+ # e2e/ used to sit here because Playwright/Cypress rigs were+ # treated as browser-driven test scaffolding whose content rarely+ # answers code questions. But end-to-end specs are exactly where a+ # codebase's hard-won conventions live -- the hydration gate every+ # console e2e test depends on, the fixtures everyone must use -- and+ # silently dropping them left the wiki unable to answer any+ # test-infrastructure question with no signal a whole area was+ # missing. e2e files are now indexed like other tests and tagged+ # is_test=True via is_test_related_path(), so they get a file_page+ # and stay filterable when a consumer wants to exclude them.+ ## The following ARE still blocked because they typically hold- # binary fixtures, generated artifacts, or browser-driven test- # rigs whose content rarely answers code questions:- "e2e",+ # binary fixtures, generated artifacts, or scaffolding whose content+ # rarely answers code questions:"fixtures","conftest",}diff --git a/tests/unit/ingestion/test_traverser.py b/tests/unit/ingestion/test_traverser.pyindex be559b739..cd1db6f29 100644--- a/tests/unit/ingestion/test_traverser.py+++ b/tests/unit/ingestion/test_traverser.py@@ -190,6 +190,35 @@ class TestFileTraverser:assert not any(p.startswith("Library/") for p in paths)assert not any(p.startswith("Temp/") for p in paths)+ def test_traverses_e2e_specs(self, tmp_path: Path) -> None:+ """e2e spec files are indexed so they can get a file_page (#1497).++ They used to be silently dropped via ``_BLOCKED_DIRS``, which left+ the wiki unable to answer any test-infrastructure question with no+ signal a whole area was missing. They are now indexed like other+ tests and tagged ``is_test=True`` so they stay filterable.+ """+ (tmp_path / "apps" / "console" / "e2e" / "helpers").mkdir(parents=True)+ (tmp_path / "apps" / "console" / "e2e" / "helpers" / "hydration.ts").write_text(+ "export function hydrate() {}\n"+ )+ (tmp_path / "apps" / "console" / "e2e" / "fixtures.ts").write_text(+ "export const fixtures = {};\n"+ )+ (tmp_path / "apps" / "console" / "e2e" / "login.spec.ts").write_text(+ "it('works', () => {});\n"+ )++ traverser = FileTraverser(tmp_path)+ infos = {f.path: f for f in traverser.traverse()}++ assert "apps/console/e2e/helpers/hydration.ts" in infos+ assert "apps/console/e2e/fixtures.ts" in infos+ assert "apps/console/e2e/login.spec.ts" in infos+ # Tagged as test material so consumers (skip_tests, scoring) can+ # filter them without dropping them silently.+ assert all(info.is_test for info in infos.values())+def test_skips_unity_asset_extensions_before_binary_detection(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: