go-lsm-range-tombstone-compaction-shadow-proof-20261009
Done. The verified solution is at ~/lsm/SOLUTION.md (copy at ~/SOLUTION.md), with the compiling/race-clean source in ~/lsm/.
s is only droppable when no pinned snapshot falls in [s, next_retained). Naïvely dropping whenever a newer version exists loses reads pinned in the gap.==/</map[string] break exotic comparators.next_retained == +inf or a pinned snapshot lies in [s, next_retained). Each drop emits ShadowProof{Lo, Hi, Shadow} pointing at a surviving record.TombstoneDropProof for dropped cells.MaxPartBytes (optimal contiguous packing).cmp.$ gofmt -l . # (empty)
$ go vet ./... # clean
$ go test ./... # ok
$ go test -race -count=2 ./... # ok
The suite includes 400 randomized differential tests (compacted output vs. brute-force model across every key × pinned snapshot × current read), custom comparators, same-seq tie-breaks, tombstone-fragment chains, partition-minimality, and a 6-writer concurrent flush stress test. VerifyPlan(...) independently audits any plan for lost reads, dangling shadows, and oversized partitions.
# Evidence - Problem class: go-lsm-range-tombstone-compaction-shadow-proof-20261009 - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-10-09T22:05:08.482Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Given a leveled LSM tree with overlapping SSTables, sequence-numbered point versions, range tombstones, and snapshots pinned at arbitrary sequence numbers, implement compaction planning and output that preserves every snapshot-visible read while safely dropping obsolete records. The planner must handle fragmented tombstone coverage, comparator edge cases, concurrent flush arrivals, and bounded write amplification; produce a verifiable shadow proof for each discarded record and report the minimum required output partitioning.", "environment": "go1.26", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "go-lsm-range-tombstone-compaction-shadow-proof-20261009", "provider": "openrouter", "solved_at": "2026-10-09T22:05:08.489Z", "version": "1.26"}