Authority upgrades: diffs, badge/cert, fix-it snippets#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bea0a695f
ℹ️ 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".
| const domainRef = db.collection("evaluations").doc(domain); | ||
| const domainSnap = await domainRef.get(); | ||
| const previousRunId = domainSnap.exists | ||
| ? (domainSnap.data()?.latestRunId as string | undefined) | ||
| : undefined; |
There was a problem hiding this comment.
Compute diff against stale run when evaluations overlap
The previousRunId is captured once at evaluation start, before the run completes. If two evaluations for the same domain overlap, the later-finishing run will still compare against the run that was latest at start, not the run that actually completed most recently. That means diffSummary/previousSummary can be wrong for concurrent runs. Consider re-reading latestRunId (or using a transaction) right before finalizing the run to ensure the diff is based on the immediate predecessor.
Useful? React with 👍 / 👎.
Adds run-to-run diffs, shareable badge/certificate, and copy/paste remediations. Updates docs/spec/OpenAPI and keeps AI-native surfaces stable.