# Evals, Tests, Traces & Regression **Track:** Interoperability, Safety & Production — AI-Native Full-Stack Development — complete (30) **Framework / surface:** web dev (verification / observability) **Level:** Advanced **Prerequisites:** Verification-Driven Development, The Agent Loop, Security for Agentic Web Applications **In one line:** Test deterministic code, evaluate probabilistic behavior, and trace the trajectory that connected inputs to actions and outcomes. ## Theory, aesthetics & inspiration An AI-native application carries two kinds of uncertainty, and each needs its own instrument. Deterministic code still breaks deterministically — routes fail, queries return wrong rows — and belongs in conventional tests, Playwright's user-visible-behavior discipline included. Model and agent behavior is probabilistic — outputs vary, tool choices change, a trajectory may succeed by a different path — and needs evals: representative cases with defined acceptable outcomes, run repeatedly, scored honestly. Tracing connects the layers: OpenTelemetry — the CNCF project formed in 2019 from the merger of OpenTracing and OpenCensus — models a request's journey as spans, and an agent trace extends it through model calls, tool invocations, approvals, and retries, so a failure can be reconstructed rather than guessed from the final answer. The working discipline is regression: capture every real failure as a future test or eval case, keep held-out examples the development loop cannot overfit, and re-run the suite when a prompt, model, or tool changes. In this environment the spec is executable — "good" is whatever your suite can repeatedly distinguish from "bad." **Builder question:** What failure from a real user would you want permanently converted into a test, eval, or trace assertion so it never becomes anecdotal again?