graph: draw every path to selected packages in query views by ruy-bot[bot] · Pull Request #2033 · vltpkg/vltpkg · GitHub
Skip to content

graph: draw every path to selected packages in query views - #2033

Open
ruy-bot[bot] wants to merge 1 commit into
mainfrom
ruyadorno/query-paths
Open

ruy-bot[bot] wants to merge 1 commit into
mainfrom
ruyadorno/query-paths

Conversation

@ruy-bot

@ruy-bot ruy-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

vlt query mermaid/human views dropped extra paths to a selection (e.g. #ms missed agent-base > debug > ms). Inclusion now propagates up every parent to a fixpoint.

Fixes #2029

Changes

  • mermaid: single reverse pass missed parents visited before their child got included → worklist over all traversal parents
  • human: repeat (seen) items of a node never inherited inclusion → included item includes every item of its parent's node
  • also fixes vlt ls, vlt skills ls --view=mermaid, svg/png views (same renderers)

Tests

  • diamond graph from issue: both views draw both paths (exact issue output)
  • cycle: selecting b also draws back-edge b → a
  • snapshots: dropped workspace paths now drawn; human actual graph root lists only workspace-a since test passes graph.edges (no virtual ws edges) and only ws-a leads to selected deps (CLI adds virtual ws edges, unaffected)

Follow-ups

  • cycles: edges from a selection or its descendants back into its ancestors now drawn (#y in x↔y lists x under y). Kept closure rule (simple, deterministic, same as selected nodes today); simple-path-only filter is costly. Confirm OK.

Co-authored-by: Ruy Adorno ruy@vlt.sh

`vlt query` mermaid/human views drew only some paths to a selection:
mermaid's single reverse pass missed parents visited before their child
got included; human view's repeat (seen) items never inherited inclusion.

## Changes
- mermaid: propagate inclusion up all traversal parents (worklist)
- human: an included item includes every item of its parent's node

## Tests
- diamond graph (issue repro) draws both paths in both views
- cycle: selecting `b` also draws back-edge `b → a`
- snapshots: workspace paths that were dropped now drawn

Fixes #2029

Co-authored-by: Ruy Adorno <ruy@vlt.sh>
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9899fd8f-848f-4d92-a11e-0f7c77adc3e8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🐰 Bencher Report

Projectvltpkg
Branchruyadorno/query-paths
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
vlt install: vue & cache-lockfile📈 view plot
🚷 view threshold
544.73 ms
(-26.27%)Baseline: 738.78 ms
923.47 ms
(58.99%)
vlt install: vue & cache-lockfile-node-modules📈 view plot
🚷 view threshold
234.85 ms
(-31.27%)Baseline: 341.69 ms
427.11 ms
(54.99%)
vlt install: vue & clean📈 view plot
🚷 view threshold
6,725.26 ms
(-45.26%)Baseline: 12,285.78 ms
15,357.22 ms
(43.79%)
vlt install: vue & lockfile📈 view plot
🚷 view threshold
1,699.41 ms
(-64.39%)Baseline: 4,771.86 ms
5,964.82 ms
(28.49%)
🐰 View full continuous benchmarking report in Bencher

This branch was successfully deployed

1 active deployment
Preview — b5e67600 Deployed Oct 20, 2026 by vercel[bot]
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.

[BUG] vlt query mermaid/human output drops extra paths to the selected packages

1 participant