mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-18 00:57:55 +00:00
* 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> |
||
|---|---|---|
| .. | ||
| deb-src | ||
| nsis | ||
| plugins | ||
| buildDebian.sh | ||
| buildForWindows.sh | ||
| checkAllPads.ts | ||
| checkPad.ts | ||
| cleanRun.sh | ||
| commonPlugins.ts | ||
| compactAllPads.ts | ||
| compactPad.ts | ||
| compactStalePads.ts | ||
| convertSettings.json.template | ||
| createRelease.sh | ||
| createUserSession.ts | ||
| debugRun.sh | ||
| deleteAllGroupSessions.ts | ||
| deletePad.ts | ||
| extractPadData.ts | ||
| fastRun.sh | ||
| functions.sh | ||
| generateReleaseNotes.ts | ||
| importSqlFile.ts | ||
| installDeps.sh | ||
| installer.ps1 | ||
| installer.sh | ||
| installLocalPlugins.sh | ||
| make_docs.ts | ||
| migrateDB.ts | ||
| migrateDirtyDBtoRealDB.ts | ||
| package.json | ||
| plugins.ts | ||
| push-after-release.sh | ||
| rebuildPad.ts | ||
| release.ts | ||
| repairPad.ts | ||
| run-frontend-tests-with-disables.sh | ||
| run.sh | ||
| safeRun.sh | ||
| setup-trusted-publishers.sh | ||
| tsconfig.json | ||
| updatePlugins.sh | ||