-
Notifications
You must be signed in to change notification settings - Fork 2
files core monitortests helperdiagnosticsreporttests swift a708a4df
ventaphobia edited this page Apr 23, 2026
·
1 revision
- Area: Tests.
- This page records the file's current repository role, source metadata, and recent commit history.
- Review nearby tests and commit pages before changing this file.
| Field | Value |
|---|---|
| Source path | Core-MonitorTests/HelperDiagnosticsReportTests.swift |
| Wiki area | Tests |
| Exists in current checkout | True |
| Size | 12045 bytes |
| Binary | False |
| Line count | 253 |
| Extension | .swift |
XCTest
| Kind | Name | Line |
|---|---|---|
| class | HelperDiagnosticsReportTests |
2 |
| func | testMakeReportExplainsMonitoringOnlyModeWhenHelperIsMissing |
5 |
| func | testMakeReportPrioritizesSigningMismatchRecovery |
45 |
| func | testMakeReportCarriesLoginApprovalGuidance |
84 |
| func | testHelperInstallAppearsOrphanedWhenFilesExistButLaunchdServiceIsMissing |
122 |
| func | testHelperInstallAppearsOrphanedWhenLaunchdPlistExistsWithoutHelperBinary |
132 |
| func | testHelperInstallDoesNotAppearOrphanedWhenLaunchdServiceExists |
142 |
| func | testOrphanedHelperCleanupScriptTargetsInstalledHelperArtifacts |
152 |
| func | testLaunchdBlessFailuresTriggerOrphanedCleanupRetry |
159 |
| func | testNonLaunchdBlessFailuresSkipOrphanedCleanupRetry |
167 |
| func | testMakeReportCallsOutIncompleteHelperInstall |
175 |
| func | testMakeReportCarriesAppleSiliconFanBackendMetadata |
213 |
| Commit | Date | Subject |
|---|---|---|
675fabf |
2026-04-17 | Ship 14.0.5 helper recovery release |
bd80f00 |
2026-04-17 | Fix fan helper recovery and weather fallback |
b544f6f |
2026-04-17 | Repair orphaned helper reinstall path |
5dc29ed |
2026-04-16 | Add privacy controls and refine Core Monitor presentation |
80000af |
2026-04-16 | Add friendly host model names to diagnostics |
9d4d7d1 |
2026-04-16 | Capture dashboard launch state in support diagnostics |
3668c50 |
2026-04-16 | Add exportable helper diagnostics reports |
- Prefer focused changes that respect the ownership described above.
- If this file touches helper trust, SMC writes, startup, or permissions, update the relevant support docs and tests.
- If this file is generated or an asset manifest, verify the producing workflow instead of hand-editing generated payloads.
import XCTest
@testable import Core_Monitor
final class HelperDiagnosticsReportTests: XCTestCase {
func testMakeReportExplainsMonitoringOnlyModeWhenHelperIsMissing() {
let context = HelperDiagnosticsContext(
generatedAt: Date(timeIntervalSince1970: 1_000),
appBundleIdentifier: "CoreTools.Core-Monitor",
appVersion: "1.4.1",
appBuild: "1410",
macOSVersion: "macOS 15.5",
hostModelIdentifier: "Mac16,7",
hostModelName: "MacBook Pro (16-inch, 2024, M4 Pro/Max)",
chipName: "Apple M4 Pro",
helperLabel: "ventaphobia.smc-helper",
bundledHelperPath: "/Applications/Core-Monitor.app/Contents/Library/LaunchServices/ventaphobia.smc-helper",
bundledHelperExists: true,
installedHelperPath: "/Library/PrivilegedHelperTools/ventaphobia.smc-helper",
installedHelperExists: false,
connectionState: .missing,
helperStatusMessage: nil,
fanBackendRepository: "agoodkind/macos-smc-fan",
fanModeKeyFormat: nil,
fanForceTestAvailable: nil,
launchAtLoginEnabled: false,
launchAtLoginError: nil,
enabledMenuBarItemCount: 1,
menuBarPresetTitle: "Balanced",
signingInfo: HelperDiagnosticsSigningInfo(
signedIdentifier: "CoreTools.Core-Monitor",
teamIdentifier: "TEAM1234",
isAdHocOrUnsigned: false,
issue: nil
)
)
let report = HelperDiagnosticsExporter.makeReport(from: context)
XCTAssertEqual(report.summary, "Monitoring-only configuration. The privileged helper is not installed.")
XCTAssertTrue(report.recommendedActions.contains("Monitoring already works without the helper. Install it only if you want manual or profile-based fan control."))
- Home
- Start Here
- Product Overview
- Runtime Architecture
- Monitoring Pipeline
- Fan Control
- Privileged Helper
- Touch Bar
- Release Automation
- Security Model
- File Index (279)
- Every Commit (401)
- Chronological Change Log
- Removed Parts
- All Deleted Paths
- Branches And Tags
- Wiki Manifest
- Start Here
- Product Overview
- Source Map
- Runtime Architecture
- App Startup And Lifecycle
- Dashboard Architecture
- Menu Bar Architecture
- Monitoring Pipeline
- Snapshot Trends And Freshness
- CPU GPU Memory Disk Network
- Battery Power And Thermals
- SMC And Apple Silicon
- Fan Control
- Custom Fan Curves
- Privileged Helper
- XPC Trust Boundary
- Helper Diagnostics
- Touch Bar Architecture
- Touch Bar Customization
- Weather And Location
- Privacy And Permissions
- Onboarding And Help
- Legacy Alerts
- Kernel Panic Weird Mode