Skip to content

Two modes for client helper requests: answer locally or forward - #281

Merged
fylorn merged 1 commit into
mainfrom
feat/probe-forward
Oct 3, 2026
Merged

fylorn merged 1 commit into
mainfrom
feat/probe-forward

Conversation

@fylorn

@fylorn fylorn commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Why

client_probes had three modes, and two of them did the same thing. passthrough and route both sent the request through the routing rules; they differed only in whether the request carried its class, i.e. whether a when.intent rule could match it. The names suggested passthrough skipped routing, and the dry run said so too (it short-circuited with a passthrough outcome and evaluated no rules), while the gateway evaluated the rules for it like for any other request.

What

One mode, forward, replaces both: the request goes through the rules and carries its class, so an intent rule takes effect as soon as it is written. intercept is unchanged and remains the default for health checks and warm-ups; titling, topic detection and suggestions default to forward.

  • ProbeAction / ProbeMode: intercept | forward
  • Dry run: only intercepted requests short-circuit; the passthrough outcome is gone
  • RouteSave.route_probes removed (it existed to switch classes to route so a new intent rule would fire), together with the control.unknown_probe_class message code
  • CONTROL_API_VERSION 36
  • Config manual regenerated

passthrough / route in an existing config.yaml are now validation errors (no compatibility path, per project policy).

Tests

cargo fmt --all --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace all pass locally. Dry-run tests now cover a forwarded probe being evaluated by the rules and an intent rule catching it; the gateway test sends a forwarded titling request to the cheaper upstream without any extra setting.

🤖 Generated with Claude Code

`client_probes` had three modes, and two of them did the same thing:
`passthrough` and `route` both sent the request through the routing
rules, and differed only in whether it carried its class, so whether a
`when.intent` rule could match it. The names suggested that
`passthrough` skipped routing, and the dry run said so too, while the
gateway evaluated the rules for it like for any other request.

They are now one mode, `forward`: the request goes through the rules
and carries its class, so an `intent` rule takes effect as soon as it is
written. `intercept` is unchanged and still the default for health
checks and warm-ups; the other three default to `forward`.

- ProbeAction / ProbeMode: `intercept` | `forward`
- Dry run: only intercepted requests short-circuit; `passthrough`
  outcome removed
- RouteSave.route_probes removed (it existed to switch classes to
  `route` so a new intent rule would fire), with the
  `control.unknown_probe_class` code
- CONTROL_API_VERSION 36
- Config manual updated; `passthrough` / `route` in an existing config
  are now validation errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit dbe10da into main Oct 3, 2026
4 checks passed
@fylorn
fylorn deleted the feat/probe-forward branch October 3, 2026 14:51
@fylorn fylorn mentioned this pull request Oct 3, 2026
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.

1 participant