openclaw - ✅(Solved) Fix [Bug]: flow-registry.store.test.ts times out on Windows CI (checks-windows-node-test-3, checks-windows-node-test-6) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59103Fetched 2026-04-08 02:28:34
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

src/tasks/flow-registry.store.test.ts consistently times out after 120 seconds on Windows CI runners, causing checks-windows-node-test-3 and checks-windows-node-test-6 to fail.

This appears to be a new flaky test introduced with the task/flow system in v2026.3.31 and is unrelated to the code under review in individual PRs.

Error Message

Error: Test timed out in 120000ms
  at src/tasks/flow-registry.store.test.ts:62

Root Cause

src/tasks/flow-registry.store.test.ts consistently times out after 120 seconds on Windows CI runners, causing checks-windows-node-test-3 and checks-windows-node-test-6 to fail.

This appears to be a new flaky test introduced with the task/flow system in v2026.3.31 and is unrelated to the code under review in individual PRs.

Fix Action

Fixed

PR fix notes

PR #58013: fix: inter-session messages must not overwrite established external lastRoute

Description (problem / solution / changelog)

Problem

Fixes #54441

Inter-session messages (sessions_send) always arrive with channel=webchat. When resolveLastChannelRaw / resolveLastToRaw processed these turns they could overwrite a previously-established external lastChannel/lastTo (e.g. discord, telegram) with webchat routing identifiers, breaking delivery on all subsequent turns of that session.

Root cause: both resolver functions had no visibility into whether the current turn originated from sessions_send (inter-session) vs a real user message. The existing guard only protected against the webchat-with-established-external-route case for direct-session keys (fix #47745), but not for the general inter-session case.

Fix

  • session-delivery.ts — add isInterSession?: boolean to both resolveLastChannelRaw and resolveLastToRaw. When true and an external route is already persisted, return the persisted route unchanged. The fast-path sits above all other logic and adds zero overhead for non-inter-session turns.
  • session.ts — import isInterSessionInputProvenance from src/sessions/input-provenance.ts and pass isInterSession: isInterSessionInputProvenance(ctx.InputProvenance) to both resolvers at the existing call site (~line 440).

Behaviour for sessions with no external route established is fully preserved — inter-session can still set the initial route on brand-new sessions.

Files changed

FileChange
src/auto-reply/reply/session-delivery.tsAdd isInterSession param + guard to both resolvers
src/auto-reply/reply/session.tsImport isInterSessionInputProvenance, pass flag at call sites
src/auto-reply/reply/session-delivery.test.ts6 new test cases covering the fix and edge cases

Tests

All 18 tests in session-delivery.test.ts pass (12 pre-existing + 6 new):

  • inter-session message does NOT overwrite established Discord lastChannel
  • inter-session message does NOT overwrite established Telegram lastChannel
  • inter-session message does NOT overwrite established external lastTo
  • regular Discord user message DOES update lastChannel normally
  • inter-session on a NEW session (no persisted external route) — falls through to normal resolution
  • inter-session with no persistedLastTo — no crash, falls through

Changed files

  • src/auto-reply/reply/session-delivery.test.ts (modified, +77/-0)
  • src/auto-reply/reply/session-delivery.ts (modified, +17/-0)
  • src/auto-reply/reply/session.ts (modified, +4/-0)

Code Example

Error: Test timed out in 120000ms
  at src/tasks/flow-registry.store.test.ts:62

---

pnpm vitest run src/tasks/flow-registry.store.test.ts
RAW_BUFFERClick to expand / collapse

Summary

src/tasks/flow-registry.store.test.ts consistently times out after 120 seconds on Windows CI runners, causing checks-windows-node-test-3 and checks-windows-node-test-6 to fail.

This appears to be a new flaky test introduced with the task/flow system in v2026.3.31 and is unrelated to the code under review in individual PRs.

Affected CI jobs

Error

Error: Test timed out in 120000ms
  at src/tasks/flow-registry.store.test.ts:62

Notes

  • Linux and macOS CI passes cleanly
  • Related existing issue for Windows flaky tests: #7057 (different test files)
  • The timeout only reproduces on Windows runners; the same test suite passes on Linux
  • Likely cause: SQLite or file-system locking behaviour differs on Windows (flow registry uses a SQLite ledger)

Steps to reproduce

Run the test suite on Windows:

pnpm vitest run src/tasks/flow-registry.store.test.ts

extent analysis

TL;DR

Increase the test timeout for src/tasks/flow-registry.store.test.ts to mitigate the consistent timeout issue on Windows CI runners.

Guidance

  • Investigate the differences in SQLite or file-system locking behavior on Windows to understand the root cause of the timeout.
  • Consider increasing the test timeout to a higher value (e.g., 300 seconds) to allow the test to complete without timing out.
  • Review the existing issue #7057 for Windows flaky tests to see if there are any relevant insights or solutions that can be applied to this case.
  • Run the test suite on Windows with the increased timeout to verify if it resolves the issue.

Example

// Example of increasing test timeout in vitest
import { describe, it, expect } from 'vitest';

describe('flow-registry.store.test', () => {
  it('should complete without timing out', async () => {
    // Test code here
  }, 300000); // Increase timeout to 300 seconds
});

Notes

The increased timeout is a temporary workaround and may not address the underlying issue. Further investigation is needed to determine the root cause of the timeout and to find a more permanent solution.

Recommendation

Apply workaround: Increase the test timeout to a higher value to allow the test to complete without timing out, as this is a simpler and more immediate solution to mitigate the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING