feat: harden pointwise model-judge reporting#17
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 556a852600
ℹ️ 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".
| for (const item of finalResult.items) { | ||
| counts[item.verdict] = (counts[item.verdict] ?? 0) + 1; | ||
| } | ||
| const counts = countPointwiseVerdicts(finalResult.items); |
There was a problem hiding this comment.
Validate pointwise verdicts before writing artifacts
When an adapter's canonicalizeExpectedItemMetadata returns a typo or new verdict, this new helper throws, but pointwise-result.json has already been overwritten just above. If the same run id is reused, the command exits before regenerating the report or manifest, leaving the previous manifest/report pointing at a replaced invalid result file. Move the verdict validation/counting before writing result artifacts so failed runs do not corrupt an existing bundle.
Useful? React with 👍 / 👎.
Summary
v0.1.8Boundaries
Verification
pnpm formatpnpm test -- tests/pointwise.test.mjspnpm install --frozen-lockfilepnpm checkgit diff --checkIndependent pre-PR review approved after two fix loops for pointwise artifact-path validation.