Skip to content

fix(tests): give the status hub test's device store the pairing listener - #2040

Merged
devswha merged 1 commit into
mainfrom
fix/status-hub-test-onpaired
Oct 26, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/status-hub-test-onpaired

Conversation

@devswha

@devswha devswha commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Change

This fixes main, which has been red since afdf3a7 (#1987): CI run 40381817339 fails Fast checks.

#1977 (2ad63df) made the status hub subscribe to devices.onPaired (server/core/status.ts:280). The OpenCode subagent tests that #1987 added in server/core/status.test.ts build the hub with the devices stub { gated: false, has: () => true }, which has no onPaired. Three tests fail with devices.onPaired is not a function. Each PR was green on its own base, and they merged without a textual conflict.

The stub now has a no-op onPaired. This is test-only, with no change to product code. It replaces the revert in #2039, so #1987's feature stays.

Checks

  • bun test ./server/core/status.test.ts: 3 pass, 0 fail. On main it is 0 pass, 3 fail.
  • bun run check fast: everything ok (typecheck, build, unit tests, generated files, workflow syntax).
  • scripts/changelog-fold.test.ts passes with the new fragment.

Co-authored-by: sisyphus-dev-ai <[email protected]>

#1977 made the status hub subscribe to devices.onPaired; #1987's OpenCode subagent tests, merged after it, build the hub with a devices stub that lacks it, so main's Fast checks failed with 'devices.onPaired is not a function' (run 40381817339). The stub now has a no-op onPaired.
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between afdf3a7 and bf5af43.

Files selected for processing: 2
  • changelog.d/status-hub-test-onpaired.md
  • server/core/status.test.ts

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

📝 Summary

Summary by CodeRabbit

  • Tests
    • Fixed the status hub’s test setup so its OpenCode subagent tests run successfully again.
    • No user-facing behavior changes are included in this update.

The status hub test’s mocked device store now includes an onPaired no-op callback. A changelog entry records the change and states that the tests run again on main.

Changes: Status hub test setup

Layer / File(s) Summary
Provide the pairing listener to the test hub
server/core/status.test.ts, changelog.d/status-hub-test-onpaired.md
The mocked devices object adds an onPaired no-op callback. The changelog records the test setup change.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other · Severity of issue fixed: Low

Possibly related PRs

Merge Risk: Minimal · up to bf5af

This test-only update has no actionable merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the test fix: adding the status hub pairing listener to the device store stub.
Description check Passed The description explains the failure, identifies the root cause, describes the test-only fix, and lists validation results. It uses a "Checks" heading instead of the template's "Validation" heading, b…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
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: Description check

Explanation

The description explains the failure, identifies the root cause, describes the test-only fix, and lists validation results. It uses a "Checks" heading instead of the template's "Validation" heading, but the required validation information is present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@devswha

devswha commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

Merge pass: this is the main fix. Main has been red since afdf3a7 (#1987), with 3 tests failing in server/core/status.test.ts.

@devswha
devswha merged commit 364d3c0 into main Oct 26, 2026
19 checks passed
@devswha
devswha deleted the fix/status-hub-test-onpaired branch October 26, 2026 19:53
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