- architecture/: overview, technology stack, auth (OIDC + built-in IndieAuth), syndication (POSSE) rewritten; new database.md, deployment.md and indieweb-protocols.md; legacy stack marked historical - decisions/: reconstructed ADR-060 and ADR-063; 31 status corrections (superseded auth ADRs, proposed -> accepted); INDEX rebuilt - design/: reconstructed the v1.6.0 documents the webmention code cites; reports for 18 v2 releases without a design folder; INDEX rebuilt - projectplan/: BACKLOG rewritten (shipped items removed, open issues from the reviews added); RELEASE.md for v2.0.0-v2.10.1; INDEX - standards/: development setup (uv, tests, DEV_MODE), testing (CI test stage), git and release flow, versioning, coding standards, cookies - README, CLAUDE.md, .env.example (every setting the code reads, with defaults) brought up to date - 137 broken links repaired (old absolute paths, moved files); stale ADR references in code comments corrected (comments only) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.8 KiB
2.8 KiB
v2.10.0: WebSub with a built-in hub (implementation report)
Reconstructed on 2026-11-03 from the changelog and git history. Commits
720a1e6(ADR, proposed),b520b8b.
Design
ADR-071, sections 1–11. This report covers where it was implemented and how it was verified; it does not repeat the design.
Changes
starpunk/websub.py(new): topics (topic_url,tag_topic,canonical_topic,topic_for_request), discovery (add_discovery_headersafter-request hook forLink: rel=hub/rel=self,template_linksfor<link>s in HTML,embed_hubfor Atom/RSS/JSON Feed), change tracking (note_changed,queue_topics,get_content_version/bump_content_version), subscription requests (accept_subscription_request), signing (signature: HMAC-SHA256),statsfor the dashboard.starpunk/websub_worker.py(new):WebSubWorker, one per gunicorn process with a file lock so one process works the queues (webmention worker pattern):verify(challenge GET),render_topic(renders inside the app),deliver(signed POST, retries),prune(expired leases).starpunk/routes/websub.py(new):POST /websub, 202 on accept, plain-text 4xx otherwise, per-IPRateLimiter(30, 60).migrations/016_websub.sql:websub_subscriptions,websub_intents,websub_deliveries(one per subscription, or per topic for pings to an external hub), andsite_state.content_version.starpunk/notes.py,starpunk/micropub.py: create/update/delete callwebsub.note_changed(via_websub_changed), which bumps the content version (all processes' feed caches go stale at once) and queues deliveries.starpunk/webmention_ssrf.py:safe_posttakes a raw body and reads only a capped response; used for verification and delivery.starpunk/feeds/rss.py: self link/feed.rss(was/feed.xml).starpunk/__init__.py: discovery hook, worker start; the memory monitor'steardown_appcontextstop removed (it stopped after the first request).starpunk/routes/admin.py,templates/admin/dashboard.html: subscribers per topic, failing deliveries.- Config:
WEBSUB_ENABLED,WEBSUB_HUB_URL,WEBSUB_MAX_SUBSCRIPTIONS,WEBSUB_MAX_PER_HOST.
Tests
tests/test_websub.py (23 tests: discovery on every topic and format,
external hub, request validation, private callbacks, per-host limit,
verification success/failure, unsubscribe, re-subscribe, signed delivery,
drafts, tag topics incl. removed tags, delete, 410, retries, expiry, fresh
feed after posting).
Verification
Deployed to production; the websub.rocks publisher test passed against the live site.
Notes
An adversarial review after release found worker, time-limit, lease and spec 5.1 issues; fixed in v2.10.1 (ADR-071 Amendments).