Skip to content

fix(test): stop comparing document counts to a total other workers are changing - #33799

Merged
chirag-madlani merged 1 commit into
mainfrom
chirag-madlani/contextcenter-doc-count-race
Sep 22, 2026
Merged

chirag-madlani merged 1 commit into
mainfrom
chirag-madlani/contextcenter-doc-count-race

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Both documents-view-file-count and folder-view-file-count headers are system-wide totals. The Context Center folder-selection test captured one count before clicking a folder and compared a later read against it, so any document another worker deleted in between showed up as a failure of this test.

Failure evidence: chromium-24 read 77 before the click and 52 after, having lost 25 documents it never created.

The property being tested is that the folder-view header is not scoped by the sidebar selection. Assert that directly — it still counts the document outside the folder as well as the one inside, both of which this test created and owns — instead of re-checking a number it does not control.

The earlier comparison of the two headers to each other has the same defect two lines up, so re-read both counts on each poll attempt rather than measuring one against a value captured a moment earlier.

Type of change:

  • Test fix (removes cross-worker flake)

Notes:

Cherry-picked from #33088 (commit b1f4f7daba) to land as a small, independently-mergeable PR. Original commit authored by @harshach. Directly addresses the chromium-17 shard failure observed on the parent PR.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified.

Summary

This PR stabilizes the Context Center folder-selection Playwright test by avoiding comparisons against a system-wide document count captured before concurrent workers may modify it.

  • Polls the two global count headers using current rendered values.
  • Verifies the folder header remains unscoped using the two documents owned by this test.
  • Leaves the folder-scoped document-list and move-menu checks intact.

Reviews (1) · Last reviewed commit: "fix(test): stop comparing document count..."

…e changing

Both header counts are system-wide totals. The test captured one before clicking
a folder and compared a later read against it, so any document another worker
deleted in between showed up as a failure of this test: chromium-24 read 77
before the click and 52 after, having lost 25 documents it never created.

The property being tested is that the folder-view header is not scoped by the
sidebar selection. Assert that directly -- it still counts the document outside
the folder as well as the one inside, both of which this test created and owns --
instead of re-checking a number it does not control.

The earlier comparison of the two headers to each other has the same defect, two
lines up, so re-read both counts on each attempt rather than measuring one
against a value captured a moment earlier.

(cherry picked from commit b1f4f7d)
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 22, 2026
@gitar-bot

gitar-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · A single UI test changes polling and assertions for shared document totals.

Fixes a race condition in the Context Center folder-selection test by removing comparisons against system-wide document counts that other workers modify concurrently. Instead asserts that the folder-view header remains unscoped by sidebar selection, counting both owned documents inside and outside the folder. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 93a3df73045a98a196a70d4a1c940887915803bb in Playwright run 35715590228, attempt 1.

✅ 76 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 34m 33s

⏱️ Max setup 2m 39s · max shard execution 7m 57s · max shard-job elapsed before upload 10m 58s · reporting 4s

🌐 134.97 requests/attempt · 1.59 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Application boot ratio was 1.59 per UI scenario (126 boots / 79 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 76 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@chirag-madlani
chirag-madlani added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit d463891 Sep 22, 2026
96 of 98 checks passed
@chirag-madlani
chirag-madlani deleted the chirag-madlani/contextcenter-doc-count-race branch September 22, 2026 17:24

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants