Tooling & Lab
Daily Dose
AI-curated daily tech digest: four sources, one batched Bedrock call, per-run cost ledger
3 min read · 627 words
Daily Dose is a nightly AI-curated tech digest: a scheduled GitHub Actions job fetches five items each from Hacker News, arXiv, GitHub and Dev.to, has an AWS Bedrock model score all twenty in one call, and commits the result for an Astro static site on Vercel (live site). It is the maintainer's own take on arpitbbhayani/the-daily-diff (not a fork), is solo-maintained, and is not published to any package registry.
- Four keyless sources — Hacker News via Algolia, arXiv cs.AI/cs.LG/cs.CL via the Atom API, new GitHub repos by stars, and Dev.to top articles.
- One scored batch — each item gets a 0-10
interest_score, a one-sentencewhy_read, a shortanalysisand anexcludeflag; items go in as<item>blocks with escaped titles, marked untrusted. - Four-model fallback — Sonnet 5, then Sonnet 4.6, Opus 4.6 and Haiku 4.5; API and JSON-parse errors advance to the next model.
- Logged placeholder scoring — deterministic scorers cover items the model omits, or whole runs without credentials, with a warning in the log.
- Committed cost ledger — every run's tokens and dollars are appended to
src/data/stats.jsonl, read by a password-gated/statspage and the anomaly check. - One schema, two enforcement points — a single Zod schema validates items when the pipeline writes them and again when Astro reads them.
- Reader surfaces — a dated
/archive/, five RSS feeds (combined plus per source) and/latest.json.
As of 2026-10-20: 52 ledgered Bedrock runs cost $3.10 in total (about $0.06 a run, none flagged) and 36 digest days are committed, but 11 of 58 pipeline runs failed, six of them consecutive scheduled runs (2026-09-11 to 2026-09-16) with an unverified cause. Zero stars; 457 Vitest tests passed on the last green CI run (2026-09-17), issue #132 (automated-failure) is still open and 10 Dependabot pull requests are open with failing CI.
Architecture
Two halves share one schema. scripts/pipeline.ts writes one JSON file per item into src/data/digest/YYYY-MM-DD/; Astro's content collection reads the same folder through a glob loader, and both import src/lib/digestSchema.ts. The "zero drift" guarantee is design intent: Context.md says it has not yet met a real schema-breaking change.
src/lib/llmCuration.ts makes one non-streaming call per model attempt, with tool_choice forced to record_scores, max_tokens at 16,000 and a 50-item pre-flight ceiling. src/lib/costTracking.ts prices runs from a per-model table and flags one only above five times the trailing seven-run average, after three runs of history. Totals are computed from list prices, not an AWS invoice, and the first three entries used a since-corrected rate (ADR 0005).
Delivery is Astro 7 static output on Vercel; /stats is the one server-rendered route, behind Basic Auth middleware (digests compared with timingSafeEqual; a 500 if STATS_PASSWORD is unset). daily-pipeline.yml is the only workflow with write permissions. Checks include an axe-core accessibility gate, CodeQL, gitleaks and SHA-pinned actions, but the type check is non-blocking over 37 pre-existing errors, and package.json still says 0.1.0 against the v1.0.0 release of 2026-09-08.
How It Works
- Trigger — at 21:00 UTC
daily-pipeline.ymlrunsnpm run pipeline; GitHub typically starts it 1.5-5.5 hours late, and a concurrency group stops overlapping runs. - Fetch — five items per source, with retries; if every source fails, no empty digest is written.
- Score — all twenty items go to Bedrock in one call down the four-model chain, and tokens from every attempt are summed so retries are never under-billed.
- Tier — excluded items are dropped, missing ones get the placeholder score, and tiers follow: 8+ must-read, 6+ recommended, else notable.
- Ledger —
recordAndCheckCostprices the run from real token usage, appends tostats.jsonland sets the anomaly flag. - Commit — items are Zod-validated and written one file each, and
git-auto-commit-actioncommits onlysrc/data/digest/**andstats.jsonlasgithub-actions[bot]. - Deploy and alert — the push triggers Vercel, whose Build Command ADR 0004 pins to
npm run build(project settings not re-inspected); failures and anomalies file or comment on anautomated-failureissue.