Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) by pranaygp · Pull Request #2571 · vercel/workflow · GitHub
Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) by pranaygp · Pull Request #2571 · vercel/workflow · GitHub
Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) by pranaygp · Pull Request #2571 · vercel/workflow · GitHub
Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) by pranaygp · Pull Request #2571 · vercel/workflow · GitHub
Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) by pranaygp · Pull Request #2571 · vercel/workflow · GitHub
Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) by pranaygp · Pull Request #2571 · vercel/workflow · GitHub
Skip to content

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres) - #2571

Open
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci
Open

ci: run multi-worker exactly-once test in e2e-restart-recovery (postgres)#2571
pranaygp wants to merge 1 commit into
pgp/world-start-recoveryfrom
pgp/world-start-recovery-multiworker-ci

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Stacked on #2544.

What

Enables MULTIWORKER_RECOVERY_TEST=1 on the postgres entry of the e2e-restart-recovery job so the multi-worker exactly-once guarantee test (added in #2544, currently gated off CI) runs in CI.

The test it wires up

packages/core/e2e/restart-recovery.test.ts"a worker booting does not re-run a step already executing on another worker":

  1. Worker B runs a workflow whose only work is one long step (sideEffectStepWorkflow); the step records each execution of its body to a shared side-effect log.
  2. Worker A boots while the step is still in flight on B — its startup wiring (ensureWorldStarted → reenqueueActiveRuns) re-drives all active runs, including this healthy one.
  3. The test counts how many times the step body actually ran.

It asserts the step body executes exactly once — proving boot-time recovery does not duplicately execute a step that's healthily in-flight on another worker (the correlationId idempotency key + the step's terminal-state guard hold even when another worker re-enqueues the run).

Why postgres-only

The duplicate-execution concern only applies to a shared DB + graphile-worker pool. The local matrix entry skips the test via its own world gate (WORKFLOW_TARGET_WORLD === '@workflow/world-postgres'), so this only affects the postgres entry.

Verification

Run locally against a postgres container:

Re-enqueued 1 active run(s) on startup ← worker A re-drove the in-flight run
step body executed 1 time(s) ← exactly-once

Test passes, VITEST EXIT 0 (robust process-group + lsof teardown so the worker exits cleanly). Adds ~25s + a second server to the postgres entry.

🤖 Generated with Claude Code

…ostgres)
Enable MULTIWORKER_RECOVERY_TEST on the postgres entry of the
e2e-restart-recovery job so the multi-worker guarantee test runs in CI. It
boots a second worker while a step is in flight on the first and asserts the
step body executes exactly once (no duplicate from reenqueueActiveRuns). The
local matrix entry skips it via the test's own world gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 22, 2026 21:11
@pranaygp
pranaygp requested a review from a team as a code ownerJune 22, 2026 21:11
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20de3b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production129212271520
✅ 💻 Local Development190902192128
✅ 📦 Local Production190902192128
✅ 🐘 Local Postgres189502332128
✅ 🪟 Windows15200152
✅ 📋 Other89001801070
Total8047110789126

❌ Failed Tests

▲ Vercel Production (1 failed)

vite (1 failed):

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
❌ vite124127
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable-lazy-discovery-disabled15200
✅ nextjs-turbopack-stable-lazy-discovery-enabled15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable-lazy-discovery-disabled15200
✅ nextjs-webpack-stable-lazy-discovery-enabled15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable126026
✅ express-stable126026
✅ fastify-stable126026
✅ hono-stable126026
✅ nextjs-turbopack-canary132020
✅ nextjs-turbopack-stable-lazy-discovery-disabled15101
✅ nextjs-turbopack-stable-lazy-discovery-enabled15101
✅ nextjs-webpack-canary132020
✅ nextjs-webpack-stable-lazy-discovery-disabled15101
✅ nextjs-webpack-stable-lazy-discovery-enabled15101
✅ nitro-stable126026
✅ nuxt-stable126026
✅ sveltekit-stable14507
✅ vite-stable126026
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable126026
✅ e2e-local-postgres-tanstack-start-126026
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-restart-recovery-local201
✅ e2e-restart-recovery-postgres300
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Restart Recovery: success
  • Windows: success

Check the workflow run for details.

@pranaygp
pranaygp requested a review from ijjk as a code ownerJuly 22, 2026 18:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pranaygp