Apply an IFCX file to doc as a layer of opinions rather than as a
seed.
seedFromIfcx routes every node through createEntity, a deliberate
no-op on a path the doc already has — right for seeding from a
snapshot, wrong for merging a layer whose purpose is to modify entities
that already exist. This applier creates missing entities exactly as
the seeder does, and writes existing entities' opinions on top: values
overwrite, anything unmentioned is left alone. null removes a FLAT
attribute, child or inherit ONLY: a nulled pset/quantity property
survives, silently (pinned in test/apply-ifcx-overlay.test.ts).
Deliberately NOT part of seedFromIfcx's option surface: the seeder is
additive-and-idempotent (apps/viewer, snapshot/worker.ts seed a
live session doc with it), and this is a different operation.
Deletion opinions are honoured where the layer states them: an
ifclite::deleted: true node removes the entity, matching composition,
bakeLayers and the MCP layer store. A full IFCX snapshot emits only
what an entity has though, so a key or entity deleted in the source doc
is simply absent rather than nulled or tombstoned, and an overlay
cannot tell that apart from "no opinion" — deletions propagate only
from layers that state them explicitly. Across separate calls, a path
this function itself deleted stays deleted regardless: see
overlay-tombstones.ts.
Apply an IFCX file to
docas a layer of opinions rather than as a seed.seedFromIfcxroutes every node throughcreateEntity, a deliberate no-op on a path the doc already has — right for seeding from a snapshot, wrong for merging a layer whose purpose is to modify entities that already exist. This applier creates missing entities exactly as the seeder does, and writes existing entities' opinions on top: values overwrite, anything unmentioned is left alone.nullremoves a FLAT attribute, child or inherit ONLY: a nulled pset/quantity property survives, silently (pinned intest/apply-ifcx-overlay.test.ts).Deliberately NOT part of
seedFromIfcx's option surface: the seeder is additive-and-idempotent (apps/viewer,snapshot/worker.tsseed a live session doc with it), and this is a different operation.Deletion opinions are honoured where the layer states them: an
ifclite::deleted: truenode removes the entity, matching composition,bakeLayersand the MCP layer store. A full IFCX snapshot emits only what an entity has though, so a key or entity deleted in the source doc is simply absent rather than nulled or tombstoned, and an overlay cannot tell that apart from "no opinion" — deletions propagate only from layers that state them explicitly. Across separate calls, a path this function itself deleted stays deleted regardless: seeoverlay-tombstones.ts.