Skip to content

bug: config include recursion blocks valid DAG configurations #11

@EffortlessSteven

Description

@EffortlessSteven

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions