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
Labels
Clear labels
accessibility
area/billing
area/catalog
area/discourse
area/domains
area/entitlements
area/fedwiki
area/identity
area/integrations
area/licensing
area/member-ui
area/meta
area/operator-ui
area/ops
area/testing
duplicate
good-first-issue
invalid
privacy
security
upstream
wontfix
A barrier for people using assistive technology or a keyboard alone.
The Stripe mirror, checkout, subscriptions, invoices, fulfillment.
Products, prices, plan ladders, purchasability.
The Discourse integration.
The domains registry, claims, placements, the certificate ask.
Entitlement sets, rules, grants, pools, provisioning.
The Federated Wiki integration and farm sync.
Sign-in, sessions, persons, organizations, workspaces, roles.
The provider registry, outbox and webhooks in general.
Licenses, the contributor agreement, SPDX headers.
Member pages.
The repository itself, its contributing guide, CI, the tracker and the workflow.
Operator pages, forms, lists, the design system.
Deployment, configuration, migrations, workflows, instance settings.
The test stack, screens, lint, walkthroughs.
Closed because another issue already covers it.
Small, self-contained, and explained enough to be a first contribution.
Closed because it is not a ticket for this repository.
Touches what a person's data reveals.
Touches authentication, authorization, secrets or data exposure.
Waits on another repository or project before it can move.
Closed because it will not be done, with the reason in the last comment.
kind
bug
The software does something other than what it promises; closed when it again does what it promises.
kind
debt
Code, tests or tooling to clean up with nothing visible changing; closed when they are cleaner.
kind
design
A question to settle before work can be defined; closed when the decision is written down.
kind
docs
Documentation that is wrong or missing; closed when it says the right thing.
kind
enhancement
Something the software does not do yet; closed when it does.
priority
critical
Blocks the active milestone or harms members now.
priority
high
Next in line inside the active milestone.
priority
low
Inside the active milestone, when nothing else is left.
priority
medium
Inside the active milestone, after the high ones.
Milestone
No items
No Milestone
Public launch
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wiki-cafe/member-console#283
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 unlessfedwiki-sync-enabledis 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
fedwiki-sync-enabledunset.archived_atback more than 30 days.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.
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-enabledis 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-intervalsets 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