Skip to content

Report every edge the run did not cross, not only the ones it refused - #65

Merged
ETWOYA merged 1 commit into
mainfrom
fix/nottaken-covers-unreachable-edges
Sep 23, 2026
Merged

ETWOYA merged 1 commit into
mainfrom
fix/nottaken-covers-unreachable-edges

Conversation

@dankoverride

Copy link
Copy Markdown
Collaborator

NotTaken is documented as the difference between the diagram and the run. It was built
entirely from RunState.DeclinedEdges, and declining is something the walk does — that list
only ever holds edges the walk reached and turned down. An edge leaving a pod no path arrives at
is never offered, never refused, and so never appeared at all. The largest difference between a
diagram and its run was the one difference the field could not report.

What it looks like

A model drew a 15-pod diagram from a screenshot of a reference architecture and left the
pub/sub topic with no publisher — every service-bus --> x, no x --> service-bus. It parses
clean and runs clean. One run, before and after:

before after
edges drawn 20 20
crossed 12 12
reported in notTaken 1 8
accounted for nowhere 7 0

A renderer greying out what notTaken names drew those 7 exactly like the edges the request
crossed — the class of lie Hop and NotTaken both exist to prevent.

What changed

NotTakenEdges now takes the graph and reports every drawn edge that is neither crossed nor
already reported as declined. The reason names the source pod rather than the edge, because
that is the thing to fix: one missing arrow into a topic strands the topic and everything only
it calls, and five of the eight here read no path from the entry point arrives at service-bus.

An unreachable edge and a refused one now read differently, which matters — only one of them is
a mistake in the picture.

A diagram with no entry point reports every edge instead of none. Nothing ran, so the difference
is the whole diagram; an empty list said the opposite.

Testing

dotnet test src/Shoebox.sln — 1201 pass, 6 new in tests/Shoebox.Api.UnitTests/Run/UnreachableEdgeTests.cs:

  • every drawn arrow is crossed or reported (the invariant the field is for)
  • the count and reason for a stranded source pod
  • a reported edge is never also a crossed one
  • an unreachable edge reads differently from a refused one
  • the no-entry case
  • a fully walked diagram still reports nothing — the guard on the other side, so widening this
    does not start greying out arrows the request did cross

Also ran it against a local instance and diffed the /run body for the diagram above; that is
where the table comes from.

Not in this PR

/topology/parse has the same blind spot — its notes cover cycles and say nothing about a
topic nothing publishes to, so a caller cannot see the problem until after it fires. Happy to
follow up separately; keeping this one to the run.

🤖 Generated with Claude Code

…it refused

NotTaken is documented as the difference between the diagram and the run, and it
was built entirely from RunState.DeclinedEdges. Declining is something the walk
DOES, so that list only ever holds edges the walk reached and turned down. An
edge leaving a pod no path arrives at is never offered, never refused, and so
never appeared -- the largest difference between a diagram and its run was the
one difference the field could not report.

Measured 2026-09-23. A model drew a 15-pod diagram from a screenshot and left the
pub/sub topic with no publisher. One run: 20 edges drawn, 12 crossed, 1 reported
untaken, 7 accounted for nowhere. It parsed clean, ran clean and shared clean,
and a renderer greying out what NotTaken names would have drawn those 7 exactly
like the edges the request crossed. Same run after this change: 12 crossed, 8
untaken, 0 unaccounted for.

The reason names the SOURCE pod rather than the edge, because that is the thing
to fix: one missing arrow into a topic strands the topic and everything only it
calls, and five of the eight here say "no path from the entry point arrives at
service-bus".

A diagram with no entry point now reports every edge instead of none. Nothing
ran, so the difference is the whole diagram; an empty list said the opposite.

Tested: 1201 pass. Six new, on the diagram above -- the crossed-or-reported
invariant over every arrow, the count and reason for a stranded source, that a
reported edge is never also a crossed one, that an unreachable edge reads
differently from a refused one, the no-entry case, and a guard on the other side
that a fully walked diagram still reports nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ETWOYA
ETWOYA merged commit f7db090 into main Sep 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants