Skip to content

under-the-hood: count still-labeled posts, not cleared ones, in the report - #9

Merged
Pitchfork-and-Torch merged 1 commit into
mainfrom
cursor/uth-net-carried-labels-f4fa
Sep 4, 2026
Merged

under-the-hood: count still-labeled posts, not cleared ones, in the report#9
Pitchfork-and-Torch merged 1 commit into
mainfrom
cursor/uth-net-carried-labels-f4fa

Conversation

@Pitchfork-and-Torch

@Pitchfork-and-Torch Pitchfork-and-Torch commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Problem

The daily Under the Hood post-label job (UthDailyPostsApp.countLabelsAsOf) writes two counters per author, authored day, and label:

  • carried: 1 for every post that received the label in the observation window
  • removed: 1 of those if the last action was a removal, or the label expired before the observation deadline

The monthly publisher stores both on UthDayCarriedRemoved. The public report in underTheHoodReport.User then did:

sumCarried = sum(day.carried)

and published that as posts / percentageOfPosts.

A post that was labeled and later cleared still counted. The label copy served next to that number is present tense ("Post hidden from recommendations to non-followers"). Readers were told more of their posts were still limited than still carried the label.

Example from the same control flow: three days with (carried, removed) = (10, 7), (4, 0), (2, 2) reported 16 posts. Net still labeled is 7.

removed is computed, written to daily parquet, copied into the monthly aggregate, and was then ignored by the only user-facing reader.

Change

sumCarried now reports max(0, carried - removed) per day. Missing removed (older rows) is treated as 0, so those days stay unchanged. Tweet-flag rows already store removed = 0.

Daily and monthly writers are unchanged. Existing Manhattan month rows already have both fields, so the serving fix applies without a backfill.

Why it matters

Under the Hood is the public account of which labels limited a person's posts. Overstating the still-labeled count makes reach look more restricted than the stored data says, and it hides that a label expired or was taken off.

Verification

Strato cannot compile here. The daily writer is the spec:

  • countLabelsAsOf emits (1L, removed) for each ever-applied post, with removed from removedAfterLastAction
  • tweet-flag path emits (carried, 0L)
  • month publisher copies both fields onto UthDayCarriedRemoved

A scratch model of old vs new sumCarried on (10,7)+(4,0)+(2,2) is 16 vs 7; a single post that was applied then removed or expired nets to 0; a still-labeled post stays 1. Nothing from that model is committed.

Out of scope

  • UthDailyAccountLabelsJob midnight snapshot (labels applied after UTC midnight land on the next day). Internally consistent as an at-midnight snapshot; not changed here.
  • anchor_campaign_* SpamHighRecall rules with no TTL. Sibling rules use 30 days, but the compact form may be deliberate campaign policy. Not changed without a stronger proof.
  • Reference-month publisher also sums carried only. That job is marked experimental / unused.

Upstream

Cherry-pick is clean on xai-org/x-algorithm main (same file blob). Matching PR: xai-org#105

Open in Web Open in Cursor 

…eport

Daily post-label rows store carried (posts that received the label in
the observation window) and removed (how many of those were later taken
off or expired). The monthly aggregate keeps both. The public Under the
Hood report summed only carried, so a post that was labeled and then
cleared still counted toward posts and percentageOfPosts.

The label copy is present tense ("Post hidden from recommendations to
non-followers"). Subtract removed, floored at zero, so the report shows
posts that still carry the label.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants