Repository navigation
fix(planner): Ignore has-many back-references in cycle detection - #100
Merged
Merged
Conversation
Cycle detection compared only the blueprint name and options, so a finite graph such as employee -> department -> employees was rejected because employee appeared twice on the expansion path even though the generated employees bind their department relation to the department that created them. The expansion stack now also records which relations a frame resolves through a structural back-reference, so a bound child no longer matches the unbound frame that started the chain. Recursion that rebinds a fresh parent on every level, such as a required self or mutual has-many, is still reported as a cycle.
Clarify that a has-many child bound back to the parent that created it is not treated as a revisit, so belongs-to chains that loop through a has-many parent expand finitely.
Code Metrics Report
Details | | main (4880ed2) | #100 (7d6472e) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 86.7% | 86.8% | +0.0% |
| Files | 59 | 59 | 0 |
| Lines | 4771 | 4772 | +1 |
+ | Covered | 4139 | 4143 | +4 |
+ | Code to Test Ratio | 1:0.9 | 1:0.9 | +0.0 |
| Code | 17736 | 17740 | +4 |
+ | Test | 17596 | 17715 | +119 |
- | Test Execution Time | 48s | 1m17s | +29s |Code coverage of files in pull request scope (83.2% → 84.6%, patch 100.0%)
Reported by octocov |
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.
Summary
assignment -> employee -> department -> employees, as dependency cyclesChanges
ErrCycleDetected