Skip to content

fix(e2e): wait for cell materialization, migrate fixture metadata to runt namespace#709

Merged
rgbkrk merged 1 commit intomainfrom
ci/e2e-cell-rendering-timing
Mar 11, 2026
Merged

fix(e2e): wait for cell materialization, migrate fixture metadata to runt namespace#709
rgbkrk merged 1 commit intomainfrom
ci/e2e-cell-rendering-timing

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Mar 11, 2026

E2E timing fix: executeFirstCell() now waits for cells to materialize from Automerge sync before querying the DOM. Kernel idle arrives via a simple broadcast event, but cell content requires a full Automerge sync round-trip (daemon → relay → WASM → materializeCells → React). The 5s waitForExist was losing that race on CI.

Fixture metadata migration: Moves uv/conda deps from top-level metadata.uv to the canonical metadata.runt.uv nested format. Removes empty inline dep blocks from 1-vanilla.ipynb (should fall through to prewarmed pool) and test-isolation.ipynb/dark-mode-test.ipynb (no inline deps needed).

All 132 notebook + trust tests pass with the migrated fixtures.

PR submitted by @rgbkrk's agent Quill, via Zed

…ture metadata

executeFirstCell() now calls waitForCodeCells(1, 30000) before querying
the DOM. Kernel idle can arrive before cells materialize from Automerge
sync, so the 5s waitForExist was too short on CI.

Also migrates notebook fixtures to the canonical runt-nested metadata
format: uv/conda deps now live under metadata.runt instead of as
top-level siblings. Removes empty inline dep blocks from vanilla and
project-based notebooks that should fall through to pool/project
environments.
@rgbkrk rgbkrk force-pushed the ci/e2e-cell-rendering-timing branch from a4339e5 to 9e72f1b Compare March 11, 2026 19:27
@rgbkrk rgbkrk marked this pull request as ready for review March 11, 2026 20:22
@rgbkrk rgbkrk merged commit a66d5d6 into main Mar 11, 2026
9 of 10 checks passed
@rgbkrk rgbkrk deleted the ci/e2e-cell-rendering-timing branch March 11, 2026 20:22
rgbkrk added a commit that referenced this pull request Mar 11, 2026
The smoke spec queries for code cells directly without using
executeFirstCell from helpers, so it missed the waitForCodeCells
fix from PR #709. Same root cause — kernel idle arrives before
cells materialize from Automerge sync.
rgbkrk added a commit that referenced this pull request Mar 12, 2026
* docs(sync): add Phase A note to notebook_sync_client module doc

* fix(e2e): wait for cell materialization in smoke test

The smoke spec queries for code cells directly without using
executeFirstCell from helpers, so it missed the waitForCodeCells
fix from PR #709. Same root cause — kernel idle arrives before
cells materialize from Automerge sync.

* feat(e2e): add data-notebook-synced attribute for sync readiness

NotebookView now exposes data-notebook-synced and data-cell-count
attributes on its container. data-notebook-synced is true when
isLoading is false and cells have rendered — the canonical signal
that Automerge sync is complete.

E2E tests use waitForNotebookSynced() instead of polling for cell
DOM elements with arbitrary timeouts. This replaces waitForCodeCells
in executeFirstCell and the smoke test.

* chore(fixtures): replace heavy deps with lightweight alternatives

pandas, numpy, scipy, matplotlib, seaborn → httpx, markupsafe.

These fixtures exist to test environment detection and kernel launch,
not data science imports. Heavy deps add 30+ seconds of install time
on CI cold runners, causing timeout flakes in integration tests.
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