fix(db): include techniques in result-row uniqueness - #2
Merged
Conversation
PR #1 left benchmark_results_unique and eval_results_unique unchanged when it demoted spec_method to a per-measurement jsonb. With two MTP variants (mtp_layers=4 vs 6) now sharing one config_id, rows with the same (workflow_run, config, isl, osl, conc) but different techniques collided on the existing constraint and the later insert overwrote the earlier one. First post-deploy ingest of gemma4 run 26387431571 landed 6 of ~24 expected rows for exactly this reason. Migration 007 adds techniques to both unique constraints and re- truncates so re-ingest from scratch is clean. The bulk insert paths also need techniques in their ON CONFLICT clause and in their in-batch dedup discriminator — fixed in benchmark-ingest.ts and eval-ingest.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
PR #1 left
benchmark_results_uniqueandeval_results_uniqueunchanged when it demotedspec_methodto a per-measurementtechniquesjsonb. With two MTP variants (mtp_layers=4vs6) now sharing oneconfig_id, rows with the same(workflow_run, config, isl, osl, conc)but differenttechniquescollide on the existing constraint and the later insert overwrites the earlier one.First post-deploy ingest of gemma4 run 26387431571 landed 6 of ~24 expected rows for exactly this reason. The remaining 18 silently got clobbered.
Migration 007 adds
techniquesto both unique constraints and re-truncates so re-ingest from scratch is clean. The bulk insert paths also needtechniquesin theirON CONFLICTclause and in their in-batch dedup discriminator — fixed inbenchmark-ingest.tsandeval-ingest.ts.Verification (post-merge)
Test plan
mtp_layers=4andmtp_layers=6represented🤖 Generated with Claude Code