Skip to content

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

Draft
spencrr wants to merge 4 commits into
microsoft:mainfrom
spencrr:dev/spencrr/trace-runner
Draft

[REFACTOR]: Add shared linear trace runner#148
spencrr wants to merge 4 commits into
microsoft:mainfrom
spencrr:dev/spencrr/trace-runner

Conversation

@spencrr

@spencrr 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 why a trace ended, supports optional online stopping, 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, and evaluator contexts contain annotation-free turns.

Depends on #147. Because the branches live on a fork, this PR temporarily includes lower-layer diffs and targets main; those diffs disappear as dependencies merge.

Breaking changes

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

Checklist

  • pre-commit run --all-files passes
  • Tests added for 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: 14 runner tests and 63 lifecycle/driver regression tests pass, with lint and type checks clean.

@azure-pipelines

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

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