Docs Review code

Data flow and Across repos

See the change on your code's import graph, and what it touches across your other repositories.

The Data flow tab of a review draws the change on a map of your code. Inside the repository, it shows which request paths reach the changed code and which packages changed. Across repositories, it shows the programs your reviewer knows about, what each offers and uses, and which of those links the change touches. Use it to see how far a change reaches before you decide the review, and to check that the review talked about every place the change lights up.

In the portal Reviews › a review › Data flow Everyone

Before you start

  • The review has finished. The Data flow tab appears beside Review once it is done.
  • For the Across repos view, the reviewer agent holds the other repositories you want drawn. See Repositories.

The maps are built by Entropix from the code in Git, with no model, and kept for each repository and commit. They are not the reviewer's opinion; they are what the code says.

Open the map

  1. Open the review from Reviews.
  2. Choose the Data flow tab.
  3. Use the switch at the top: Inside this repo or Across repos. When the reviewer drew a diagram, Reviewer's diagram is there too (see The reviewer's diagram).

Inside this repo: the request path

Request path lists each route whose handler reaches the changed code. For each route you see:

  • The method and path, for example POST /orders, and where it is registered.
  • Called by: what calls it, when that is known.
  • The handler's calls, a few levels down. A changed function is marked ● changed with its file and line. A function already drawn above says (shown above).

A caption says whether the path came from Entropix's own rules or was traced by the reviewer and checked step by step against the code. Routes the change does not reach are left out, with a count of how many.

Routes are read for Go, Java (Spring and JAX-RS), Python (FastAPI and Flask) and Express. Calls made through an interface or a callback are not followed, so a path can stop short.

Inside this repo: packages

Packages draws the repository's import graph at the reviewed commit: one box per package (Go, which needs a go.mod) or per folder (other languages, best effort), and a line for each import. The header says how many changed, for example 4 of 31 packages changed.

  • Only what changed + 1 hop shows the changed boxes and their direct neighbours. This is the default.
  • Whole system shows everything. Above 40 boxes, untouched ones are folded into their group.
In the drawingMeans
GreyUntouched.
Lit, with a changed · N files pillChanged in this change.
Marked NewAdded by this change.
Outside this repositorySomething imported from elsewhere.
Database or queueA store the code reads or writes.
DashedInferred or not checked, for example a box whose users were not read.
QAn open question from the reviewer about that box.

Beside the drawing, What this change touches lists the changed boxes, each linking to the change, and the reviewer's open questions. Under it, a line says which commit the map was read from. A hidden table says the same in words for screen readers.

Across repos

Across repos draws what runs and what it talks to, across the reviewed repository and the other repositories the reviewer agent holds (at most 5 are read; the rest are listed as not read). Entropix finds in each repository:

  • Programs: Go main packages, container builds and Node apps.
  • What each offers: HTTP routes, webhooks, database tables and Kubernetes Services.
  • What each uses: addresses it calls, address settings it reads (names ending in _URL, _ADDR, _HOST or _DSN) and tables it queries.

It then compares what the reviewed repository offers and uses before and after the change, and lights the links the change touches. Callers from outside sit on the left, one frame per repository in the middle, and stores and outside systems on the right.

  • The change's path (the default) centres the reviewed repository and one hop out. A line says how many programs were left out.
  • Show all (N) draws every program.
In the drawingMeans
Accent lineA link touched by this change.
RedA link the review says breaks.
AmberA link that needs an update, or a question still open.
FaintNot touched.
DashedThe reviewer said it, but Entropix did not find it in the code; or only possible (several programs offer the same path, or only a topic name is shared).
Amber dashed, no callerSomething offered that nothing in the linked repositories uses.

The panel beside it counts offers added and removed, reads and writes, and offers with no caller. It then checks the drawing against the review: Check against the review: N of M covered. Each touched link the review does not mention gets a line such as "billing uses /orders; the review does not mention it.", with a link to the review's external impact. When nothing the change lights reaches another repository, it says so.

Notes under the drawing tell you when a repository was drawn at its default branch rather than the reviewed commit, when no other repository is linked, or when no program was found.

The reviewer's diagram

When an operator has turned the review.diagrams feature switch on for your organisation, the reviewer draws its own diagram after each review round. It is then the tab's first view, and Portal's rule view takes you to the maps above. The switch is off unless an operator turns it on. Set to shadow, it behaves as off: no diagram is drawn.

Entropix checks every place the reviewer cites and quotes the code. The diagram has:

  • Who is affected: a grid of callers against the changed APIs.
  • The path: a nested drawing of the change's path.
  • The code: cards with the quoted code. A cite Entropix could not find is marked The portal could not find this place in the code.
  • What happens on the way: short journeys through the change.
  • Every line: a table of every link, which also serves screen readers.

The diagram step uses only read tools and never fails the review. If it stops, the tab says why and shows Retry (Member). While it runs, the tab says The reviewer is drawing it. Reload in a minute.

What you can and can't do

You can
  • See which routes reach the changed code, and which packages changed.
  • See the change's reach into the other repositories your reviewer holds.
  • Check that the review mentions every link the change touches.
  • Switch between the changed part and the whole system.
You can't
  • Open the tab before the review finishes.
  • Draw repositories the reviewer agent does not hold, or more than 5 others.
  • Rely on it for calls made through interfaces or callbacks: they are not followed.
  • Edit the drawing: it is read from the code.

Troubleshooting

MessageWhat to do
No map for this commit yet: maps are built when a review runs.No review has run on this commit yet. The map appears when one has.
Couldn't read this commit's code, so there is no map. or Couldn't read request paths for this commit.Entropix could not fetch the repository. Check its SSH key on Settings or the Git host's installation. See Connect GitHub or GitLab.
None of the changed files sit in a package this map holds. (or "folder")For example, the change is outside any package, at the root or not source code. Choose Whole system, or Across repos.
No other linked repository; lines inside this repo only.Give the reviewer agent your other repositories to draw links between them.
No program was found in the linked repositories at these commits.Entropix found no program it can read. The inside view still works.