Repository navigation
fix: evaluate SAM resource dependency cycles before reporting - #4755
Merged
kddejong merged 1 commit intoOct 21, 2026
Merged
Conversation
kddejong
approved these changes
Oct 20, 2026
proton0210
marked this pull request as draft
October 21, 2026 06:07
proton0210
marked this pull request as ready for review
October 21, 2026 06:09
kddejong
force-pushed
the
fix/sam-dependency-cycles
branch
from
October 21, 2026 17:35
2f884a2 to
44eb695
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4755 +/- ##
==========================================
- Coverage 94.68% 94.67% -0.01%
==========================================
Files 439 439
Lines 15910 15939 +29
Branches 3079 3085 +6
==========================================
+ Hits 15065 15091 +26
- Misses 463 465 +2
- Partials 382 383 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4749.
E3004 previously removed SAM edges only after discovering a cycle. That reported the non-SAM portion of false cycles and hid real cycles through SAM resources. Build a separate dependency graph before cycle detection, retaining dependencies of underlying CloudFormation resources and generated execution roles, and excluding properties belonging to separate generated stages, events and deployment preferences.
Cover the three reported templates, independent native cycles, execution-role policies, explicit roles with unused policies, and Ref/GetAtt/Sub/DependsOn self-dependencies. The original graph and template remain available unchanged to other rules.
This remains conservative for dependencies contributed solely by generated event resources; it does not restore the full SAM transform or add a translator dependency.
Validation: 15 focused tests passed, alongside the full unit suite. Three audit passes covered original-source reproduction, non-regression and edge-case checks, and final combined review (3,027 unit/integration tests passed plus the separate schema-updater test; four data tests retain the default exclusion).