fix(catalog): keep large builds event-loop responsive - #11367
Merged
Merged
Conversation
Owner
Author
|
CI attribution snapshot (2026-08-24)
Therefore no PR-specific build or DAST defect is demonstrated by these two cancelled jobs. The PR remains OPEN and DRAFT; this note does not claim the complete CI matrix is green. |
diegosouzapw
marked this pull request as ready for review
August 24, 2026 12:24
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…1367) Merged via consolidated batch validation (worktree `.claude/worktrees/batch-0824d`, 11-PR video-bridge/catalog/ops batch, tip `3e64d515`). Fixes the diegosouzapw#9147 catalog-scale event-loop regression: reuses one build-local capability snapshot, yields cooperatively during catalog/virtual-pool construction, reads only persisted TTL settings. Static gates: typecheck:core, file-size, changelog-integrity, complexity, cognitive-complexity all green. Own regression test (tests/unit/9147-catalog-eventloop-yield.test.ts) reproduced the RED→GREEN transition in isolated runs per the PR's own evidence; under current shared-devbox load (10-15, multiple parallel sessions) the test intermittently reports INFRA-RED exactly as the PR body pre-disclosed (documented starvation signature, not a code defect). Thanks for the careful RED/GREEN + INFRA-RED discipline.
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.
Summary
Fixes the #9147 catalog-scale event-loop regression without relaxing its 400 ms guard.
The hot path was repeatedly reopening SQLite during token/context enrichment, rebuilding capability snapshots across catalog/finalization/Auto-Combo, scanning the full virtual pool without cooperative yields, and loading unrelated synchronous database diagnostics just to read the cache TTL.
This slice:
TDD and performance evidence
npm run typecheck:core: PASSCurrent-host limitation
After rebasing onto the live
release/v3.8.50tip,git range-diffreports the patch as equivalent. A local rerun during host load 66 measured 1,740 ms and failed the unchanged 400 ms bound; it is recorded as INFRA-RED/starvation, not as green. The same environment was concurrently running large Next/TypeScript/Vitest workloads. This PR is intentionally draft so the isolated CI runner can provide the authoritative post-rebase result.The separate Vitest DB timeout was reproduced on the exact parent and is likewise classified BASE/INFRA-RED; no assertion mismatch was observed.
Release disposition
No workflow, timeout, threshold, baseline, or allowlist was weakened. This PR does not authorize merge, tagging, or publication and must remain open for owner review.