Skip to content

Wire the impact graph into the report #48

Description

@Muawiya-contact

The pipeline in the core README and in lib.rs is:

scanner ──► index ──► dedup ──► graph ──► rules + risk ──► report

The graph stage isn't in it. report::build calls rules.classify and risk::assess and stops there — it never constructs an ImpactGraph, and risk::downgrade (the function that takes referenced_by and makes a verdict more cautious) has no callers anywhere in the workspace. graph.rs compiles and is never used.

The user-visible consequence is that a node_modules referenced by three live projects gets the same verdict and the same reasons as an abandoned one. The "referenced by 3 projects" evidence in the README is the thing that makes Diskern different from every other disk cleaner, and right now it doesn't reach the report.

Roughly what's needed:

  • detect project roots during (or after) the walk — Cargo.toml, package.json, pyproject.toml
  • add References edges from those roots to the dependency stores they point at
  • call graph.referencing_projects(path) in report::build, feed it through risk::downgrade, and push a reason like referenced by 3 projects

Bigger than a first issue, but it's the core of the project.

crates/diskern-core/src/report.rs:26

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureWorkspace layout and engine designenhancementNew feature or requesthelp wantedExtra attention is neededrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions