Repository navigation
fix(tests): give the status hub test's device store the pairing listener - #2040
Conversation
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.
|
No actionable comments were generated in the recent review.
|
| 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:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other · Severity of issue fixed: Low
Possibly related PRs
- devswha/ovis#1987: Added the status hub test file with the mock updated in this PR.
- devswha/ovis#2039: Reverted the status hub tests that this PR repairs.
- devswha/ovis#1977: Added
DeviceStore.onPaired, which the status hub subscribes to.
Merge Risk: 
Minimal · up to bf5af
-
This test-only update has no actionable merge-blocking risk.
Pre-merge checks: 
5
-
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.
Comment @coderabbitai help to get the list of available commands.
|
Merge pass: this is the main fix. Main has been red since afdf3a7 (#1987), with 3 tests failing in
|
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 inserver/core/status.test.tsbuild the hub with the devices stub{ gated: false, has: () => true }, which has noonPaired. Three tests fail withdevices.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.tspasses with the new fragment.