Skip to content

Comments

[WIP] Fix import-cycle errors to show full include chain#16553

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-import-cycle-errors
Closed

[WIP] Fix import-cycle errors to show full include chain#16553
Copilot wants to merge 1 commit intomainfrom
copilot/fix-import-cycle-errors

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>compiler: show full include chain for import-cycle errors</issue_title>
<issue_description>Operators lose time debugging import cycles because compile errors currently show only a pair of files instead of the full include/import chain that triggered the cycle.

Why now:

  • Nested import usage has increased.
  • We are seeing recurring triage friction when cycle depth is >2.

Expected behavior:

  • Import-cycle failures report a deterministic full chain (including the first back-edge) so operators can fix the cycle in one pass.

Evidence packet:

  • Commit under test: origin/main @ 1f71659
  • Runtime: Go 1.25.7, Darwin arm64 (macOS 26 kernel 25.3.0)
  • Minimal repro:
    1. Create 4 workflows with imports A->B->C->D->B
    2. Run gh aw compile on A
    3. Observe error text
  • Expected: deterministic chain with back-edge path.
  • Actual: partial cycle context (insufficient path detail).

Acceptance / validation:

  • Unit test for a 4-file cycle verifies full deterministic chain output.
  • Error still fails closed and remains deterministic across runs.
    </issue_description>

Comments on the Issue (you are @copilot in this section)

@pelikhan We used to generate a full mermaid graph in the header

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compiler: show full include chain for import-cycle errors

2 participants