Repository navigation
Keeping a page lives in one module with one retry policy - #118
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…rary no longer imports the job queue Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7 Signed-off-by: NiallJoeMaher <nialljoemaher@gmail.com>
NiallJoeMaher
force-pushed
the
arch-keeping-a-page
branch
from
October 27, 2026 07:27
88475e8 to
0e84238
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.
lib/library/keeping.ts(waslib/capture.ts) now owns keeping an Item's page:keepNow,keepLater,keepFile,keepImported, the queued try (keepQueued), when a failure is final, and the oneExtracted→ExtractionResultmapping.jobs.tsis a table of handlers. The run-and-retry loop moved tolib/job-runner.ts, sokeepLatercan kick the queue withoutimport("../jobs"). That removes the import cycle.The retry policy. Tries are counted on the Item (
extraction.attempts). A page gets four: one now, then one 30 s, 2 min and 10 min after each failure. The fourth failure is final. A 4xx (except 408 and 429), a refused address or a file over 50 MB is final straight away. The job queue's own retries (5 tries, 30 s × 2ⁿ) only re-run a try whose result was never written, for example while the database is down. Links behave as before.Behaviour changes:
shortcut:comment). Now the Item is marked failed after about 13 minutes, with "The file has not arrived." aslastError.extractjobs (claimJobtakes an optional queue), not everyone's digests and imports.Tests:
keeping.test.tsruns against the fixture server and covers keeping now, a retry after keeping later, four tries then a final failure, and a 4xx that fails at once.files.test.tsis updated for the missing upload.Gates:
pnpm typecheckok,pnpm lintok,pnpm test71 files / 449 tests pass.pnpm e2eandpnpm designwere not run.🤖 Generated with Claude Code
https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7