Skip to content

Add unrecorded_patterns to dependency reachability (suppress record, preserve traversal) - #5159

Draft
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/update-dependency-reachability-behaviors
Draft

Add unrecorded_patterns to dependency reachability (suppress record, preserve traversal)#5159
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/update-dependency-reachability-behaviors

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

dependency_reachability only had excluded_patterns, which both removed a repo from output and pruned traversal through it. This made it impossible to model boundary repos that should be hidden as direct deps while still preserving coverage of transitive deps behind them.

  • New exclusion mode: unrecorded_patterns

    • Adds a second repo-pattern control that suppresses direct recording of matching repos but continues descent through them.
    • Matching repos are not emitted as dependencies keys and are not attribution targets themselves.
  • Traversal/recording split in the aspect

    • Refactors dep handling to separate:
      • record decision: gated by not excluded and not unrecorded
      • descend decision: gated by not excluded
    • Keeps existing excluded_patterns semantics unchanged (record + prune).
  • Precedence and transition plumbing

    • Explicit precedence: if both match, excluded_patterns wins (stronger prune behavior).
    • Threads unrecorded_patterns through the same private build-setting transport used by other knobs:
      • new //dependency:_unrecorded_patterns setting
      • added to aspect attrs
      • added to transition outputs
      • set in each split-transition branch
  • Rule/API and docs updates

    • Adds unrecorded_patterns to dependency_reachability (default []).
    • Reworks module docs to present both modes side-by-side, with trade-offs and precedence clearly called out.
  • Exclusions test matrix expansion

    • Adds fixtures/assertions covering:
      • record suppression
      • preserved descent vs pruned descent contrast
      • attribution passthrough behind unrecorded boundary
      • precedence (excluded_patterns over unrecorded_patterns)
      • composition with excluded_edges
      • byte-identical behavior for explicit empty unrecorded_patterns = []
dependency_reachability(
    name = "dep-reachability",
    roots = [":root"],
    excluded_patterns = ["legacy_repo*"],      # prune + do not record
    unrecorded_patterns = ["boundary_repo*"],  # do not record, still descend
)

@netlify

netlify Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit 8bc4e37
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/6a9030d04b42f0000824714a
😎 Deploy Preview https://deploy-preview-5159--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dependency reachability to separate exclusion behaviors Add unrecorded_patterns to dependency reachability (suppress record, preserve traversal) Aug 27, 2026
Copilot AI requested a review from phlax August 27, 2026 12:43
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.

2 participants