GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Can this device HOLD a write to layerId and send it later?

      🛑 THE QUESTION IS "CAN WE HOLD IT", NOT "CAN THE DRAIN PUSH IT", AND THE FIRST DRAFT ASKED THE SECOND. It resolved the layer's write target and answered false when none was declared, so a caller routed those writes to its own online path. The E2E suite refuted it on the SHIPPED bundle: dev-backend.cjs (DNS-05) strips write.endpoint from every deliverable, so on the demo NO layer was holdable — and three specs that had always seen an offline save reach the outbox went red.

      The refutation is the right one, and it is a product argument rather than a test one: holding beats losing. A capture with no write target, once queued, is visible in the queue, counted by the sync banner, and eventually set aside with a NAMED motive (layerNoLongerWritable). Sent to a dead endpoint instead, it fails on the spot and is gone — which the offline contract's first property forbids.

      So the write target is the DRAIN's business, and this is the ENGINE's: is the store wired, and does the profile know this layer? That question also has the merit of being answerable without the network.

      Parameters

      • layerId: string

        The layer about to be written to.

      Returns boolean

      true when a local write will be accepted and kept.