#1591·guardrails

1.0.0 open questions (incl. do we still need Runner?)

Author: zsimjeeCreated Jul 24, 2026Updated Sep 30, 2026
LabelsStale

Umbrella issue collecting the open questions that need answers before 1.0 lands. None of these are actionable yet — the point is to make the decisions explicit rather than settling them by accident during implementation.

Related design issues: guardrails-ai/guardrails-ai#11 (ValidationOutcome redesign), guardrails-ai/guardrails-ai#12 (Guard/Validator unification), #1590 (RAIL/XML removal).


1. Do we need Runner at all?

The biggest structural question. Runner currently owns: prompt construction → LLM call → parse → validate → introspect → reask loop, plus per-iteration logging.

  • If Guard becomes the composition primitive and Validator the judgment primitive, Runner is the layer in between. Reask is the only responsibility that genuinely needs a loop. Could Runner collapse into Guard plus a resolution-driven retry policy, once resolutions are tagged?
  • There are four Runner variants — runner.py, async_runner.py, stream_runner.py, async_stream_runner.py — a 2×2 of sync/async × stream/non-stream, on top of two validator services (sequential_validator_service, async_validator_service) and two Guard classes (Guard, AsyncGuard). That multiplier is where our known divergences live: streaming rejects fix/filter/refrain/reask outright (sequential_validator_service.py:328–354), and _stream_server_call drops validation_summaries (#1588). Is the answer to unify on async with a thin sync facade?

2. Does the LLM stay inside Guard?

If v1 + v2 produces guards that never call an LLM, is LLM invocation a Guard responsibility or a separate concern? This decides whether reask remains a validation concept at all, or becomes a caller-side retry policy driven by the resolution tag.

3. Three entry points — Guard.__call__ vs Guard.validate vs Guard.parse

Overlapping semantics today. Which survive 1.0, and what does each mean once validators are directly callable?

4. Is history in or out?

Partially settled: history stays, and it is orthogonal to the on_fail removal in #1597. Its scope narrows to values the library computed, not decisions the caller made — judgments, suggested fixes, and merged fix candidates, but not which resolution the caller ultimately took (caller-side telemetry is TBD, see #1599). Worth stating in the docs, since "history" otherwise reads as an audit trail of outcomes when it is an audit trail of computations. ValidatorLogs.value_after_validation goes, since nothing applies corrections anymore.

Still open below.

Guard.history is the richest audit trail we have, but: OTEL tracing already exists in parallel, the server's history endpoint is deprecated and cache-backed with a 300s TTL, and GUARD_HISTORY_ENABLED=false is required for sync streaming to work at all. Is history a first-class feature, a debug affordance, or superseded by traces plus a richer outcome object?

5. Where does on_fail live — validator, guard, or call site?

Today it is per-validator and baked into persisted guard config. Open sub-questions: what does on_fail mean on a nested guard whose children have their own? Can it be overridden per call? (Note any new on_fail enum value is a hard forward-compat break on the config plane — see guardrails-ai/guardrails-ai#11.)

6. Streaming resolution: keep the span-based fix architecture?

Correction to an earlier version of this issue: streaming is not limited to noop and exception. String streaming supports fix through a span-buffering architecture in run_validators_stream_fix (sequential_validator_service.py:110–258): the guard accumulates chunks, each validator buffers to its own granularity (returning None while accumulating), fixes are applied to the span in place, and only once every validator has a concrete result are the per-validator versions three-way merged (multi_merge against acc_output) and the span emitted. Nothing is emitted before it is resolved.

The noop/exception-only restriction applies to the structured streaming path only: JSON/list output goes Runner.validate → validator_service.validate(stream=True) → run_validators, where the guard clause at :328–354 rejects fix, filter, refrain, and both reask variants.

So the real questions are: (a) do we bring structured streaming up to parity with string streaming, and (b) does the span-based fix architecture survive whatever replaces on_fail? Note that if fixes are never applied, multi_merge and the per-validator partial accumulators become dead code — and that machinery is the most differentiated thing in the library.

7. Do Guard and AsyncGuard stay separate classes?

8. What is the hub validator ABI in 1.0, and what is the deprecation window?

PassResult/FailResult are what every published validator returns; rail_alias is what they register under. Both are implicated by #1590 and guardrails-ai/guardrails-ai#12. The hub fleet versions independently post-PyPI migration, so this needs a stated compatibility policy, not a best effort.

9. Structured output after RAIL — Pydantic, JSON Schema, or both?

And does the RAIL data-type vocabulary in guardrails/datatypes.py survive as the type system for validator registration?

10. Is server mode a first-class execution target or a deployment detail?

Today behavior silently differs between local and server execution (#1588, GUARD_HISTORY_ENABLED). If it is first-class, we need parity tests. If it is a detail, we need to say which features are local-only.

11. Does validated_output survive as a name?

It is the streaming accumulator in every user's code (full_output += chunk.validated_output) and in server_ci/tests/test_server.py. Whatever the tagged resolution looks like, this name is load-bearing for at least one major version.

Source: guardrails-ai/guardrails