docs: draft /api/routing/trace endpoint - #2
Open
luochen1990 wants to merge 1 commit into
Open
Conversation
This was referenced Aug 25, 2026
|
Once 1.0 ships, the target is full per-flow transparency: trace every routing decision from rule input → dial mode → IP/DNS → reroute? → outbound → connection status. That's the honk/dae API plan. thanks pr! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a draft spec page for
GET /api/routing/trace: dry-run the activerouting rules against a hypothetical flow (domain / IP / port / network /
process name / source IP) and return the per-rule decision path plus the
outbound that would have been selected.
Why
"Why did this connection go through this group?" is the most common routing
question, and the current endpoints cannot answer it:
execute the routing DSL (rule order,
&&short-circuits, fallback).GET /api/connectionsshowsoutcomes for existing connections, not reasons, and nothing at all about
a flow that has not happened yet.
The result taxonomy in this draft comes from production experience with an
offline routing matcher I maintain for dae (a visualization panel that
reuses dae's rule compilation to render decision trees). Three semantics
proved essential there and are encoded here:
skippedis not a verdict. After the deciding rule (or ashort-circuited subcondition), later rules are not evaluated; they carry
no verdict and must not be displayed as results.
indeterminateis not a guess. A rule whose verdict depends on aninput the caller did not provide (e.g.
dip(geoip:...)without an IP,pname()without a process name) is reported asindeterminate, and theevaluation-level flag marks results whose decision path contains such
steps — a client can tell "this answer is solid" from "provide more
inputs to sharpen it".
through the engine's own DNS chain and evaluated once per address:
production routing decides per connection, and different addresses of
one name legitimately select different outbounds.
Notes
the traced flow through outbounds; the only network activity is the
engine's own DNS resolution for name-only queries.
once it lands:
observed_at/nullable conventions and the> Draft endpoint.banner convention (until feat(api): add some based honk/dae pat #1 lands, these coexist with the simpler
current page style)
envelope with the
capability_not_supportedmachine codegeneration_idanticipates a shared config-revision identifier, opento aligning with whatever feat(api): add some based honk/dae pat #1 settles on
index.mdadditions (overview bullet + table row) will needto be replayed on feat(api): add some based honk/dae pat #1's rewritten index