Skip to content
AITroveRead. Build. Understand.
Make this comfortable

Project: audit graph overlays, path bits, labels, and heap ownership

Last updated: 5 Oct 202635 min read
project
IntermediateBy AITrove Editorial

Review one dispatch system through four distinct structure contracts. A CSR delta overlay stages directed road edits before a compact rebuild. A reachability bitset answers many path questions for one frozen directed topology. Gap labels compare task order while middle inserts can force a relabel. A skew heap melds priority queues and transfers mutable node ownership. These structures can coexist, but their versions and operations cannot be substituted: reachability rows built before a road edit are stale even if the overlay reports the new neighbors correctly.

Acceptance trace

Remove road zero to one and add road zero to four; the logical neighbor row becomes three and four before and after CSR compaction. In a separate six-node path snapshot, node zero reaches five but five does not reach zero. Repeated inserts after T-19 trigger one relabel yet leave T-19 before T-83. Melding two priority queues yields tasks at priorities 19, 29, 47, and 61, and empties the donor. Record when each snapshot is rebuilt and who owns each mutable node.

Failure and cost review

Fuzz overlay add, remove, and compact operations against a direct edge set, including re-adding a deleted base edge. Compare every reachability row against a breadth-first scan for random directed graphs with cycles and isolated vertices. Repeatedly insert after one anchor and verify that current labels are strictly increasing with task order; confirm old labels are not durable identifiers. Merge heaps built in two owners, drain by sorted priority and ID, and assert the donor cannot still pop the transferred nodes. A graph edit should invalidate the old reachability snapshot until it is rebuilt.

Common Mistakes

  • Do not query only base CSR while deltas remain.
  • Do not use a closure row after topology changes.
  • Do not cache order labels as permanent IDs.
  • Do not leave a mutable donor heap attached after meld.

Connected lessons

data structures
projects
Storage details