Harden toolchain guard and crash marker; split AppModel - #42
Merged
Reedtrullz merged 1 commit intoAug 12, 2026
Merged
Conversation
- Add scripts/check-toolchain.sh and wire it into verify/test/app/install targets so a Command Line Tools-only developer directory fails with the exact fix instead of cryptic SwiftUIMacros errors. - Make ManualControlMarker writes crash-durable (same-directory temp file + fsync + rename + directory fsync), return success, and surface a status warning when the manual-mode recovery marker cannot be written. - Split AppModel.swift (2612 -> 526 lines) into seven same-target extension files by concern (Lifecycle, Polling, Control, Profiles, Fans, MenuBar, Notifications); pure relocation, no behavior change. - Update MakefileTrustGateTests and ManualControlMarkerTests for the new contracts. Verified: make verify green (1344 tests, 0 failures), warnings-as-errors build, app bundling, plist/codesign, viftyctl identifier checks.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reedtrullz
deleted the
codex/review-fixes-toolchain-marker-appmodel-split
branch
August 12, 2026 14:04
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.
What changed
scripts/check-toolchain.sh, wired intoverify,test-fast,test-full,app,pkg,install,install-dev-adhoc, andrun-app. When the active developer directory is Command Line Tools (which lacks SwiftUI macro plugins), builds now fail with the exact one-time fix instead of crypticSwiftUIMacroserrors. An explicitDEVELOPER_DIRis honored.ManualControlMarker.markActive()now writes through a same-directory temporary file (O_EXCL), fsyncs the file and parent directory, then renames into place;clear()fsyncs the parent after removal. Both returnBool, and the fan-control coordinator surfaces a visible status warning when entering manual mode without a writable marker, so an unclean exit can no longer silently lose its recovery evidence.AppModel.swiftreduced from 2612 to 526 lines by relocating methods into seven same-target extension files (Lifecycle,Polling,Control,Profiles,Fans,MenuBar,Notifications). Pure mechanical relocation;start()andprimeMenuBarStatusItemTelemetrystay in the main file so the source-inspection architecture tests pass unchanged.MakefileTrustGateTestspins the new guarded target lines;ManualControlMarkerTestsasserts the new return values and covers a deterministic write-failure path.Why
These are the actionable findings from the 2026-08-12 deep review: the local
make verifygate was unusable out of the box on a CLT-only machine, the unclean-exit marker was not crash-durable and swallowed write failures, and AppModel remained the largest maintainability debt in the remediation inventory.Impact
No behavior change for users. Build/install targets now fail fast with actionable toolchain guidance on machines where Xcode is not selected, and manual fan control warns before leaving the machine without crash-recovery evidence.
Validation
make verifygreen: 1344 tests / 0 failures, warnings-as-errors build, release app bundling, plist lint, deep code-sign verification,viftyctlidentifier checks.scripts/check-toolchain.shexits 1 with guidance under Command Line Tools and exits 0 under Xcode 27.