Repository navigation
ref(perf): Share one fan-out cap, and rename nested Threads in feeds - #3578
Merged
Merged
Conversation
Use one FAN_OUT_CONCURRENCY constant for the p-limit fan-outs that had their own cap of 8. A rename now updates a Thread row nested in a parent feed row too. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 17, 2026
BYK
pushed a commit
that referenced
this pull request
Nov 17, 2026
First follow-up to the `no-await-in-loop` baseline from #3573. It clears every baseline file outside `packages/junior/src/chat`: 172 sites in 48 files. The baseline goes from 467 sites in 137 files to 295 sites in 89 files. **Fixed: about 52 sites, now run at once or batched** - `auto-archive`: one `UPDATE … WHERE conversation_id IN (…)` per page replaces one `UPDATE` per root. - memory store: one `inArray` read of alias targets. - Slack message links: look up all linked workspace domains at once. - Pending messages: read both web actor ids at once. - `junior check`: look for app markers at once. - github: parallel reaction deletes, notice closes and legacy item closes. Per-ref conflict checks and per-target syncs use p-limit at 5, under GitHub rate limits. - Test setup: read migrations at once, then apply them in order. One multi-statement sequence reset. Parallel `pool.end`. - Eval fixtures: delete auth state for all providers and users at once. **Disabled with a reason: 120 sites that must stay in order** - Pagination cursors, polls, retries and REPL loops. - Webhook and event publishes that keep delivery order. Ordered migrations. - Stream output (ACP transport). - `junior check` loops whose "first name wins" duplicate maps depend on order, and its local file reads. - Eval history replay and recorded uploads. - Sweeps and heartbeats that stay sequential under GitHub rate limits. Long loops use one `/* oxlint-disable no-await-in-loop -- reason */` block. Loops with one or two sites use next-line comments. A few loop bodies moved to functions (`reconcilePullRequest`, `checkConflict`, `prepareCheckout`, `refreshCheckout`), so one comment covers each loop. **Still in the baseline** - `packages/junior/src/chat`: 292 sites in 88 files. They follow in the next PRs. - `junior-google/src/tools/read-meeting-transcript.ts`: 3 sites. Its Drive reads can run at once, but `meet.test.ts` gives responses in call order. The fix needs a URL-routed fake, so it goes with the chat PRs. `junior-github` keeps local named caps (5 for GitHub calls, 8 for internal work), because a plugin does not import core internals. Core sites here do not use the shared `FAN_OUT_CONCURRENCY` from #3578 yet, so this PR does not depend on it. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A7e1432c2f4a2110ee7bb48718f8b6fad --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A7e1432c2f4a2110ee7bb48718f8b6fad) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A7e1432c2f4a2110ee7bb48718f8b6fad/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
BYK
added a commit
that referenced
this pull request
Nov 17, 2026
…nce (#3628) Follow-up to #3584 and #3578. This removes the last `no-await-in-loop` baseline file outside `packages/junior/src/chat`, and moves two fan-outs to `FAN_OUT_CONCURRENCY`. - **Google Meet transcripts:** `readMeetingTranscript` reads the metadata and export of each attached Doc through `pLimit(5)`. The content budget still takes records in attachment order. Long records are saved to the sandbox after that. Drive requests no longer come in a fixed order, so the Meet test fake now answers by URL path. `junior-google` gets `p-limit` as a dependency. The baseline drops from 295 sites in 89 files to 292 in 88. - **`junior check`:** the independent file reads (plugin versions, plugin directories, packaged content, app files, skill directories) run through `pLimit(FAN_OUT_CONCURRENCY)`. This removes 13 "reads few files" disable comments. The packaged-content reads share one limiter, and a package's own work holds no slot, so nested reads cannot wait on each other. Five disable comments stay where the order is the behavior: the first file or plugin that matches wins, and plugin factories run in export order. - **Slack link cards:** the workspace domain lookups run through `pLimit(FAN_OUT_CONCURRENCY)`, in place of a `bounded-fan-out` disable comment. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A7e1432c2f4a2110ee7bb48718f8b6fad --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A7e1432c2f4a2110ee7bb48718f8b6fad) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A7e1432c2f4a2110ee7bb48718f8b6fad/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
24 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to review on #3573.
p-limitfan-outs in@sentry/juniorthat each had their own cap of 8 now use oneFAN_OUT_CONCURRENCYconstant fromsrc/chat/fan-out.ts. Caps of 5 for Slack lookups and plugin message sends stay local, because a provider rate limit sets them.policies/performance.mdpoints at the constant.markFeedConversationtopatchFeedConversation.via @BYK.
--
View Session [Sentry]