Skip to content

fix(processors): PR public-surface skip ordering#432

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-pr-webhooks-expensive-analysis-order
Jun 5, 2026
Merged

fix(processors): PR public-surface skip ordering#432
JSONbored merged 1 commit into
mainfrom
codex/fix-pr-webhooks-expensive-analysis-order

Conversation

@JSONbored
Copy link
Copy Markdown
Owner

Motivation

  • Prevent expensive repository-wide reads and pairwise collision/readiness analysis from running for PR webhook events that should be cheaply skipped by public-surface rules.
  • Preserve existing gate-only behavior where gate checks must still run even if no public output is configured.

Description

  • Moved the cheap, network-free decidePublicSurface prelim skip checks to the top of maybePublishPrPublicSurface in src/queue/processors.ts so skipped events return before miner lookups and repo-wide reads.
  • Only perform miner detection and the more expensive public-output flow when the prelim decision indicates a potential public output (comment, label, or check_run), while still allowing gate behavior to run when gateCheckMode is enabled.
  • Added early returns to avoid calling listIssues, listPullRequests, listBountiesByRepo, and buildCollisionReport for skipped events.
  • Extended test/unit/queue.test.ts to assert that when publicSurface is off there are no network fetches and no repo-wide issue/bounty reads before the skip audit is recorded.

Testing

  • Ran npm run typecheck and git diff --check with no errors.
  • Ran the unit tests for the queue processor with npm test -- --run test/unit/queue.test.ts, and the modified test suite passed (46 passed).
  • The changes were validated by the added regression assertion that counts repo-wide DB reads and confirms none occur for a disabled public surface.

Codex Task

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 5, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui be8fbef Commit Preview URL

Branch Preview URL
Jun 05 2026, 08:47 PM

@gittensory
Copy link
Copy Markdown

gittensory Bot commented Jun 5, 2026

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #432 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@gittensory gittensory Bot added the gittensory:reviewed Gittensor contributor context label Jun 5, 2026
@JSONbored JSONbored changed the title Fix PR public-surface skip ordering fix(processors): PR public-surface skip ordering Jun 5, 2026
@JSONbored JSONbored self-assigned this Jun 5, 2026
@github-actions github-actions Bot added the bug Something isn't working label Jun 5, 2026
@JSONbored JSONbored merged commit 6d29087 into main Jun 5, 2026
10 of 11 checks passed
@JSONbored JSONbored deleted the codex/fix-pr-webhooks-expensive-analysis-order branch June 5, 2026 23:07
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex gittensory:reviewed Gittensor contributor context size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant