Skip to content

feat(api): external link rot detection in janitor#81

Open
advancedresearcharray wants to merge 11 commits into
mainfrom
feat/issue-423-external-link-rot-hands-on
Open

feat(api): external link rot detection in janitor#81
advancedresearcharray wants to merge 11 commits into
mainfrom
feat/issue-423-external-link-rot-hands-on

Conversation

@advancedresearcharray

Copy link
Copy Markdown
Owner

Summary

  • Adds opt-in janitor rule external-link-rot that scans markdown bodies for external http:// / https:// URLs and HTTP-probes them for rot (4xx/5xx/unreachable).
  • Results appear in GET /api/kiwi/janitor under external_links and matching issues entries; wired through scheduled janitor, kiwifs check, and kiwifs janitor.
  • Configurable timeout, ignore/allow lists, cache TTL, per-scan cap, concurrency limit, and request delay; results cached at .kiwi/cache/link-check.json with SSRF guards for private IPs and metadata endpoints.

Upstream: kiwifs#423

Test plan

  • go test ./internal/janitor/... -count=1 — external link rot regression tests
  • go test ./internal/config/... -count=1 — external link config parsing
  • go test ./internal/... -count=1 — full internal suite green
  • Enable external_link_check = true in a workspace and confirm broken URLs surface in /api/kiwi/janitor

Made with Cursor

Array Fleet and others added 11 commits July 3, 2026 15:27
Closes kiwifs#423. Opt-in janitor rule scans markdown bodies for external URLs,
rate-limits HEAD/GET checks, caches results, and reports broken links in
external_links and issue results.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add SSRF guards, configurable rate limits, optional domain whitelist,
workspace root validation, and expanded regression tests for issue kiwifs#423.

Co-authored-by: Cursor <cursoragent@cursor.com>
…test

Remove unrelated workspace template scaffolds that broke lint tests and
address peer review by adding regression coverage for unreachable URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove unrelated knowledge/runbook/research template files that were
accidentally included during cherry-pick; issue kiwifs#423 scope is janitor
external link rot detection only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Closes acceptance gaps for issue kiwifs#423: verify YAML frontmatter URLs are not
probed and cached 404s still surface in external_links on later scans.

Co-authored-by: Cursor <cursoragent@cursor.com>
Strengthen external link rot coverage for rate-limit concurrency,
User-Agent header, and ScanResult external_links API serialization.

Co-authored-by: Cursor <cursoragent@cursor.com>
Log cherry-pick delivery from main with test verification for fleet publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
…livery

Re-ran janitor and config regression tests after fleet delivery failure;
documents passing verification before PR publish.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Block redirect SSRF, sanitize allow/ignore host patterns, refactor probe
helpers, and add regression tests for request delay, timeouts, and metadata hosts.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Hands-on takeover confirms external link rot janitor feature passes all
regression tests including SSRF guards, rate limits, and cache behavior.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant