Repository navigation
refactor: consolidate bounded concurrency on p-limit and p-map - #106002
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Land-ready proof for head
All four red core CI jobs are unrelated base failures. Prod/test types and lint report duplicate |
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 4:38 AM ET / 08:38 UTC. Summary PR surface: Source -145, Tests +2, Config +9, Other -31. Total -165 across 50 files. Reproducibility: not applicable. This PR addresses duplicated maintenance infrastructure rather than a reproducible current-main user bug; correctness is evaluated through semantic comparison, tests, and live proof. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the owner-local p-limit and p-map design, then merge only after the dependency check is green and redacted current-head live output covers representative core and plugin workflows, including one success path and one failure-semantics path. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses duplicated maintenance infrastructure rather than a reproducible current-main user bug; correctness is evaluated through semantic comparison, tests, and live proof. Is this the best way to solve the issue? Yes in architecture: established package-owned concurrency primitives are preferable to another bespoke shared helper, while specialized weighted, abort-aware, lifecycle, and early-stop schedulers correctly remain custom. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b1ce84b079a4. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -145, Tests +2, Config +9, Other -31. Total -165 across 50 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
Merged via squash.
|
…law#106002) * refactor: adopt p-limit and p-map for bounded concurrency * chore: normalize lockfile ordering * fix: preserve memory host concurrency export * refactor: keep media apply within size budget * fix: drain memory concurrency before failure * fix: satisfy memory concurrency guards * chore: scope memory host dead-code checks * chore: lower concurrency LOC baselines * fix: preserve concurrency API surfaces * chore: reconcile concurrency LOC baseline * test: keep memory concurrency gate portable * style: simplify concurrency drain * ci: refresh deadcode export baseline
Closes #105971
AI-assisted: yes. Codex implementation; repository autoreview workflow used before landing.
What Problem This Solves
Multiple core, package, plugin, and tooling paths independently implemented bounded-concurrency worker loops with subtly different scheduling and error behavior.
Why This Change Was Made
Uses
p-limitandp-mapat their owning dependency boundaries. Each call site keeps explicit stop-on-error or continue-on-error behavior. Specialized weighted, abort-aware, lifecycle, and early-stop schedulers remain custom because their contracts are not generic bounded mapping.User Impact
No intentional user-visible behavior change. Embeddings, media uploads, model scanning, plugin workflows, and repository tooling retain ordering, progress, and error semantics with less bespoke concurrency code.
Evidence
run_ac41f3b7eee1: all 77 shrinkwrap checks, SDK gates, full tsgo/lint, all 11 changed-test shards, and 6,273 tests passed.tbx_01kxda4qy0kp9njfvexjbcp8ap(Actions run 29236252741).c08206802c422e1449166d36f436479f1a56763f(run 29236595375).git diff --check: passed.The hosted CI run has four unrelated repository-global failures already present in the base: duplicate
runNotStartedkeys in 20 Control UI locale files affect prod/test types and lint, while Control UI export-baseline drift affects the dependency job. This PR changes noui/**file. Per maintainer direction, those unrelated failures are not landing blockers; the concurrency proof above is green.