With the FedWiki sync off, archived sites are never purged and a downgrade never parks sites #283

Closed
opened 2026-10-28 02:44:22 +00:00 by cgalo5758 · 1 comment
Owner

What happens

Some terms first. The sync is the console's periodic read of the wiki farm's sites. The retention purge permanently deletes a site that has been archived for 30 days. Parking is how the console enforces a lower site limit after a plan change: it turns sites beyond the new limit read-only.

The purge and the parking sweep run only as steps of the sync workflow (internal/integrations/fedwiki/workflows/sync.go:126-147), and the sync is off unless fedwiki-sync-enabled is set (internal/integrations/fedwiki/fedwiki.go:214; at boot, with it unset, the console pauses any leftover sync schedule and starts none, :542-549). On a deployment that keeps the default, no archived site is ever purged, and an organization that moves to a plan with fewer sites keeps every site active.

The member's sites page says otherwise: the archive confirmation reads "restore it any time within 30 days", and the Archived section reads "Archived sites are removed automatically after 30 days." (internal/integrations/fedwiki/templates/fedwiki_sites.html:170, :187). The FedWiki sites spec requires the purge after 30 days with no condition ("Member site archival is reversible", openspec/specs/fedwiki-sites/spec.md:402, :418-421).

What should happen

The purge and the parking sweep run whether or not the sync is enabled, on a schedule of their own, so the 30 days the member is told hold on every deployment, and a lower site limit takes effect.

Where

internal/integrations/fedwiki/workflows/sync.go:126-147; internal/integrations/fedwiki/fedwiki.go:214, :542-549; internal/integrations/fedwiki/templates/fedwiki_sites.html:170, :187.

Steps

  1. Run the console with the FedWiki integration configured and fedwiki-sync-enabled unset.
  2. Archive a site, and move its archived_at back more than 30 days.
  3. Wait past any interval: the site stays archived, and its row and farm content remain.

Why it matters

Members are told archived sites are removed after 30 days, and a plan's site limit is the console's to enforce; on a default deployment neither happens.

### What happens Some terms first. The sync is the console's periodic read of the wiki farm's sites. The retention purge permanently deletes a site that has been archived for 30 days. Parking is how the console enforces a lower site limit after a plan change: it turns sites beyond the new limit read-only. The purge and the parking sweep run only as steps of the sync workflow (`internal/integrations/fedwiki/workflows/sync.go:126-147`), and the sync is off unless `fedwiki-sync-enabled` is set (`internal/integrations/fedwiki/fedwiki.go:214`; at boot, with it unset, the console pauses any leftover sync schedule and starts none, `:542-549`). On a deployment that keeps the default, no archived site is ever purged, and an organization that moves to a plan with fewer sites keeps every site active. The member's sites page says otherwise: the archive confirmation reads "restore it any time within 30 days", and the Archived section reads "Archived sites are removed automatically after 30 days." (`internal/integrations/fedwiki/templates/fedwiki_sites.html:170`, `:187`). The FedWiki sites spec requires the purge after 30 days with no condition ("Member site archival is reversible", `openspec/specs/fedwiki-sites/spec.md:402`, `:418-421`). ### What should happen The purge and the parking sweep run whether or not the sync is enabled, on a schedule of their own, so the 30 days the member is told hold on every deployment, and a lower site limit takes effect. ### Where `internal/integrations/fedwiki/workflows/sync.go:126-147`; `internal/integrations/fedwiki/fedwiki.go:214`, `:542-549`; `internal/integrations/fedwiki/templates/fedwiki_sites.html:170`, `:187`. ### Steps 1. Run the console with the FedWiki integration configured and `fedwiki-sync-enabled` unset. 2. Archive a site, and move its `archived_at` back more than 30 days. 3. Wait past any interval: the site stays archived, and its row and farm content remain. ### Why it matters Members are told archived sites are removed after 30 days, and a plan's site limit is the console's to enforce; on a default deployment neither happens.
cgalo5758 added this to the Public launch milestone 2026-10-28 02:44:22 +00:00
cgalo5758 added the
kind
bug
area/fedwiki
labels 2026-10-28 02:44:22 +00:00
Author
Owner

Archived FedWiki sites are now removed after their 30 days, and sites over a lowered plan limit are made read-only, whether or not the farm sync is on. Both used to run only inside the sync, which is off by default, so a default deployment did neither.

FedWiki's schedule now exists whenever the farm connection is configured, and each run does three things in order: it syncs with the farm when fedwiki-sync-enabled is on, removes the archived sites whose 30 days are up, and makes sites over a plan's limit read-only. Keeping them in one run, in that order, means the removal and the parking never work from a farm listing older than the run. fedwiki-sync-interval sets how often the whole run happens. When the sync is on and fails, the run skips the removal, because a removal cannot be undone and a site restored on the farm only reaches the console through the sync; it still parks sites, which can be undone.

Parking now chooses sites by the time the farm last changed them, and by creation time for a site the sync never saw, so it works with the sync off; the member's Keep active swap uses the same order. FedWiki now requires Temporal, since this work has nothing else to run it. The operator's FedWiki page shows the run under "Site maintenance". A failed read of an organization's entitlement during parking is logged as a warning instead of being taken as no entitlement.

Deploying over a running console: count the archived sites already past their 30 days and the pools over their limit before deploying, because the first run processes that whole backlog and the removal cannot be undone; and let an old sync run finish (pause the schedule, wait, deploy, resume), or terminate it if it is stuck after the upgrade, since the schedule skips a tick while a run is still open.

Commit: 9bcbaebe

Archived FedWiki sites are now removed after their 30 days, and sites over a lowered plan limit are made read-only, whether or not the farm sync is on. Both used to run only inside the sync, which is off by default, so a default deployment did neither. FedWiki's schedule now exists whenever the farm connection is configured, and each run does three things in order: it syncs with the farm when `fedwiki-sync-enabled` is on, removes the archived sites whose 30 days are up, and makes sites over a plan's limit read-only. Keeping them in one run, in that order, means the removal and the parking never work from a farm listing older than the run. `fedwiki-sync-interval` sets how often the whole run happens. When the sync is on and fails, the run skips the removal, because a removal cannot be undone and a site restored on the farm only reaches the console through the sync; it still parks sites, which can be undone. Parking now chooses sites by the time the farm last changed them, and by creation time for a site the sync never saw, so it works with the sync off; the member's Keep active swap uses the same order. FedWiki now requires Temporal, since this work has nothing else to run it. The operator's FedWiki page shows the run under "Site maintenance". A failed read of an organization's entitlement during parking is logged as a warning instead of being taken as no entitlement. Deploying over a running console: count the archived sites already past their 30 days and the pools over their limit before deploying, because the first run processes that whole backlog and the removal cannot be undone; and let an old sync run finish (pause the schedule, wait, deploy, resume), or terminate it if it is stuck after the upgrade, since the schedule skips a tick while a run is still open. Commit: 9bcbaebe
Sign in to join this conversation.
No labels area/fedwiki
kind
bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#283