Skip to content

[rush-daemon] Add concurrency regression test for serialized invalidation reconciliation - #5951

Draft
Mo Jazayeri (mojaza) with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-review-comment-5949
Draft

[rush-daemon] Add concurrency regression test for serialized invalidation reconciliation#5951
Mo Jazayeri (mojaza) with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-review-comment-5949

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This addresses the review feedback to verify WorkspaceEngineComponentFactory reconciliation behavior under concurrent calls. The test suite previously validated reconciliation outcomes but did not assert queue/serialization guarantees that protect snapshot handoff and ordering.

  • What changed

    • Added a focused test in WorkspaceEngineComponentFactory.test.ts that:
      • blocks the first getInputsSnapshotAsync() call,
      • starts a second reconcileInvalidationsAsync() before the first completes,
      • asserts the mapper is not invoked early for the second reconciliation,
      • asserts the second mapper invocation receives the first reconciliation’s snapshot as currentInputsSnapshot,
      • verifies sequence progression across the two reconciliations.
  • Why this matters

    • Confirms the reconciliation tail queue is actually enforcing serialized execution, not just producing correct results in non-concurrent scenarios.
const firstReconciliationPromise = reconcileAsync();
invalidations.invalidate('libraries/b/src/index.ts');
const secondReconciliationPromise = reconcileAsync();

await Promise.resolve();
expect(mapInvalidationsToOperationsAsync).not.toHaveBeenCalled();

finishFirstSnapshot?.();

const firstResult = await firstReconciliationPromise;
await secondReconciliationPromise;

expect(mapInvalidationsToOperationsAsync.mock.calls[1][0].currentInputsSnapshot)
  .toBe(firstResult.inputsSnapshot);

@github-project-automation github-project-automation Bot moved this to Needs triage in Bug Triage Aug 21, 2026
Copilot AI changed the title [WIP] Fix code based on review comment from PR #5949 [rush-daemon] Add concurrency regression test for serialized invalidation reconciliation Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

2 participants