.
D 2026-08-21T19:06:16.510
J cmimetype text/x-markdown
J comment Umbrella\sinfrastructure\splan\sfor\sthe\sforum\sseries\s(92b67418\svotes,\sfdfb6981\shot,\s933f2e21\sanchors,\s90bdcba5\scategories,\sa999360a\snotifications,\s6310cf87\smoderation,\s640554b3\sAI\shooks,\sd03b3425\spolls).\sOne\srule:\szit's\sDAG\sholds\scontent;\sOLTP\sholds\sauthoritative\smutable\snon-DAG\sstate\s(0001\s§8);\sthe\sindex\sholds\sonly\sderivations\sa\swipe+reingest\sreproduces\s(§5/§11).\sScalable\sthe\ssmol\sway:\sone\sbinary,\sone\ssqlite\sOLTP,\scorrect\sindexes,\sbounded\scomputations,\soutbox\sdelivery\s—\snot\smore\sservices.\n\nVOTES\s—\sforum_vote(repo,\saccount,\spost,\sdir\s±1,\sat),\sPK\s(repo,\saccount,\spost):\sthe\sunique\sconstraint\sIS\sthe\sidempotency;\svote\s=\supsert,\sretract\s=\sdelete.\sIndustry\spractice\s(Reddit/HN/Discourse):\snever\smaintain\sa\shot\sdenormalized\scounter\sas\sauthority\s—\sderive\sscores\sat\sread\swith\sa\scovering\sindex\s(repo,\spost,\sdir);\scache\sonly\sif\smeasured.\sForge-local,\snever\ssynced.\n\nHOT\s—\sHN\sformula\s(votes\s+\sreplies·w)/(age_hours+2)^1.8\sover\sa\sbounded\swindow\s(threads\sactive\slast\s30\sdays)\s—\sranking\sstays\sO(recent),\snot\sO(history).\sZero\sstate;\sconstants\sprinted\son\sthe\spage.\n\nANCHORS\s—\sderived\sat\singest\sinto\sthe\sper-repo\sindex,\sindexed\sboth\sdirections,\srebuilt\son\sreindex,\spinned\sby\sthe\sparity\sharness;\sbacklinks\srender\sonly\swhen\sthe\starget\sresolves\s(never-false-data).\n\nCATEGORIES\s—\sOLTP\spolicy\stables\sonly;\sartifact\suntouched,\sfossil\speers\ssee\splain\sthreads.\n\nNOTIFICATIONS\s—\sforum_sub(account,\sscope,\starget,\sstate);\sexplicit\sunsub\srows\soutrank\sauto-subscribe.\sDelivery\sis\sthe\stransactional\sOUTBOX\spattern:\snotification\srows\swritten\sin\sthe\ssame\stransaction\sas\sthe\striggering\sstate,\sone\sworker\sdrains\swith\sretries\s+\sexponential\sbackoff;\sat-least-once\swith\san\sidempotency\skey\sper\s(event,\srecipient).\sEmail\svia\sthe\sexisting\s--notify\splane\swith\sList-Unsubscribe\s+\sList-Unsubscribe-Post\s(RFC\s8058\sone-click\s—\sthe\sGmail/Yahoo\s2024\sdeliverability\sbar)\sand\sburst\scoalescing\s(one\smail\sper\sthread\sper\srecipient\sper\swindow)\sbefore\sdigests\sare\sever\sneeded.\n\nMODERATION\s—\sOLTP\sstaging\sstate\smachine\s(pending\s→\sapproved|rejected);\sapprove\sbirths\sthe\sartifact\svia\szit\sforum\spost,\sso\snothing\sneeds\sun-syncing.\sMod\slog\sis\sAPPEND-ONLY\sby\sconstruction\s(no\supdate/delete\scode\spath)\sand\spublic.\sTrusted\sroles\sbypass\sstaging\sper\srepo\spolicy.\n\nAI\sHOOKS\s—\ssubprocess\s(stdin/stdout\sJSON)\sor\swebhook\sinvoked\sasync\sby\sthe\sstaging\sworker\s—\sposting\snever\sblocks\son\shook\slatency.\sTimeout/failure\slands\sthe\spost\sin\shold-for-human:\sfail\sopen\sto\shumans,\snever\sto\sauto-approve,\snever\slosing\sa\spost.\sVerdicts\sadvisory;\shumans\soutrank;\sautomated\sactions\spublicly\slogged\sas\sautomated.\sPost\scontent\shanded\sto\shooks\sis\sdata\s—\sembedded\sinstructions\sare\snever\sfollowed.\n\nPOLLS\s—\sballots\spoll_vote(repo,\saccount,\spost,\schoice),\sPK\s(repo,\saccount,\spost),\ssame\sidempotent-upsert\sshape;\sclose\stime\senforced\sserver-side.\n\nCROSS-CUTTING\s—\severy\snew\srepo-keyed\stable\sjoins\sPurgeRepo's\stransaction;\severy\slist\spaginates\sby\scursor,\snever\sOFFSET;\sall\swrites\sPOST\sbehind\sthe\ssession\sgate;\sweekday\sdates\s+\sIndexBehind\sbanner\severywhere.\sWork\sproceeds\son\sthe\squarry-forum\sbranch.\n
J status Open
J title Forum\sseries:\sinfrastructure\s&\sscalability\splan\s(umbrella)
K aa351dec2ec97e3d5976c0659b90b3530a721103
U tmp-ops
Z f891ab999ab4c38317fcbfc4bf7afd65