Skip to content

test: align remote notification tests with background polling - #1213

Merged
xHeaven merged 1 commit into
dev-null-sh:productionfrom
xHeaven:fix/production-ci-20261027
Oct 27, 2026
Merged

xHeaven merged 1 commit into
dev-null-sh:productionfrom
xHeaven:fix/production-ci-20261027

Conversation

@xHeaven

@xHeaven xHeaven commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Production CI fails 10 remote notification tests after 80cca8f4 added polling leadership and a 60-second hidden-tab interval. Update the test doubles and timing expectations to match that behavior while retaining notification, unread-state, and race-condition coverage.

Changes

  • Queue mocked Web Locks by name, support both request overloads, and skip aborted acquisition so the polling-leader lock does not block notification delivery.
  • Use the hidden-tab interval and assert the 59,999/60,000 ms boundary.
  • Preserve the in-flight restart race in a visible, unfocused tab and let the mute-race test delay notification delivery independently of polling leadership.

Only tests/Unit/RemoteNotifications.test.tsx changes. Application and workflow behavior remain unchanged.

Validation

  • Reproduced production failure: focused suite had 10 failures and 29 passes; now all 39 pass.
  • composer test:lint — passed; existing warnings are outside the changed file.
  • composer test:type-coverage — passed, 100%.
  • bun run test:types — passed.
  • bun run test:unit — passed, 194 Node tests and 613 component tests across 47 files.
  • bun run build — passed.
  • XDEBUG_MODE=coverage php -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1'" — passed, 4,529 tests, 25,373 assertions, 100% coverage, against isolated local PostgreSQL with the search extensions.
  • git diff --check — passed.

The first PHP run lacked the fresh worktree's Vite manifest and failed page-rendering tests. Building assets and rerunning the complete command passed. Browser and device checks are inapplicable to this test-only change.

Independent review

Sol 6.1, high reasoning, fast service: PASS, no actionable findings, covering correctness, regressions, architecture, and meaningful tests.

  • Base: e83d7c04d9e3bafd75a341d4c49ae9974bf05796
  • Head: 2baabac52238aa44b250e1438a5546a222055629

The reviewer independently passed 80 tests across RemoteNotifications, RemotePreferences, and RemotePush, TypeScript checks, and the diff check. Broader validation logs were inspected rather than independently rerun. Visual and device review are inapplicable.

Limitations

Hosted CI for this PR has not yet completed. This repair updates stale tests and does not change runtime behavior.

Summary by CodeRabbit

  • Tests
    • Updated automated checks for remote-notification polling intervals, lock behavior, and view-release conditions. No user-facing behavior changes are included.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b610f338-79c1-497f-9c23-0b1562790176
Commits

Reviewing files that changed from the base of the PR and between e83d7c0 and 2baabac.

Files selected for processing: 1
  • tests/Unit/RemoteNotifications.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

Remote notification tests now model the Web Locks options-and-callback form and callback serialization. Polling checks use 60-second intervals, including checks for the initial baseline request and subsequent notification updates.

Changes: Remote notification test updates

Layer / File(s) Summary
Web Locks mock behavior
tests/Unit/RemoteNotifications.test.tsx
The lock mock accepts callback and options-plus-callback forms, checks abort signals, and serializes callbacks by lock name.
Polling and notification timing
tests/Unit/RemoteNotifications.test.tsx
Polling tests use 60-second intervals. They check the initial baseline timing and adjust visibility and release-condition setup.

Priority: Low

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

Change: Other

Possibly related PRs

Suggested reviewers: ampagent

Merge Risk: Minimal · up to 2baab

The test updates accurately model the current remote-notification behavior and are ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating remote notification tests to match background polling behavior.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@xHeaven
xHeaven merged commit b3ded17 into dev-null-sh:production Oct 27, 2026
7 checks passed
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