test: comprehensive coverage for daemon, rules, health, capabilities, scenes, status-sync, upgrade-check#36
Closed
chenliuyun wants to merge 8 commits intomainfrom
Closed
test: comprehensive coverage for daemon, rules, health, capabilities, scenes, status-sync, upgrade-check#36chenliuyun wants to merge 8 commits intomainfrom
chenliuyun wants to merge 8 commits intomainfrom
Conversation
added 8 commits
April 26, 2026 09:07
Collaborator
Author
|
Superseded by #35, which landed the same coverage work (daemon, rules, health, scenes, status-sync, upgrade-check, capabilities) in a more complete form — plus two additional test files this branch does not have ( Merging this PR would regress two changes already on
Closing without merging; deleting the branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regression-guard tests for every untested or under-tested command surface so future refactors cannot silently break daemon lifecycle, rules analytics, health reporting, capabilities discovery, scenes validation, status-sync management, or upgrade detection.
No production code is changed. 47 new tests, test count 1889 → 1936.
Coverage added
daemon stop/status/reloadtests/commands/daemon.test.tsrules conflicts/doctor/summary/last-firedtests/commands/rules.test.tsrules webhook-rotate/show-token/suggesttests/commands/rules.test.tshealth checkCLItests/commands/health-check.test.ts(new)capabilities --surface+commandMetashapetests/commands/capabilities.test.tsscenes validate+scenes simulatetests/commands/scenes.test.tsstatus-sync start/stopunittests/commands/status-sync.test.ts(new)upgrade-checkhappy path + network errortests/commands/upgrade-check.test.tsNotes
schema export --compact+--capabilities) was dropped: the--capabilitiesflag does not exist in the currentschema exportcommand. Task 5 shipped only Part A (capabilities surface/commandMeta).stoptest: replacedvi.spyOn(process, 'kill')with direct property assignment, becausevi.spyOnonprocess.killdoes not capture invocations reliably on Windows. Kill-path execution is verified via observable side effects (pid file unlink + persisted stopped state + stdout message).opposing-actionsisseverity: 'warning'noterror, sorules conflictsexits 0 andreport.cleanremains true. Tests assert the finding viafindings.some(f => f.code === 'opposing-actions').Test plan
npm testpasses locally (1936/1936)npx vitest run <file>verification after each commitIndependent from PR #35
This PR is orthogonal to
fix/3.2.1-shebang(release pipeline hardening). Both branch from the samemaincommit; review/merge order does not matter.