Problem
config_loader.rs uses a global HashSet<PathBuf> to detect circular includes. This treats any repeated include as a cycle, blocking valid DAG configurations like:
main → {team-a, team-b} → shared-base
When shared-base is reached the second time through team-b, it's falsely reported as a "Circular include".
Fix
Track the current include stack (ancestor chain) for cycle detection, not a global visited set. Allow the same file to be included multiple times as long as it's not in the current ancestor chain.
Alternatively, cache successful loads and reuse them (like a memoized loader).
Source
PR #5 review — Codex P1 (comment #1).
Problem
config_loader.rsuses a globalHashSet<PathBuf>to detect circular includes. This treats any repeated include as a cycle, blocking valid DAG configurations like:When
shared-baseis reached the second time throughteam-b, it's falsely reported as a "Circular include".Fix
Track the current include stack (ancestor chain) for cycle detection, not a global visited set. Allow the same file to be included multiple times as long as it's not in the current ancestor chain.
Alternatively, cache successful loads and reuse them (like a memoized loader).
Source
PR #5 review — Codex P1 (comment #1).