source-archive: skip complete captures + per-run cost report#297
Closed
probably-jaden wants to merge 1 commit into
Closed
source-archive: skip complete captures + per-run cost report#297probably-jaden wants to merge 1 commit into
probably-jaden wants to merge 1 commit into
Conversation
- ContentStore.lookup now treats an incomplete capture (missing html / markdown / screenshot; PDFs exempt from screenshot) as a cache miss, so a re-run retries the missing format instead of skipping a partial capture forever. - New cost.py estimates a run's spend per backend and per archived site (self-hosted = free; Hyperbrowser/Firecrawl priced by the configured proxy mode). The capture CLI prints the breakdown and writes reports/<run_id>_cost.json. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
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.
Two capture-run improvements:
Skip only complete captures.
ContentStore.lookuppreviously returned a cache hit for any prior capture within the TTL, even a partial one (e.g. a failed screenshot encode leftscreenshot_key=None). It now treats an incomplete capture as a miss — browser captures need html + markdown + screenshot; PDFs (no screenshot) need markdown — so a re-run retries the missing format instead of skipping it forever. Already-complete sites are still skipped.Per-run cost report. New
cost.pyestimates a run's spend broken down by backend and per archived site — self-hosted CloakBrowser/Playwright/PDF are free; Hyperbrowser/Firecrawl are priced by the configured proxy mode.capturenow prints the breakdown and writesreports/<run_id>_cost.json. (Estimates from public pricing; only successful captures are priced.)