Skip to content

[FEAT]: Serialize final evaluation metadata - #147

Closed
Spencer Schoenberg (spencrr) wants to merge 7 commits into
microsoft:mainfrom
spencrr:dev/spencrr/trace-serialization
Closed

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

Conversation

@spencrr

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

Copy link
Copy Markdown
Contributor

Superseded by #146. The persistence changes now live with the result contract so the public model and full-fidelity transport land atomically.

@azure-pipelines

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

@spencrr
Spencer Schoenberg (spencrr) force-pushed the dev/spencrr/trace-serialization branch from 42fded4 to 60f68cb Compare August 27, 2026 17:30
@spencrr
Spencer Schoenberg (spencrr) deleted the dev/spencrr/trace-serialization branch September 8, 2026 20:42
Spencer Schoenberg (spencrr) added a commit that referenced this pull request Sep 30, 2026
## Description

Adds the per-execution provenance needed before final-trace verdict
cadence changes. `Result.terminal_evaluation` stores the evaluator
output for the terminal trace, `Result.trace_end_reason` records why
trace production ended, and `Turn.eval_purpose` identifies online stop
checks. `Result.turn_evaluations` makes the online evidence boundary
explicit while `eval_results` remains a compatibility view.

The direct attack and probe resolvers require one evaluation and reject
unknown runtime outcomes instead of falling through. Population
provenance now shares validation across `PopulationRef`,
`PopulationResult`, and `execute_trials_async`, with invalid thresholds
rejected before an execution factory runs.

This PR also includes the persistence work previously split into #147 so
the contract cannot land without transport support. The current xdist v2
envelope and JSON report carry terminal evaluation, trace-end reason,
turn purpose, and population provenance together. Malformed worker data
fails closed, including overflowing confidence values, and oversized
results produce bounded incomplete markers while retaining population
provenance when it fits.

## Breaking changes

None for valid callers. Invalid population provenance and malformed
evaluator outcomes now fail early instead of being accepted or falling
through.

## Checklist

- [x] `pre-commit run --all-files` passes
- [x] Tests cover contract fields, compatibility views, resolvers,
population validation, xdist transport, truncation, JSON output,
malformed confidence, and real worker/controller persistence
- [x] Documentation updated

Validation: 1,122 unit tests pass. Strict documentation build and all
pre-commit checks pass.
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