Skip to content

Make CLI construction eager and consolidate the evaluation API - #151

Closed
Stephen Belanger (Qard) wants to merge 1 commit into
refactor/eager-cli-evaluationsfrom
refactor/eval-construction-api
Closed

Stephen Belanger (Qard) wants to merge 1 commit into
refactor/eager-cli-evaluationsfrom
refactor/eval-construction-api

Conversation

@Qard

Copy link
Copy Markdown
Contributor

CLI construction previously ran only when polled, ignored malformed filters, and could switch output modes after an SSE connection failure. BtEvalRunner::from_env and with_client now return eager completions with typed BtInitError failures. Configuration is captured at issuance; malformed filter JSON/schema/regex rejects before setup. Explicit SSE failures are returned without falling back to another transport or terminal output.

List mode creates no client, runtime or socket. Local mode creates no client/login. Socket setup runs on the selected binding's managed blocking pool, and recording-mode client initialization begins only after it succeeds. A private client-builder composition hook reuses existing validation, initialization and the same response reservation/runtime. Supplied-client constructors participate in its admission and shutdown; discarded observers do not cancel accepted setup.

Removed the transitional client-bound Evaluator facade and moved EvalOpts into its own options module. Examples and existing callable/source/concurrency/error tests now use EvalDefinition, EvalRequest and run. CLI configuration parsing is isolated from execution, and filter tests no longer mutate the test process's environment.

Stacked on #150 (refactor/eager-cli-evaluations), continuing the original release-preparation stage. Dependency/MSRV reconciliation, packaging/docs and legacy uploader consumer migration remain subsequent work. Planning notes remain local.

Validation:

  • 440 unit/integration tests and 14 doctests passed (4 existing ignored doctests).
  • Strict all-target/all-feature Clippy, rustdoc, formatting and diff checks passed.
  • Process-isolated startup tests cover captured configuration before first poll, dropped observers and shutdown cleanup, runtime loss, malformed filters, list mode, explicit Unix/TCP failure behavior, login ordering and recording through the constructed client. Admission coverage proves one supplied-client response slot and rejects full/closed setup before socket work.
  • Rust 1.86: 101 focused eval/CLI tests, both eval examples and 6 eval doctests passed using an isolated compatible dependency resolution. The default dependency graph's existing MSRV mismatch remains release-preparation work.

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