Skip to content

Wait for background work in two Flow test fixtures - #2378

Merged
abrichr merged 1 commit into
mainfrom
codex/flow-async-fixture-ordering-20261120
Nov 21, 2026
Merged

abrichr merged 1 commit into
mainfrom
codex/flow-async-fixture-ordering-20261120

Conversation

@abrichr

@abrichr abrichr commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Two Flow tests could inspect state before the background work reached the point their assertions depend on.

All four targeted cases passed in 8.63 seconds on Linux with Python 3.12.16. Headless Chromium exercised input, scroll and click across documents. The pagination test ran against its loopback HTTP/SQLite server while the background thread inserted rows. The tested files matched commit 16fdd244e78aff37a1225d6ff97cc76dbbc200c5. Required CI

There are no engine or per-app changes. The fixtures check the same ordering rule at two different boundaries. The second pagination failure on #2355 independently confirms the original race. Coverage is limited to synthetic HTTP/SQLite and headless browser fixtures.

@abrichr
abrichr marked this pull request as ready for review November 21, 2026 02:07
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 16fdd24

Test-only, two files, no engine or per-app changes. The assertions about effects, certification, row totals, queue length and document owner are unchanged.

  • Pagination fixture: the baseline row count is taken before the inserter starts, so the first background insert cannot be counted twice. After join, the test now fails if the thread is still alive, then compares count_rows() == rows_before + inserted as before.
  • Cross-document fixture: wait_for_timeout(0) is replaced with the existing 5-second bounded _wait_for_queued_action already used by the mixed-document test. It waits for the recorder binding without draining the batch, and still asserts len(session._pyq) == 1 and the original producer document. A timeout fails the test rather than skipping the check.

I am not merging: the public OpenAdapt merge HOLD still stands.

Logged on openadapt-internal#211.

@abrichr
abrichr merged commit bd73e1f into main Nov 21, 2026
62 of 67 checks passed
@abrichr
abrichr deleted the codex/flow-async-fixture-ordering-20261120 branch November 21, 2026 03:23
Sign up for free to 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.

1 participant