Skip to content

[REFACTOR]: Add shared linear trace runner - #148

Draft
Spencer Schoenberg (spencrr) wants to merge 6 commits into
microsoft:mainfrom
spencrr:dev/spencrr/trace-runner
Draft

Spencer Schoenberg (spencrr) wants to merge 6 commits into
microsoft:mainfrom
spencrr:dev/spencrr/trace-runner

Conversation

@spencrr

@spencrr Spencer Schoenberg (spencrr) commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds the internal linear trace runner used by attack and probe strategies. It keeps separate raw and annotated turn histories, records TraceEndReason, supports optional online stop checks, and reuses an identical online evaluation when it already covers the terminal trace.

The runner does not own session lifetime, polarity, cleanup, or exception conversion. Those remain strategy and BaseExecution responsibilities. Driver history receives a shallow copy, evaluator contexts contain annotation-free turns, and reused mutable evaluator evidence is copied defensively.

Depends on #146. Because the branches live on a fork, this PR temporarily includes the lower-layer diff and targets main; that diff disappears when #146 merges.

Breaking changes

None. No existing strategy consumes the runner in this layer.

Checklist

  • pre-commit run --all-files passes
  • Tests cover termination reasons, raw/annotated history, stop behavior, exact-context reuse, mutation guards, exceptions, and turn budgets
  • Documentation not required for the internal collaborator in this layer

Validation after reslicing: the full suite passes with 1,178 tests and 5 skips; all pre-commit checks pass.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Keep numeric overflow and evaluation text conversion failures inside the worker-output error boundary so controllers mark runs incomplete and preserve earlier results.
Require explicit response scopes and distinguish online evidence from terminal verdict input without an alias. Apply canonical policies consistently to shared evaluation schemas and version the tightened population contract. Migrate callers and document direct pre-1.0 API replacement while preserving fail-closed records.
Use final_trace_evaluation consistently in Result, canonical records, JSON reports, and xdist transport. Update examples and round-trip tests without retaining an alias for the earlier spelling.
Require the same observability and manifest before reusing an online judgment. Copy optional evidence through the shared tolerant renderer so malformed supporting text cannot discard an established verdict. Keep terminal evidence and operand lists independent from online records.

This branch has not been deployed

No deployments
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