feat(contract): evalReportingSuite — one call from runs (or a run dir) to analysis.json#272
Merged
Merged
Conversation
…) to analysis.json Thin wrapper over analyzeRuns + a new fromRunRecordDir intake adapter. Resolves a RunRecord[] or a .json/.jsonl file or directory into validated records, runs analyzeRuns (distributions, paired lift, findings rollup), and optionally writes a single analysis.json. No analysis logic of its own — pure composition + I/O over the existing reporting primitives.
tangletools
approved these changes
Jun 22, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved PR — 18b015b2
Blanket team auto-approval is enabled for this reviewer service.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-06-22T13:35:02Z
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
evalReportingSuite(input, opts)to the/contractpublic surface: the one-call path from a set of runs —RunRecord[]in memory, or a.json/.jsonlfile, or a directory of them — to a singleanalysis.json.It is a thin wrapper, not a new analysis engine. All distributions, paired stats/lift, and the findings rollup come from the existing
analyzeRunsprimitive verbatim; the suite only resolves the input into validated records, callsanalyzeRunswith the options you'd pass it directly, wraps the result in a small provenance envelope, and optionally writes the artifact.New surface (all additive,
/contract)evalReportingSuite+EvalReportingSuiteInput/EvalReportingSuiteOptions/EvalReportingSuiteResult.fromRunRecordDir(new intake adapter, alongside the existingfrom*adapters) +FromRunRecordDirOptions/FromRunRecordDirResult/RunRecordRejection. Loads a.json(array) /.jsonl(one record per line) file or a directory of them, validating each record at the boundary viaparseRunRecordSafe. Fails loud on an invalid record by default;onInvalid: 'collect'keeps the valid ones and returns the rejects.Design notes
analyzeRuns(composite/cost distributions, per-dimension stats, paired-bootstrap lift, failure-mode + cluster rollup, recommendations) — the test asserts the wrapped report is byte-identical to callinganalyzeRunsdirectly, so the wrapper can't drift into reimplementing analysis.loadRunRecordspath already used by theanalyze_runseval tool, promoted into the public intake family where it belongs.analysis.jsonoutput (never ingests its own artifact).write:trueon in-memory records fails loud — there's no directory to anchor the artifact to; pass an explicit path instead.Verification
pnpm run lint— 0 errors (pre-existing warnings/infos in unrelated files untouched)pnpm run typecheck— cleanpnpm run build— clean (incl. OpenAPI spec emit)pnpm test— 247 files / 2512 tests pass (2 pre-existing skips), incl. 11 new suite testsVersion trio bumped together:
0.95.1→0.96.0(package.json+clients/python/pyproject.toml+__init__.py).