diff --git a/README.md b/README.md index fa15122..f02b0de 100644 --- a/README.md +++ b/README.md @@ -517,12 +517,12 @@ of content is ever fetched per page view. a large site to a handful of requests instead of hydrating the entire article set up front. The page count is exact once the whole set's been scanned, and a lower bound (at least one more page) until then. -- **Crawl health** — if the root author-listing fetch fails outright, if every individual - author's own directory listing fails, or if very few of the known candidate files parsed - successfully (a malformed file name, or a total breakage like the wrong origin or CORS - misconfigured), a small warning banner is shown above the article list instead of silently - rendering an empty page (see `getCrawlStats()` / `renderCrawlHealthWarning()` in - `js/discovery.js` / `js/views.js`). +- **Crawl health** — if the root author-listing fetch fails outright, or if every individual + author's own directory listing fails (wrong origin, CORS misconfigured), a small warning banner + is shown above the article list instead of silently rendering an empty page (see + `getCrawlStats()` / `renderCrawlHealthWarning()` in `js/discovery.js` / `js/views.js`). + Non-conforming `.md` file names aren't treated as a health problem — only as a per-file skip — + since indexing does no per-article fetch that could actually fail. - **Design rationale** — the original crawler design (wave-based crawling with a per-article listing fetch, recency prioritisation, HTML-autoindex fallback, long-term "deploy and forget" constraints) is documented in diff --git a/js/views.js b/js/views.js index 2a69883..bd29d62 100644 --- a/js/views.js +++ b/js/views.js @@ -172,27 +172,29 @@ function renderCard(article) { // autoindex disabled) should be visible rather than silently rendering an // empty/near-empty list forever — see .claude/nginx-sitemap-crawler-plan.md L3. // Three independent signals feed this: the root author-listing fetch itself -// failing outright (rootFailed), every individual author's own listing +// failing outright (rootFailed), or every individual author's own listing // failing (checked regardless of site size, since discovery.js now silently // skips individual author failures — see the wave-2 comment in -// discovery.js), and, for larger sites, a near-zero loaded/total ratio at -// the article level. Only meaningful once the crawl has actually finished -// (`done`) — mid-crawl stats are incomplete and would misreport a healthy -// crawl as broken. +// discovery.js). Unlike an older version of this check, a low loaded/total +// ratio (candidate .md files that didn't match the article naming +// convention) is deliberately *not* treated as a health problem: indexing +// does no per-article fetch at all, so a non-conforming file name is a +// filename issue, not a network/CORS one — and legitimately non-conforming +// .md files (notes, leftovers) coexisting with real articles shouldn't +// trigger a false "something's broken" banner. Only meaningful once the +// crawl has actually finished (`done`) — mid-crawl stats are incomplete and +// would misreport a healthy crawl as broken. function renderCrawlHealthWarning(view, done) { if (!done) return; - const { total, loaded, authorsTotal, authorsFailed, rootFailed } = getCrawlStats(); + const { authorsTotal, authorsFailed, rootFailed } = getCrawlStats(); // rootFailed means the very first listing fetch (the author directories // themselves) couldn't be read at all — a total breakage same in spirit // as every author's own listing failing, just one level higher up. const authorsBroken = rootFailed || (authorsTotal > 0 && authorsFailed === authorsTotal); - const articlesBroken = total >= 5 && loaded / total < 0.1; - if (!authorsBroken && !articlesBroken) return; + if (!authorsBroken) return; const warning = document.createElement('p'); warning.className = 'error'; - warning.textContent = authorsBroken - ? t('crawlHealthAuthorsFailed') - : t('crawlHealthArticlesFailed', { loaded, total }); + warning.textContent = t('crawlHealthAuthorsFailed'); view.appendChild(warning); } diff --git a/strings/cs.json b/strings/cs.json index 0fd8971..d82ed90 100644 --- a/strings/cs.json +++ b/strings/cs.json @@ -16,7 +16,6 @@ "readingTime": "{minutes} min čtení", "crawlHealthAuthorsFailed": "Pozor: nepodařilo se načíst žádného autora — zkontrolujte nastavení serveru.", - "crawlHealthArticlesFailed": "Pozor: načtena jen {loaded} z {total} položek — zkontrolujte nastavení serveru.", "loadingArticles": "Načítám články…", "loadingGeneric": "Načítám…", diff --git a/strings/en.json b/strings/en.json index d2954b4..02f9964 100644 --- a/strings/en.json +++ b/strings/en.json @@ -16,7 +16,6 @@ "readingTime": "{minutes} min read", "crawlHealthAuthorsFailed": "Warning: couldn't load any authors — check your server configuration.", - "crawlHealthArticlesFailed": "Warning: only loaded {loaded} of {total} items — check your server configuration.", "loadingArticles": "Loading articles…", "loadingGeneric": "Loading…", diff --git a/strings/sk.json b/strings/sk.json index 40f7d6f..ff81b7b 100644 --- a/strings/sk.json +++ b/strings/sk.json @@ -16,7 +16,6 @@ "readingTime": "{minutes} min čítania", "crawlHealthAuthorsFailed": "Pozor: nepodarilo sa načítať žiadneho autora — skontrolujte nastavenie servera.", - "crawlHealthArticlesFailed": "Pozor: načítaných len {loaded} z {total} položiek — skontrolujte nastavenie servera.", "loadingArticles": "Načítavam články…", "loadingGeneric": "Načítavam…",