Repository navigation
Description
What (description of the change)
Adopt the replay-evaluation pattern from Dream-RSI (arXiv:2609.14858, Google/DeepMind, Sep 2026): evaluate prompt/policy revisions offline against recorded mission traces before they reach the default prompt or tool-discipline heuristics.
Three pieces, all inside the existing evals harness (issue #73) — no new infra:
- Trace archive —
evals/tier2/run.pycurrently judges a mission and then deletes the session dir (shutil.rmtree). Instead, keep a redacted copy of each mission's session JSONL underevals/traces/<model>/<mission>/<session>.jsonl(redact absolute host paths and long secret-shaped tokens; record model + timestamp in a smallmeta.jsonper mission). Also add themodelfield toresults.json(closes the documented gap indiff.py: "results.json carries no model field; the runner trusts the operator"). - Trace-diff scorer — new
evals/replay/Rust bin (tole-core dep, same pattern as the embed spike):replay --traces <dir> --incumbent <prompt.txt> --revised <prompt.txt> .... For each recorded mission it reconstructs the message list from the trace (user prompt, redacted tool observations, tool specs), sends one completion call per candidate through the configured Provider (TOLE_*/OPENAI_*env), and compares the produced tool-call sequence against the recorded one. Zero tool executions, zero workspace, no--allowsurface. - Monotone selection — the scorer ALWAYS evaluates the incumbent prompt in the same run as any revision (Dream-RSI §3 selection rule) and only reports a winner when the revision is not worse on the trace corpus; output is a per-mission table +
SHIP: <incumbent|revised-N>line.
evals/README.md gains a Tier 2.5 — offline trace replay section: replay is an advisory pre-check for prompt/policy revisions; live Tier-2 missions remain the release gate.
Why (the problem you're solving)
Today a prompt/policy revision can only be validated by another live run (cost + noise), and the decision+outcome data each mission already paid for — what Dream-RSI calls a replay simulator — is thrown away after one scoring pass. Offline replay gives cheap, deterministic-ish feedback for the common case (prompt wording, tool-discipline tweaks) while keeping live missions for what replay cannot cover (real tool effects).
Scope note: this adopts Dream-RSI's evaluation pattern only. Tole remains chat-first (v1.1); no discovery loop, no session-branching product changes.
Testing (how you verified this works)
- Tier-2 live run archives redacted traces: verify no raw
/tmp/...workspace paths or secret-shaped strings inevals/traces/. - Replay of the incumbent prompt against its own fresh traces scores ≥ incumbent everywhere (sanity: replay≈live agreement).
- A deliberately degraded revision (stripped tool-discipline prompt) scores worse than the incumbent → scorer reports
SHIP: incumbent(monotone-selection demo). cargo test -p tole-core --test evals_tier1still green;EvalsCI job green.
Activity
feat: offline trace replay scorer + redacted trace archive (#107) (#108)