update docs sidebar to auto expand#1
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
8 tasks
TooTallNate
added a commit
that referenced
this pull request
May 11, 2026
- Release the locked connection before makeWorkerUtils() so the bootstrap can't deadlock against the same pool when maxPoolSize is small (Copilot review #1). Achieved by replicating graphile-worker's installSchema DDL ourselves under the lock; once the schema exists graphile-worker's own installSchema is a no-op. - Add a unit test that asserts the lock-ordering: pool.connect -> BEGIN -> pg_advisory_xact_lock -> CREATE SCHEMA -> COMMIT -> release -> makeWorkerUtils (Copilot review #2).
karthikscale3
added a commit
that referenced
this pull request
May 14, 2026
…faster tests Address review feedback on the VM-idle counter approach: 1. Watchdog leak + double-fire in `fireUnconsumedWhenVmIdle`. Each recursive re-entry (observer fired but VM still busy) used to leak the previous 5s watchdog timer. When the leaked watchdog later fired, `fire()` had no idempotency guard beyond a version check that was unchanged across recursions, so `onUnconsumedEvent` could be called multiple times. Now we `clearTimeout` the previous watchdog at the top of `fireUnconsumedWhenVmIdle`, and gate `fire()` on `pendingUnconsumedCheck !== null` so stale timers, observers, or recursion paths can never double-fire. 2. Consolidate every VM-bound delivery through `trackVmDelivery`. `step_completed`, `step_failed`, `hook_received`, `hook_conflict`, and `wait_completed` all chain a `resolve()`/`reject()` into the VM and so all need both counters covering the body-reaction window. Previously only the two hot-path deliveries did; the others were latent foot-guns that would have reintroduced the original race the next time someone built a `for await` flow over them. 3. Wire `isVmIdle` / `onceVmIdle` into the test `setupWorkflowContext` helpers in step / hook / sleep / abort / async-deserialization / hook-sleep-interaction tests, and update `events-consumer.test.ts`'s default options to provide an always-idle harness. Without this, tests fell through to the 5s watchdog-only path and added ~15s to every CI run of core unit tests. The test suite is now ~4s instead of ~10s+. 4. New unit tests in `events-consumer.test.ts` for `fireUnconsumedWhenVmIdle`: fast path, slow path, recursion path, the recursion-doesn't-leak-watchdogs regression (the bug from #1), watchdog fallback, and subscribe-cancellation race. 5. `trackVmDelivery` now chains the body through `ctx.promiseQueue` internally so callers don't reimplement the queue plumbing. Counter increments still happen synchronously at call time so a burst of deliveries observed in the same `consume()` pass all add up before any decrement runs. Errors in one body don't poison the queue for the next delivery. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
No description provided.