fix(webmention): silence retry noise for all livefetch versions, bump stale migration to v10

retry patch: regex now matches [patched:livefetch] and [patched:livefetch:vN]
so it silently skips for any livefetch version, not just v2.

reset-stale: bump to v10 to retry posts stuck during v5 rollout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sven
2026-03-21 20:56:02 +01:00
parent bf97dab2ef
commit c0b9878033
2 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@
import { MongoClient } from "mongodb"; import { MongoClient } from "mongodb";
import config from "../indiekit.config.mjs"; import config from "../indiekit.config.mjs";
const MIGRATION_ID = "webmention-sender-reset-stale-v9"; const MIGRATION_ID = "webmention-sender-reset-stale-v10";
const mongodbUrl = config.application?.mongodbUrl; const mongodbUrl = config.application?.mongodbUrl;
if (!mongodbUrl) { if (!mongodbUrl) {

View File

@@ -91,9 +91,9 @@ for (const filePath of candidates) {
} }
if (!source.includes(oldSnippet)) { if (!source.includes(oldSnippet)) {
// livefetch v2 replaces the same block — this patch is intentionally superseded. // Any livefetch version replaces the same block — this patch is superseded.
if (source.includes("[patched:livefetch:v2]")) { if (/\[patched:livefetch(?::v\d+)?\]/.test(source)) {
continue; // silently skip; livefetch v2 is a superset of this patch continue; // silently skip; livefetch is a superset of this patch
} }
console.log(`[patch] webmention-sender-retry: target snippet not found in ${filePath} (package updated?)`); console.log(`[patch] webmention-sender-retry: target snippet not found in ${filePath} (package updated?)`);
continue; continue;