Build the comparison engine for a site-planning platform: turn two database snapshots into the business diff — what was really edited, renamed, and re-planned — with per-entity identity, reviewed totals, and a paged report.
- Version
- Category
- software-engineering
- Difficulty
- hard
- Model configurations
- 3
- Attempts
- 5
- Public trials
- 50 passed
- Median runtime
- 16m 1s
Instruction
# Build the version diff review The platform snapshots the working database on a schedule (see `platform/snapshots/`), and operators want to review two versions against each other before deciding anything: "I made a mistake in Tuesday's edits — pull up today against Tuesday 06:00 and tell me everything that changed, so I can decide whether to roll back." Implement `lib/versionDiff.mjs` exporting `computeVersionDiff` and `computeVersionDiffDetails` as consumed by `bin/diff.mjs`, following the response contracts in `contracts/versionDiff.schema.mjs` and the house conventions in `contracts/README.md`. The diff must stay reviewable on real databases: identity that survives the app's own flows, aggregated allocation review, bounded payloads with a pager, and read-only execution against both databases. Check your work with `node bin/diff.mjs snap-2026-07-26-0600` and `node contracts/validate.mjs <saved-output.json>`.
Public trials
Results by model
| Model · harness | Mean reward | Range | ± SE | Attempts |
|---|---|---|---|---|
| gemini-3.1-pro-previewOpenCode | 33.0% | 33% – 33% | — | 1 |
| GPT 5.6 SolOpenCode | 33.0% | 33% – 33% | — | 1 |
| Muse Spark 1.3 ContributorOpenCode | 22.0% | 0% – 33% | 11.0 pp | 3 |