Repository navigation
perf(chat): run independent Slack, skill and watch reads at once - #3635
Merged
Merged
Conversation
Burn down the rest of the no-await-in-loop baseline in packages/junior/src/chat, except chat/automations/. Skill discovery and loading, App Home connections, link unfurls, thread image hydration, watch match-key reads and child terminal reads run through pLimit(FAN_OUT_CONCURRENCY). Task outcomes open the creator DM once. Loops that must stay in order get a disable comment that says why. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
7 screenshot changes — 7 changed · 0 added · 0 removed Review screenshots in Frameshift |
…at-slack # Conflicts: # packages/junior/src/chat/slack/vision-context.ts
BYK
approved these changes
Nov 18, 2026
BYK
enabled auto-merge (squash)
November 18, 2026 10:06
…at-slack # Conflicts: # scripts/await-in-loop-baseline.json # tools/oxlint/await-in-loop.json
BYK
added a commit
that referenced
this pull request
Nov 18, 2026
#3635 merged after #3646 last took `main`, so `main` fails `junior/prefer-map-bounded` at six single-use limiters from #3635. This converts them to `mapBounded` with the default cap. The results stay in the same order. - `chat/events/store.ts`: `collectEventMatchKeys` index reads. - `chat/skills.ts`: skill discovery and `loadSkillsByName`. Before, one limiter was shared by the directories of every root. Discovery now lists all roots first, then reads every skill directory under one cap, so the total cap stays the same. The first root that has a skill name still wins. - `chat/slack/app-home.ts`: provider connection reads. - `chat/ingress/slack-conversation-unfurl.ts`: link unfurls. - `chat/conversations/pending-cards.ts`: terminal Turn event reads. <!-- 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.
Sequential awaits on independent reads slow down skill discovery, App Home, link unfurls and thread image hydration. This is the last chat group of the
no-await-in-loopburn-down: Slack, ingress, Conversations, events, services, review items, plan, skills and the rest ofpackages/junior/src/chat. It does not include the task-execution group in #3633 orchat/automations/(2 sites). The baseline drops from 187 sites in 53 files to 108 sites in 20 files. With #3633 too, only the 2 automation sites stay in the chat baseline.Runs at once now (15 sites):
loadSkillsByNamereads the selectedSKILL.mdfiles at once.Stays in order (64 sites), each with a disable comment that says why: cursor pagination (Slack, event pages), retries and lock polls, statements in one transaction or on the caller's executor, reply chunks (the first one can set the thread root), event-lock order in purge, the attachment loop (the image cap and cached summary index follow attachment order), and the guardian worker pool, which is the limiter itself.
Timer claims, Watch cancels, timer ingest and Watch delivery stay sequential on purpose. They update the timer index or dispatch index, and those locks fail at once when another holder has them.
via @BYK.
--
View Session [Sentry]