4 Commits
Author SHA1 Message Date
dckcandClaude Opus 5.5 9a15fb2a86 docs(diigo-cache): open issue 10, page storage drift
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-29 16:26:02 -05:00
dckcandClaude Opus 5.5 0116ccd0d2 docs(diigo-cache): open issue 9, observability
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 09:24:40 -05:00
dckcandClaude Opus 5.5 992e871c56 feat(diigo-cache): refresh each cache every 3 hours
workerd has no cron triggers, but it runs Durable Object alarms, and
the cache DOs already hold their wiring to the webapp: a refresh
scheduled from inside the DO needs no credential outside it (a systemd
timer would need a cache id to call /api with).

A fill that ends (done or failed) sets an alarm 3 hours out; it starts
a fill that refetches every page through the deepest one holding an
item updated in the last 2 days (page 1 at least, where new bookmarks
land). Refetching overwrites pages in place rather than dropping them
first, so a refresh that fails leaves the cache as it was. stopFill now
also stops a finished job's refreshes.

FillStatus gains refetchThrough (optional; additive). Caches whose fill
ended before this get their first refresh alarm when they next wake.

The service starts at boot as well as on the socket: alarms fire only
while workerd runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 23:31:48 -05:00
dckcandClaude Opus 5.5 857816166e feat(diigo-cache): production deployment with tailscale, systemd, and nix
diigo binds the session cookie to the IP it was issued to, so a
Cloudflare deployment can't use a cookie minted in the browser. Run
diigo-cache and webapp in one workerd on bldbox instead.

The flake bundles each worker with wrangler's dry run, so the modules
match what `wrangler deploy` ships, and generates the workerd config
from the bundles. workerd comes from nixpkgs' wrangler, the only
packaged one. A smoke check serves the home page and mints a webapp
instance, which covers the WEBAPP binding and Durable Object storage.

The service is a system unit with DynamicUser, so the webapp state
holding the cookie isn't readable by processes running as the user.
It listens on loopback behind tailscale serve: HTTPS, which
PasswordCredential needs, at the tailnet name only.

Operator docs in doc/; unsettled points recorded as IBIS issues.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 23:12:47 -05:00