From e5abee240f60ebb39e6b909c0610c72daacd058a Mon Sep 17 00:00:00 2001 From: Tirth Kanani Date: Fri, 17 Jul 2026 15:41:22 +0100 Subject: [PATCH] feat(incremental): ignore AWS CDK synth output Port the safe cdk.out portion of PR #335 (commit 448e48c) with explicit root, nested-monorepo, and similarly-named-directory coverage. The irreversible *.bundle.js default is intentionally excluded. Co-authored-by: Gideon Zenz <91069374+gzenz@users.noreply.github.com> --- code_review_graph/incremental.py | 2 ++ tests/test_incremental.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/code_review_graph/incremental.py b/code_review_graph/incremental.py index a8ab7fdf..9d07be9c 100644 --- a/code_review_graph/incremental.py +++ b/code_review_graph/incremental.py @@ -128,6 +128,8 @@ def _run_temporal_resolver(store: GraphStore) -> Optional[dict]: # Dart / Flutter "**/.dart_tool/**", "**/.pub-cache/**", + # AWS CDK + "**/cdk.out/**", # General "/coverage/**", "**/.cache/**", diff --git a/tests/test_incremental.py b/tests/test_incremental.py index 1f4b6423..78f9b9d1 100644 --- a/tests/test_incremental.py +++ b/tests/test_incremental.py @@ -268,6 +268,15 @@ def test_root_output_defaults_do_not_hide_nested_source_directories(self): patterns, ) + def test_cdk_output_default_matches_at_any_depth(self): + """AWS CDK synth output is generated in root and monorepo projects.""" + from code_review_graph.incremental import DEFAULT_IGNORE_PATTERNS + + patterns = DEFAULT_IGNORE_PATTERNS + assert _should_ignore("cdk.out/manifest.json", patterns) + assert _should_ignore("packages/infra/cdk.out/asset.js", patterns) + assert not _should_ignore("packages/infra/cdk.output/source.ts", patterns) + def test_safe_dependency_defaults_still_match_at_any_depth(self): """The monorepo dependency case from #91 remains fixed.""" from code_review_graph.incremental import DEFAULT_IGNORE_PATTERNS