Skip to content

Fix recursive fan-out and request deduplication - #1

Open
iGotYourBackMr wants to merge 1 commit into
lrt950:feat/recursive-link-checkingfrom
iGotYourBackMr:bounty/recursive-backpressure
Open

iGotYourBackMr wants to merge 1 commit into
lrt950:feat/recursive-link-checkingfrom
iGotYourBackMr:bounty/recursive-backpressure

Conversation

@iGotYourBackMr

Copy link
Copy Markdown

PR lycheeverse#2283 currently avoids a bounded feedback-channel stall by spawning one task per discovered URL, but recursive requests can still be duplicated and the spawned tasks act as an unbounded queue with extra overhead.

This patch switches the feedback path to an unbounded channel directly and atomically records each discovered URI before enqueueing it. Initial input URIs seed the same set so a cycle cannot immediately enqueue a starting page again. It also adds a deterministic regression where two pages discover the same delayed target: the unmodified branch makes four requests and reaches the target twice, while this patch makes three requests and reaches it once.

Validation:

  • cargo test -p lychee --all-features --test cli recursive: 8 passed
  • cargo clippy -p lychee --all-features --bin lychee --test cli -- -D warnings: passed
  • cargo fmt --all -- --check: passed

This is one commit on top of lycheeverse#2283 commit 9623a957. The implementation and tests were AI-assisted by OpenAI Codex on behalf of iGotYourBackMr.

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