Feat/novelty and browser reuse#2
Merged
Merged
Conversation
Previously tryPlaywright launched a new chromium process per screenshot. With 5 workers doing clean-path screenshots concurrently, that could spawn 5 parallel chromium processes which thrashed memory on lower-spec boxes and serialised the pipeline behind ~1-3s browser startups. Now: a module-level singleton browser, lazily launched on first screenshot, shared across workers. Each screenshot gets a fresh page; the browser only closes on process signal. A 'disconnected' listener clears the handle if the browser dies unexpectedly so the next call re-launches. SIGINT/SIGTERM handlers in index.js invoke closeBrowser() so we don't leave dangling chromium processes after Ctrl+C. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
CT logs fire on every TLS cert event, which for Let's Encrypt means a cert every 90 days per long-running site. Most of what the tool surfaced was renewals of existing sites, not actual new deployments — undermining the "live feed of new deployments" premise. New module lib/novelty.js queues a crt.sh lookup per hostname at 3s intervals (~1200/hr, below the public rate limit). Verdict is based on how many certs crt.sh has ever issued for that hostname: 1 cert -> 'new' (this is the one we just saw — no prior history) 2+ certs -> 'renewal' (existing site got a new LE cert) failure -> 'unknown' (crt.sh timeout/502 — graceful degrade) Integration: - index.js kicks novelty.classify() after processEntry finishes; initial status is 'checking', updates when the worker lands a verdict and re-broadcasts to any live SSE client. - Cached results live in an LRU-bounded Map so repeat hits are instant. - lib/history.js + /api/history projection both include novelty now, so the history page carries the signal too. UI (public/index.html): - Novelty badge per card — 'new' (accent), 'renewal' (muted), 'checking'. - '🆕 New only' filter chip in the main filter row; ANDs with other filters for composable exploration. Verified in browser: within 60s of cold boot, 21 entries processed, 1 new, 1 renewal, 1 unknown, rest still checking (worker catching up). 'New only' filter correctly shows just the single genuinely-new deployment. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
No description provided.