Skip to content

test(e2e): fix propagation race in status-config resource-count asserts#797

Merged
jarvis9443 merged 1 commit into
mainfrom
fix/status-config-e2e-count-race
Jul 21, 2026
Merged

test(e2e): fix propagation race in status-config resource-count asserts#797
jarvis9443 merged 1 commit into
mainfrom
fix/status-config-e2e-count-race

Conversation

@jarvis9443

@jarvis9443 jarvis9443 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Main's CI run for 7295ff9 failed status-config-e2e > clean config reports synced with revisions and resource counts with expected undefined to be 1: the test waits only for state === "synced", but synced flips on an early revision before all three seeded resources are applied — the count asserts then race propagation on a loaded runner.

Fold the resource counts into the waitConfigPropagation condition (the asserts below keep pinning the exact values). Same class as #795's fix; verified locally (file's 7 tests pass).

Summary by CodeRabbit

  • Tests
    • Improved end-to-end test reliability by waiting for configuration resources to be fully applied before validating clean synchronization.
    • Reduced race conditions when confirming synced models, provider keys, and API keys.

… synced

'synced' flips on an early revision before all three seeded resources
are applied, so the eager count asserts raced propagation and failed
with 'expected undefined to be 1' on a loaded runner (seen on the main
CI run for 7295ff9). Fold the counts into the wait condition; the
asserts below keep pinning the values. Same class as #795.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2758a51-5b8b-4242-a26e-3773afeb8dff

📥 Commits

Reviewing files that changed from the base of the PR and between d14c454 and bc7f135.

📒 Files selected for processing (1)
  • tests/e2e/src/cases/status-config-e2e.test.ts

📝 Walkthrough

Walkthrough

The status-config end-to-end test now waits for synchronized state and applied counts of one model, provider key, and API key before running assertions.

Changes

Status config synchronization

Layer / File(s) Summary
Wait for applied resource counts
tests/e2e/src/cases/status-config-e2e.test.ts
The propagation wait now requires cfg.state to be "synced" and each seeded resource count to equal 1 before assertions execute.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
E2e Test Quality Review ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Security Check ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing an E2E propagation race in status-config resource-count assertions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/status-config-e2e-count-race

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands.

@jarvis9443
jarvis9443 merged commit 7f6a96a into main Jul 21, 2026
9 checks passed
@jarvis9443
jarvis9443 deleted the fix/status-config-e2e-count-race branch July 21, 2026 13:25
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