Repository navigation
Add opt-in URL deduplication and persistent success caching - #25
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
- Coverage 99.66% 99.30% -0.37%
==========================================
Files 25 26 +1
Lines 603 719 +116
==========================================
+ Hits 601 714 +113
- Misses 2 5 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dblock
force-pushed
the
feature/deduplication-and-success-cache
branch
from
November 7, 2026 12:57
ec5a843 to
0835bd0
Compare
Contributor
Danger ReportNo issues found. |
dblock
force-pushed
the
feature/deduplication-and-success-cache
branch
from
November 7, 2026 20:40
0835bd0 to
4034199
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
force-pushed
the
feature/deduplication-and-success-cache
branch
from
November 7, 2026 20:43
4034199 to
e63116b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Add optional
deduplicate: true: coalesce identical in-flight requests, replay earlier events for late subscribers, reuse successes for the checker lifetime, and recheck completed failures/errors. Every submission retains its original URL and metadata, including withresults: false.Request identity includes the full URL (query values and fragments remain distinct), backend, methods, headers, user-agent, and request settings. Responses are not memoized if settings changed while queued. URLs containing user-info credentials bypass reuse.
Add optional
cache: { file: ..., ttl: ... }with a required positive TTL. Store only successful statuses/methods/final URLs and timestamps under hashed request identities; no metadata or request/response headers are persisted. Reads tolerate missing, corrupt, malformed, or unreadable data. Writes merge under a file lock and atomically replace the JSON file. Cache failures do not fail successful link checks; credential-bearing redirect targets are not written.Cache hits expose
cached?and emit fresh result/success events. Persistent hits useLinkChecker::CachedResultrather than native response objects. Caching alone does not coalesce in-flight work; deduplication reuse lasts for the checker lifetime independently of the disk TTL.Validation
bundle exec rubocop -apassed. Full RSpec suite: 166 examples, zero failures. Coverage includes all-backend metadata fanout, failure rechecks, distinct query values, header identity, persistence across instances, expiry, corruption recovery, merged writes, credential exclusion, IO failures, and reentrant/in-flight subscriptions.git diff --checkpassed.Independent of #23 and #24; shared replay-fixture fixes are identical. Neither HTML parsing nor fragment validation is added.
Implemented by AI on behalf of @dblock.