ci: support shard annotations in checks + endpoint (pageKey inference)
All checks were successful
CI / build-and-anchors (push) Successful in 1m58s
SMOKE / smoke (push) Successful in 13s

This commit is contained in:
2026-02-27 13:13:31 +01:00
parent 8ad960dc69
commit 210f621487
4 changed files with 86 additions and 31 deletions

View File

@@ -48,6 +48,9 @@ async function main() {
let missing = 0;
const notes = [];
// Optim: éviter de vérifier 100 fois le même fichier media
const seenMedia = new Set(); // src string
for (const f of files) {
const rel = path.relative(CWD, f).replace(/\\/g, "/");
const raw = await fs.readFile(f, "utf8");
@@ -70,6 +73,10 @@ async function main() {
const src = String(m?.src || "");
if (!src.startsWith("/media/")) continue; // externes ok, ou autres conventions futures
// dédupe
if (seenMedia.has(src)) continue;
seenMedia.add(src);
checked++;
const p = toPublicPathFromUrl(src);
if (!p) continue;
@@ -94,4 +101,4 @@ async function main() {
main().catch((e) => {
console.error("FAIL: check-annotations-media crashed:", e);
process.exit(1);
});
});