Sites 0.4.0: lifecycle, export, GC #6
Loading…
Reference in a new issue
No description provided.
Delete branch "phase-9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 9 of the Sites plan (spec S13), the last pack phase.
spaceLifecycleHooks, Limedoc 0.85.0):closed/archive-startedtake every site in the space subtree offline (noticespace-closed).frozenonly refuses publishing, which was already checked at publish time; reopen/thaw allows it again.owner-deprovisioned), with no export. On a merge (mergedInto), the sites stay and belong to the surviving account.onBusy: 'skip'across instances) repeats the space rule for missed hooks. A site whose folder is gone goes offline only when the folder is seen missing on two passes ≥ 10 min apart, so an index hiccup never takes a site down.GET sites/:id/export): the published snapshot as served, available to the owner, approvers and admins while online and for 30 days after takedown; panel link "Download the published version". The ZIP writer is small and has no dependency (deflate-raw + CRC-32).contentlock with publishes and library adds (lock order content → site), so an old object cannot be reused at the moment it is deleted.takeDownSites(ids, …)is factored out oftakeDownSitesOf. Notice texts are added for the new reasons.Tests: ZIP (CRC vector, inflate round trip), closed vs frozen space, deprovision vs merge, reconcile on the 2nd look, GC grace and 30-day retention. Pack suite 63/63.
Also checked: loading the pack with
bootstrapPluginsForTest(['sites'])and firing core'srunSpaceLifecycleHooks/runSubjectDeprovisionHookstakes the right sites down. This was a throwaway check because it importsplugin-sdk/host.🤖 Generated with Claude Code