# =============================================================================
# Nightly-sweep Lychee ignore patterns (Tier 3 only)
# =============================================================================
# Identical to shared/config/.lycheeignore EXCEPT the mlsysbook.ai blanket
# exclusion is removed so the nightly crawl catches broken internal links.
#
# Why the split:
#   Tier 2 (validate-dev) runs BEFORE deploy — mlsysbook.ai content may not
#   yet be live, so checking those URLs produces false 404s. The blanket
#   exclusion in .lycheeignore is correct for pre-deploy CI.
#
#   Tier 3 (link-rot-nightly) runs nightly AFTER all subsites are deployed —
#   mlsysbook.ai IS live, so broken internal links are real 404s we need to
#   catch. This file removes that blanket exclusion so the nightly sweep
#   catches them.
#
# Usage: pass to infra-link-rot-nightly.yml via lycheeignore_path input.
# =============================================================================

# --- Localhost / private network ---
^https?://localhost(:\d+)?(/.*)?$
^https?://127\.0\.0\.1(:\d+)?(/.*)?$
^https?://192\.168\.\d+\.\d+(:\d+)?(/.*)?$
^https?://10\.\d+\.\d+\.\d+(:\d+)?(/.*)?$

# --- Slide decks behind Google auth (return 200 to logged-in users only) ---
^https://docs\.google\.com/presentation/

# --- Known transient 404s (re-add once content is restored) ---
^https://www\.reuters\.com/?$
# 2026-09-12: files.grouplens.org serves a TLS certificate that expired 2026-08-28.
# The MovieLens-20M URL itself is correct. Remove this line once the cert is renewed.
^https://files\.grouplens\.org/

# NOTE: mlsysbook.ai is intentionally NOT excluded here.
# The nightly sweep runs after deploy — broken mlsysbook.ai links are real 404s.

# --- Slide pages for volumes not yet released live ---
# slides-publish-live.yml drops vol3.html and vol4.html until those volumes go
# live (LIVE_VOLUMES), and the release gate in shared/config/site-head.html hides
# links to them. The Instructor Hub syllabi still link to them in source.
# Remove this line when Volumes III and IV join LIVE_VOLUMES.
^https://mlsysbook\.ai/slides/vol[34]\.html(#.*)?$

# --- Dev preview targets (not a concern for nightly) ---
^https://harvard-edge\.github\.io/cs249r_book_dev/

# --- SPA routes that use # for client-side routing (not document anchors) ---
^https://star-history\.com/#

# --- Unrendered JS template literals (false positives) ---
^https?://[^/]+/[^?#\s]*\$%7B[A-Za-z_][A-Za-z0-9_]*\.[A-Za-z_][A-Za-z0-9_]*%7D

# --- GitHub avatar URLs ---
^https://github\.com/[A-Za-z0-9][A-Za-z0-9-]*\.png(\?size=\d+)?$

# --- Synced from .lycheeignore (added there 2026-10-20 and 2026-10-27) ---
# Contributor profile links that are gone at the source. farhan523 deleted their
# GitHub account (API 404); sharadchitlang.ai stopped resolving. Ignored rather
# than removed so the contributor credit stays.
^https?://github\.com/farhan523/?$
^https?://(www\.)?sharadchitlang\.ai/
# grouplens.org (the MovieLens dataset source) times out from the CI runner; the
# link is the canonical dataset page, so it stays in the prose.
^https?://(www\.)?grouplens\.org/

# =============================================================================
# Anti-bot false positives — identical to .lycheeignore
# =============================================================================

^https?://(www\.)?linkedin\.com/
^https?://(www\.)?(twitter|x)\.com/
^https?://[a-z0-9.-]+\.harvard\.edu/people/
^https?://(www\.)?edgeaifoundation\.org/
^https?://discuss\.tinymlx\.org/
^https?://(www\.)?edx\.org/(professional-certificate|course)/
^https?://(www\.)?mpstewart\.net/
^https?://[a-z0-9.-]+\.medium\.com/
^https?://towardsdatascience\.com/
^https?://(www\.)?forbes\.com/
^https?://(www\.)?wsj\.com/
^https?://(www\.)?reuters\.com/
^https?://(www\.)?stackoverflow\.com/
^https?://[a-z]+\.stackexchange\.com/
^https?://(www\.)?youtube\.com/(c|channel|@)/
^https?://github\.com/tinyMLx/courseware/raw/master/edX/
^https?://github\.com/[^/]+/[^/]+/issues/new
^https?://github\.com/[^/]+/[^/]+/releases/download/
^https?://(www\.)?laurencemoroney\.com/
# 2026-09-15: intermittent 202 to the CI runner, 200 to curl (see .lycheeignore).
^https?://(www\.)?larissasuzuki\.com/

# Incomplete TLS certificate chain: the server omits its intermediate cert, so
# lychee rejects it while browsers load the page. The IEEE education viewpoint
# paper linked from the volume landing pages. Mirrors the entry in
# binder/config/linting/.lycheeignore, which the nightly file had drifted from.
^https://web\.eng\.fiu\.edu/gaquan/Papers/ESWEEK24Papers/

# Fragment-only Markdown links (e.g. "[Chapter 3](#chapter-3-...)") are resolved
# by lychee against the checkout path, producing a file:// URL for a sibling
# that never existed. Scoped to the archival edX README so a genuinely missing
# local file is still reported everywhere else.
^file:///.*/slides/tinyml/chapter-3-applications-of-tinyml$

# 2026-10-09: a shell listing that splits a long URL with a trailing backslash
# ("wget https://host/path/\" then the rest on the next line) is extracted as a
# fragment ending in "//". The joined command is valid; the fragment never is.
^https?://\S+//$

# HTTP/2 protocol error to lychee, loads in browsers. Mirrors the entry in
# binder/config/linting/.lycheeignore, which the kits sweep does not read.
^https://www\.st\.com/en/mems-and-sensors/lsm6dsox\.html$

# Contributor accounts since deleted on GitHub. The credit stays in
# tinytorch/guide/credits.qmd (generated from .all-contributorsrc); only the
# profile link is dead.
^https://github\.com/jettythek/?$
^https://github\.com/joeswagson/?$
