Cotal TypeScript packages
    Preparing search index...

    Function assertSpaceMaterialReapable

    • cotal space rm STEP 1'S PRECONDITION for the step 7 reap (per-space-lifecycle.md §2.2), which is deliberately not checked at step 7.

      THE ORDERING IS THE DESIGN. Step 5 is the point of no return: it deletes the tenant's streams and buckets. Step 7 is the local reap. A precondition discovered at step 7 would refuse AFTER the data is gone and the config re-rendered, leaving the journal entry standing — and since the check would fail identically on every re-run, the removal a crash is supposed to be able to finish could never finish at all. So the question is asked at step 1, beside the inventory read that is already happening, where a refusal costs the operator nothing.

      WHAT IT REFUSES: a root still holding root-scoped material for any P7 kind. space rm runs only on a multi-tenant root (§2.2 step 2 refuses the last tenant), and on such a root that material is unattributable in the §2.1 sense — it belongs to whichever tenant booted first, unrecorded. Reaping around it strands what may be the departing tenant's live $SYS pair for a survivor to inherit; reaping it may take a survivor's. There is no third answer, and the honest move is to refuse before anything is destroyed rather than to pick one silently.

      NOT YET CALLED: cotal space rm does not exist as a command today (§2.2 designs it; no space verb is implemented). This lands with the material it guards so the verb cannot be written without it, the same reason assertNoUnsegmentedLegacyMaterial landed with commit 1.

      Parameters

      • root: string
      • space: string
      • operation: string

      Returns void