etherpad-lite/doc
John McLear d6a55c2283
feat(7642): bin/compactStalePads — staleness-gated bulk compaction (#7708)
* feat(7642): bin/compactStalePads — staleness-gated bulk compaction

Adds bin/compactStalePads with --older-than / --keep / --dry-run.
Composes listAllPads → getLastEdited → compactPad so hot pads in
active timeslider use are left alone and only the cold tail is
compacted. Targeting stays a CLI concern; compactPad's API surface
is unchanged.

Per-pad failures (including a getLastEdited fault) don't stop the
run — same error-tolerance shape as compactAllPads. End-to-end test
plumbs through the real /api/1.3.1/getLastEdited + compactPad
endpoints to lock the adapter contract.

Daily-cron variant (cleanup.compactOlderThanDays setting) deferred
to a follow-up so this PR stays focused on the on-demand operator
tool from the issue's primary acceptance bullet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(7642): TOCTOU recheck before compaction + admin CLI docs

Qodo flagged two real issues:

1. Race window between staleness selection and compaction. On a long
   bulk run a pad could become active between first-pass filtering and
   compactPad, which would then kick those sessions. Added a getLastEdited
   recheck right before each compact call; if the pad is now fresh it's
   reclassified as skippedFresh rather than failed (the user did the
   right thing — edited it — and we bow out).

2. doc/cli.md had nothing on pad compaction at all (gap predates this
   PR; #6194 landed without doc updates). Added a Pad compaction section
   covering all three CLIs — compactPad, compactAllPads, compactStalePads
   — so the toolset is discoverable as a unit.

Tests cover both the recheck-skip path and a recheck-failure path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 22:41:52 +02:00
..
.vitepress chore: Rename some occurences of etherpad-lite to etherpad (#7552) 2026-04-19 16:53:57 +02:00
admin feat(updater): tier 2 — manual-click update from /admin/update (#7607) (#7704) 2026-05-10 09:00:07 +01:00
api feat(userlist): click a user to open chat with @<name> prefilled (#7660) 2026-05-03 05:40:44 +01:00
assets normalized 3rd level headings and adapted the max-width of the body (#5994) 2023-10-19 22:12:32 +02:00
public Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
.gitignore Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
cli.md feat(7642): bin/compactStalePads — staleness-gated bulk compaction (#7708) 2026-05-10 22:41:52 +02:00
cookies.adoc normalized 3rd level headings and adapted the max-width of the body (#5994) 2023-10-19 22:12:32 +02:00
cookies.md feat(gdpr): HttpOnly author-token cookie (PR3 of #6701) (#7548) 2026-05-03 05:56:56 +01:00
database.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
demo.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
docker.adoc docs(7538): soffice is now optional for docx/pdf (#7707) 2026-05-09 11:29:43 +01:00
docker.md docs(7538): soffice is now optional for docx/pdf (#7707) 2026-05-09 11:29:43 +01:00
documentation.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
documentation.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
index.adoc Added docs as asciidoctor with cross platform support. (#5733) 2023-06-21 13:13:31 +01:00
index.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
localization.adoc fixed format of json (#5992) 2023-10-19 21:33:12 +02:00
localization.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00
npm-trusted-publishing.md ci(docs): build on PRs and pin Node 22 (Qodo follow-up to #7640) (#7645) 2026-05-01 17:12:23 +01:00
package.json chore(docker): clear most CVEs in published image (npm/pnpm/uuid + drop curl) (#7674) 2026-05-06 22:00:13 +02:00
PLUGIN_FEATURE_DISABLES.md test: tag rtl_url_param toggle-off specs with @feature:rtl-toggle (#7661) 2026-05-03 13:26:50 +08:00
PLUGIN_FRONTEND_TESTS.md ci(playwright): discover plugin frontend specs (closes #7622) (#7623) 2026-04-28 06:33:43 +01:00
plugins.adoc normalized 3rd level headings and adapted the max-width of the body (#5994) 2023-10-19 22:12:32 +02:00
plugins.md feat(padOptions): pass plugin-namespaced ep_* keys through applyPadSettings (#7698) 2026-05-07 17:17:05 +01:00
privacy.md feat(gdpr): author erasure (PR5 of #6701) (#7550) 2026-05-03 12:30:49 +01:00
skins.adoc feat(pad): scrub history in-place on the pad URL (#7659) (#7710) 2026-05-10 16:21:56 +01:00
skins.md feat(pad): scrub history in-place on the pad URL (#7659) (#7710) 2026-05-10 16:21:56 +01:00
stats.adoc chore: added documentation for prometheus 2025-08-25 21:13:38 +02:00
stats.md Added vitepress for documentation. (#6270) 2024-03-23 20:58:05 +01:00