Skip to content

fix(examples): keep the GitHub threat pack under the playground's row limit - #46

Merged
juliojimenez merged 2 commits into
mainfrom
julio/github-pack-org-scope
Nov 18, 2026
Merged

juliojimenez merged 2 commits into
mainfrom
julio/github-pack-org-scope

Conversation

@juliojimenez

Copy link
Copy Markdown
Member

What / why

The playground's demo user reads at most a billion rows per query and then stops without an error (max_rows_to_read = 1000000000, read_overflow_mode = break). Two rules in the GitHub pack read more than that, so what they returned on the playground, and on the demo page, was a partial answer that looked complete:

Rule Rows to read Rows read
branch-reset-storm 5.28 billion (PushEvent) 1.00 billion
tag-retarget 1.72 billion (Create and Delete events) 1.00 billion

Two more read everything and found nothing in recent windows, because the feed is much thinner than it was: about 110,000 stars in the first 17 days of November 2026, against 3.6 to 4.2 million a month in mid-2025. Their thresholds of 50 were not reached; the busiest repository-hour of the last week had 20 stars.

What changes:

  • branch-reset-storm and tag-retarget take an org parameter, the part of repo_name before the slash: startsWith(repo_name, concat({org:String}, '/')). Together with the event type that is a prefix of the table's sort key, so the scan prunes to a few hundred thousand rows and the answer is complete.
  • star-storm and mass-ref-deletion take their threshold as a parameter, min_stars and min_deletions, where they had a fixed 50.
  • The demo page has fields for the new parameters, with defaults that return rows today.
  • The file header and the README explain the row limit, which event types fit under it, and the thin feed. The README's playground section gains a paragraph about the limit, since it applies to anything run through play.sh.

What the six rules return with the demo's defaults, read from the built site in headless Chrome against the playground:

Rule Defaults Rows Rows read
branch-reset-storm org=ClickHouse, 2024-04-15 to 2024-04-22 1 204,727
tag-retarget org=ClickHouse, 2024-08-05 to 2024-08-12 6 334,836
star-storm min_stars=5 4 508 million
mass-ref-deletion hours=24, min_deletions=10 3 304 million
bulk-collaborator-add none 1 37 million
commit-hour-anomaly repo=ClickHouse/ClickHouse, last 30 days 0 221,000

For each of them the server's X-ClickHouse-Summary header has read_rows equal to total_rows_to_read, so none is cut off.

Two things to look at:

  • The default org is ClickHouse, to go with the repo default the page already had. With those windows the page shows robot-clickhouse resetting refs 41 times in a week, and release tags being re-cut in terraform-provider-clickhouse, spark-clickhouse-connector and ch2rs. That is ordinary release work, but it is our own org under a rule that is called a threat. Another org or other windows are a two-line change in site/src/demos/registry.ts.
  • The thresholds are a snapshot. 5 stars an hour and 10 deletions a day return a handful of rows this week. The feed has swung between 69,000 and 922,000 stars a month since July, so on some days they will return nothing, or the full 50.

Not in this PR: nothing in play.sh or on the demo page says when a result was cut off. Both could compare read_rows with total_rows_to_read from the summary header and warn.

Checklist

  • make test and make smoke pass
  • README.md and site/ updated if behavior or docs changed (samples in site/src/samples.ts stay verbatim)
  • Tests added/updated for compiler, rules, or UDF changes (n/a: an example library; make smoke compiles it)
  • Code stays portable to ECL 21.2.1 (no source changes; the example uses forms the compiler already had)

🤖 Generated with Claude Code

juliojimenez and others added 2 commits November 17, 2026 22:29
… limit

The playground's demo user reads at most a billion rows per query and
then stops without an error, so branch-reset-storm (5.3 billion
PushEvents) and tag-retarget (1.7 billion Create and Delete events)
returned partial answers that looked complete. Both now take an org
parameter, a prefix of repo_name that prunes them to a few hundred
thousand rows. star-storm and mass-ref-deletion take their threshold as
a parameter, because the feed is far thinner than when 50 was chosen.
The demo page, the file header and the README follow.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Managed user accounts have one in their names, and the pattern is only
there to catch typing mistakes: the value is bound as a typed parameter.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@juliojimenez juliojimenez self-assigned this Nov 18, 2026
@juliojimenez juliojimenez added the fix Fixes a bug label Nov 18, 2026
@juliojimenez
juliojimenez merged commit 4287b5f into main Nov 18, 2026
6 checks passed
@juliojimenez
juliojimenez deleted the julio/github-pack-org-scope branch November 18, 2026 04:24
@juliojimenez juliojimenez mentioned this pull request Nov 18, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant