Repository navigation
quest(m3): delete BinaryHeap from std's MIR - #637
Conversation
Quest-Claim: 28367262a3ae75b7
std's BinaryHeap needs std structs and writing std functions translated from MIR, which the translator refuses, and Hole's pointer arithmetic into arrays of objects, which the epic's 2026-11-01 decision refuses. The port follows std's sifts line for line and is tested against native on every `just ci`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit fa6c31f against base 6231cec.
No actionable findings in this two-file documentation change. The BinaryHeap MIR quest and its Required-list entry are removed together; runtime implementations and tests are unchanged. Retaining the existing port is consistent with the stated decision to avoid broadening unsafe MIR support solely for this replacement, alongside the Vec::drain decision in #636.
Verification limits: GitHub-only static review of the deletion. I did not run quest validation or reproduce the prerequisite analysis, differential tests, or sibling spike's timings. No BinaryHeap performance measurement is established by this review. This is a COMMENT, not an approval.
(Written by review (OpenAI))
|
No actionable comments were generated in the recent review. WalkthroughThe Required list entry for translating Merge Risk:
|

Summary
Deletes BinaryHeap from std's MIR and its link in the ts-unsafe epic. The runtime's port (
rs.BinaryHeap,rs.PeekMutints/runtime/rs/collections.ts) stays.Why
ts/src/lower/mod.rs). std's heap needsBinaryHeap<T, A>,PeekMut,Hole,RebuildOnDrop,Iter,IntoIter, andDrainto translate as the crate's own structs do. Andlibrary::from_mirrefuses std functions that areunsafeor take&mutor a raw pointer, which covers nearly every heap method.Hole::move_toisptr::copy_nonoverlapping(data.as_mut_ptr().add(index), data.as_mut_ptr().add(pos), 1): pointer arithmetic into an array of objects, which the epic's 2026-11-01 decision refuses. Every object heap in theorderscase (Item, tuples,[u8; 2],String) would become a refusal.Drainfrom MIR at 3 to 12x the port's CPU time foru8/u32elements (Node 24, CPU time on a loaded host), with most of it inProxyreads of theVec's room. No heap translation exists to measure, butHolereads and writes through the same room.The port follows std's sifts line for line, and the
ordersdifferential case tests it against native on everyjust ci.Decisions
Impact
None: quest files only. No public API or wire change.
Validation
quest check --fix: ok.just check: passed (lint, quest).Models
Size: M
Implementer: Claude Code, claude-opus-5-5, high effort
Review
Skipped: a quest-only deletion needs no review round.
(Written by Claude Opus 5.5 with high effort)
🤖 Generated with Claude Code