|
2026-09-24
| ||
| 00:53 | • Ticket [aa351dec2e] Forum series: infrastructure & scalability plan (umbrella) status still Closed with 1 other change artifact: 53f713e003 user: zeitgeist | |
|
2026-08-22
| ||
| 01:34 | • Closed ticket [aa351dec2e]. artifact: 9abd06f5a5 user: ai-local | |
|
2026-08-21
| ||
| 19:06 | • New ticket [aa351dec2e]. artifact: 79ab8a6f8b user: tmp-ops | |
Forum series: infrastructure & scalability plan (umbrella)
VOTES — forum_vote(repo, account, post, dir ±1, at), PK (repo, account, post): the unique constraint IS the idempotency; vote = upsert, retract = delete. Industry practice (Reddit/HN/Discourse): never maintain a hot denormalized counter as authority — derive scores at read with a covering index (repo, post, dir); cache only if measured. Forge-local, never synced.
HOT — HN formula (votes + replies·w)/(age_hours+2)^1.8 over a bounded window (threads active last 30 days) — ranking stays O(recent), not O(history). Zero state; constants printed on the page.
ANCHORS — derived at ingest into the per-repo index, indexed both directions, rebuilt on reindex, pinned by the parity harness; backlinks render only when the target resolves (never-false-data).
CATEGORIES — OLTP policy tables only; artifact untouched, fossil peers see plain threads.
NOTIFICATIONS — forum_sub(account, scope, target, state); explicit unsub rows outrank auto-subscribe. Delivery is the transactional OUTBOX pattern: notification rows written in the same transaction as the triggering state, one worker drains with retries + exponential backoff; at-least-once with an idempotency key per (event, recipient). Email via the existing --notify plane with List-Unsubscribe + List-Unsubscribe-Post (RFC 8058 one-click — the Gmail/Yahoo 2024 deliverability bar) and burst coalescing (one mail per thread per recipient per window) before digests are ever needed.
MODERATION — OLTP staging state machine (pending → approved|rejected); approve births the artifact via zit forum post, so nothing needs un-syncing. Mod log is APPEND-ONLY by construction (no update/delete code path) and public. Trusted roles bypass staging per repo policy.
AI HOOKS — subprocess (stdin/stdout JSON) or webhook invoked async by the staging worker — posting never blocks on hook latency. Timeout/failure lands the post in hold-for-human: fail open to humans, never to auto-approve, never losing a post. Verdicts advisory; humans outrank; automated actions publicly logged as automated. Post content handed to hooks is data — embedded instructions are never followed.
POLLS — ballots poll_vote(repo, account, post, choice), PK (repo, account, post), same idempotent-upsert shape; close time enforced server-side.
CROSS-CUTTING — every new repo-keyed table joins PurgeRepo's transaction; every list paginates by cursor, never OFFSET; all writes POST behind the session gate; weekday dates + IndexBehind banner everywhere. Work proceeds on the quarry-forum branch.
All eight series tickets closed Fixed; the plan is delivered on trunk via merge 0e669d2a.