Implement dependency graph for compile --watch to minimize recompilation - #5908
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update recompilation logic for top agentic workflows
Implement dependency graph for compile --watch to minimize recompilation
Dec 8, 2025
pelikhan
marked this pull request as ready for review
December 8, 2025 22:33
Collaborator
|
@copilot add more tests |
- Test multiple top-level importers - Test circular import detection - Test new file addition handling - Test empty graph initialization - Test complex dependency chains - Test imports with inputs object format Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added 6 comprehensive test functions covering:
All 10 test functions with 18 subtests now pass. Commit: 4acc6d1 |
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.
Implementation Plan for Compile --Watch Dependency Graph
watchAndCompileWorkflowsfunction incompile_command.goSummary
Successfully implemented a dependency graph system for
compile --watchmode with comprehensive test coverage:New Tests Added (6 additional test functions)
TestDependencyGraph_MultipleTopLevelImporters: Verifies that a deeply nested shared workflow correctly affects all top-level workflows that import it
TestDependencyGraph_CircularImportDetection: Ensures the graph handles circular imports gracefully without infinite loops
TestDependencyGraph_NewFileAddition: Tests behavior when new workflow files are added (both top-level and shared)
TestDependencyGraph_EmptyGraph: Validates graph initialization and operations on an empty graph
TestDependencyGraph_ComplexDependencyChain: Tests a complex multi-level dependency chain (top1 → a → b → c) and verifies correct propagation
TestDependencyGraph_ImportsWithInputs: Ensures imports using object format with inputs field are tracked correctly
Test Coverage Summary
Key Test Scenarios Covered
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.