Repository navigation
test(shared): cover DependencyGraph and FileSystemCriteriaProvider - #1571
Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Conversation
Both modules drive criteria evaluation order and loading but had no unit tests. Adds coverage for cycle and unknown-dependency detection, topological order, ancestor/descendant traversal, root-failure filtering for criteria and prompt-feature results, YAML loading and validation, and ancestor resolution over a diamond DAG. Fixes microsoft#369. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
requested a review
from Cedric Vidal (cedricvidal)
as a code owner
October 26, 2026 14:01
This branch has not been deployed
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.
Fixes #369.
DependencyGraphorders criteria and prompt-feature evaluation, andFileSystemCriteriaProviderloads criteria for local and dev runs. Neither had unit tests.graph/dependency-graph.test.ts(15 tests): empty graph; duplicate, unknown-dependency, self-cycle, multi-node-cycle and disconnected-cycle detection; ancestor/descendant traversal over a diamond; parents-before-children topological order;getRootFailuresfor bothcriterionId/passedandfeatureId/detectedresults; and the deprecated aliases.criteria/criteria-provider-fs.test.ts(13 tests): missing directory;.yaml/.ymlfiltering; trimming anddepends_on/dependsOn/gatesnormalization; validation errors for missing id/prompt, non-array dependencies or gates, and non-object YAML; duplicate ids across files; andresolveWithAncestorsdiamond deduplication plus unknown-id messages. Each test uses a fresh temp directory that is removed afterwards.The
normalizeCriteriahelper named in the issue no longer exists onmain, so it isn't covered. This is a test-only change with no production code touched.Validation:
pnpm exec vitest run packages/shared/src/graph/dependency-graph.test.ts packages/shared/src/criteria/criteria-provider-fs.test.ts(28 passed);pnpm --filter shared exec tsc --noEmit.🤖 Generated with Claude Code