repo visibility changes are never noticed: private repos keep serving their history #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
events.publicis decided once, when a row is ingested, from whatever the forge reported at that moment. Every poller is incremental, so nothing ever revisits a repo:sincecursor, history is never walked againmax_pages = 1after the first run, so only the newest page of the feedThe upsert does refresh the flag (
public = EXCLUDED.public), but only for events that get re-fetched. So when a repo flips public → private upstream, new activity lands aspublic = falsewhile everything already ingested stayspublic = trueindefinitely — full commit messages, repo name, issue and PR titles, all still served on/v1/events,/v1/projectsand/v1/activity/summary. The reverse flip is equally frozen: history that was ingested while a repo was private stays hidden forever after it goes public.The "counts yes, details no" split is implemented correctly at the API layer (
daily,hourly,sources,languages/dailypassinclude_private: true;events,projects,activity/summarypassfalse). It is just keying off a stale flag.Separate leak, same area
/v1/languages/reposhas no visibility gate at all —repo_languages()selects the whole table, andfetch_languagesis called with the full repo list including private ones. Private repo names are in that JSON today, and it is prefetched into the prerenderedwindow.__RQ_STATE__, so they are in the static HTML too. The UI only aggregates by language, so nothing renders them, but they are on the wire.Fix
A reconciliation pass in the worker: after repo discovery (which already holds current visibility for every reachable repo),
UPDATE events SET public = ... WHERE repo = .... That needs a repo key to update against — the payload → repoCASEexpression already exists, copy-pasted into four separate read queries, and is worth promoting to a stored generated column with an index. The languages response should derive its gate from the same source of truth rather than growing a second visibility column to keep in sync.