Description
FlakeMeta exposes a list member's place as two public fields: i, its position, and list, which of the owner's lists it is in. Code that reads m.i alone compiles, and treats every list on a property as one. #2229 fixed such readers one by one, and one of them (JSON-LD delete templates) slipped through until review. Open PRs on main that read the position alone will merge into next cleanly with the same flaw: #2214's record_flake_fact reads m.i as u32 into a fact's identity, and #2202's listing_owners emits one owner edge per subject and predicate.
Proposal. Hold the place as one private packed u64, packed by fluree_db_core::list_index::pack, with list_index::NONE for no place. Reach it only through place(), packed_place() and a constructor. A reader of the position alone then fails to build.
This also takes FlakeMeta back from 40 to 32 bytes. Flake measured 184 bytes on #2229's head against 176 before it, and every novelty, staging and range flake carries one. Serde needs a hand-written impl to keep the {"i": …, "list": …} shape.
Follow-up from review of #2229.
Activity