Archiving and restoring FedWiki sites changes which sites are active without the cooldown #338

Open
opened 2026-11-20 04:58:55 +00:00 by cgalo5758 · 0 comments
Owner

What happens

A member may change which of their sites are active only once per cooldown window, but archiving and restoring routes around it. Archiving a site that a downgrade or a swap left read-only clears that mark (internal/integrations/fedwiki/store/queries/sites.sql, SetSiteStatusByID), and a restore of an archived site never counts as a change of the active sites: it skips the cooldown and checks only that a slot is free (internal/integrations/fedwiki/web/site_actions.go:425-441). At the limit, a member archives a read-only site, archives an active one to free its slot, and restores the first. The site that was read-only is now active, and no wait starts. Repeated, this lets the member choose which sites are editable as often as they like; each site swapped out goes offline as archived instead of staying read-only.

The spec says both: the member may change which sites are active "subject to a per-workspace cooldown", and "A Restore of an archived site SHALL never be a rotation" (openspec/specs/plan-downgrade/spec.md).

What should happen

Bringing a site that was left read-only back into the active set counts against the cooldown, whether it goes there straight or through the archive. Restoring a site the member archived while it was active stays free.

Where

internal/integrations/fedwiki/web/site_actions.go (Archive and Restore), and the swap requirement in openspec/specs/plan-downgrade/spec.md

Steps

  1. A member on a limit of 3 has 3 active sites and a 4th that a downgrade left read-only.
  2. Archive the read-only site, then archive one of the active sites.
  3. Restore the first. It is active, and the cooldown has not started.

Why it matters

A member whose plan funds 3 sites can keep editing every site they hold, three at a time, with no wait between changes.

### What happens A member may change which of their sites are active only once per cooldown window, but archiving and restoring routes around it. Archiving a site that a downgrade or a swap left read-only clears that mark (`internal/integrations/fedwiki/store/queries/sites.sql`, `SetSiteStatusByID`), and a restore of an archived site never counts as a change of the active sites: it skips the cooldown and checks only that a slot is free (`internal/integrations/fedwiki/web/site_actions.go:425-441`). At the limit, a member archives a read-only site, archives an active one to free its slot, and restores the first. The site that was read-only is now active, and no wait starts. Repeated, this lets the member choose which sites are editable as often as they like; each site swapped out goes offline as archived instead of staying read-only. The spec says both: the member may change which sites are active "subject to a per-workspace cooldown", and "A Restore of an archived site SHALL never be a rotation" (`openspec/specs/plan-downgrade/spec.md`). ### What should happen Bringing a site that was left read-only back into the active set counts against the cooldown, whether it goes there straight or through the archive. Restoring a site the member archived while it was active stays free. ### Where `internal/integrations/fedwiki/web/site_actions.go` (Archive and Restore), and the swap requirement in `openspec/specs/plan-downgrade/spec.md` ### Steps 1. A member on a limit of 3 has 3 active sites and a 4th that a downgrade left read-only. 2. Archive the read-only site, then archive one of the active sites. 3. Restore the first. It is active, and the cooldown has not started. ### Why it matters A member whose plan funds 3 sites can keep editing every site they hold, three at a time, with no wait between changes.
cgalo5758 added the
kind
bug
area/fedwikiarea/member-ui
labels 2026-11-20 04:58:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#338