Skip to content

fix: continue dependency traversal after shared projects - #2752

Open
DevChiniwala wants to merge 1 commit into
diggerhq:developfrom
DevChiniwala:fix/hard-dependency-traversal
Open

DevChiniwala wants to merge 1 commit into
diggerhq:developfrom
DevChiniwala:fix/hard-dependency-traversal

Conversation

@DevChiniwala

Copy link
Copy Markdown

In hard dependency mode, a shared project can stop an entire breadth-first traversal, leaving other changed projects or dependents without plan/apply jobs. Continue traversing when a project was already included, while keeping each project in the result once.

The regression graph has two roots, a shared child, and a private two-edge branch from each root. At least one private tail is lost before the fix regardless of root or neighbor iteration order. The tests also check transitive expansion, unrelated branches, empty input, project metadata, and duplicate-free results.

Fixes #2733.

Validation with Go 1.25.4: the generic package passes 100 repeated runs, and go test ./ci/... -count=1 passes in the repository workspace with the workflow's CI environment. The existing credential-dependent repository-list test skips under CI=true, as it does upstream. Formatting and diff checks pass.

This is a draft pending the demo GitHub Actions run requested by CONTRIBUTING.md. A configured Digger demo installation is not available in this workspace yet.

AI usage details

Codex investigated the report, generated the code and tests, and drafted this description. The baseline failures and passing results above were executed locally. Technical follow-up replies may also be prepared with Codex.

Returning true for a previously included project stops the entire BFS.
Continue so projects still queued on other branches are not dropped.

Fixes diggerhq#2733.
@DevChiniwala
DevChiniwala marked this pull request as ready for review November 13, 2026 22:35
Copilot AI balanced review requested due to automatic review settings November 13, 2026 22:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

Hard dependency mode drops directly impacted projects (BFS stops at an already visited node)

2 participants