Seal regradable qualification bundles - #55
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3298e60f17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| gradeInput: retainedGradeInput, | ||
| usage: { | ||
| durationMs: outcome.durationMs, | ||
| outputTokens: outcome.tokens.output, |
There was a problem hiding this comment.
Preserve numeric output-token usage during redaction
Every successfully collected attempt puts outputTokens inside the value passed to redactTranscript, but redactSensitiveFields in evals/provenance.ts treats any key containing token as sensitive and rewrites this number to "[redacted]". persistV2Attempt then parses the transcript with RetainedScenarioEvidenceSchema, which requires usage.outputTokens to be a nonnegative integer, so the first live attempt fails persistence and aborts the campaign instead of producing a report.
Useful? React with 👍 / 👎.
| const retainedEvidence = RetainedScenarioEvidenceSchema.parse( | ||
| JSON.parse(result.provenance.transcript.text), | ||
| ); |
There was a problem hiding this comment.
Handle diagnostic transcripts before parsing retained evidence
When host setup, outcome collection, or another operation reaches runAttempt's catch block, that block deliberately creates a diagnostic transcript shaped like { evaluatorError: ... }; nevertheless, persistV2Attempt unconditionally parses every transcript as RetainedScenarioEvidence. In those error scenarios this parse throws inside persistEvaluation, converting the original typed attempt failure into a persistence stop and preventing the intended failure attempt and finalized diagnostic report from being written.
Useful? React with 👍 / 👎.
Summary
Verification
bun run check: 599 passed, 1 intentional skipbun run replay: 13 of 13 cassettes reproducedReview guide
Start with
evals/qualification-bundle.tsfor the seal and filesystem threat model,evals/grader-input.tsandevals/conformance-evidence.tsfor regrading authority, thenscripts/qualify-release.tsfor cross-object binding. The full path is exercised bytests/qualification-cli.test.ts.