Range: dcb6602..211250f (18 commits plus one merge). Baseline is the last shipped version, 2.3.9.
## Engine
- Updated the built-in engine to Stockfish 19 (previously Stockfish 17). Analysis now comes from the newer engine, and the network name shown by the app changes to nn-1a298aa575a0.nnue.
- Stockfish 19 uses a single evaluation network in place of the two that Stockfish 17 used, so the app is about 20 MB larger to download and on disk.
- If the chess engine quits, the app now stays open and tells you what happened instead of freezing or closing. Close and reopen the game to start a new engine.
- The Go/Stop button now goes back to "Go" when analysis ends on its own, for example in a checkmate or stalemate position. Before, it could stay on "Stop" with nothing running, which also left Threads, Hash and Skill Level locked in Preferences for the rest of the session.
## Opening PGN files
- A PGN file that contains a game the app cannot read now opens. Previously one bad game anywhere in the file made the whole file fail to open, which is what stopped large archives such as the FIDE Olympiad files from opening at all (issue #88).
- A game that contains an illegal move now loads up to that move and is marked "(incomplete)" in the game list; the app tells you which move it stopped at. Variations that read cleanly are still fully navigable.
- A game whose moves cannot be read at all stays in the game list marked "(unreadable)". Selecting it shows a message saying the rest of the file is unaffected and the game is left as it is on disk. Move navigation and the engine's best move and best line commands are turned off while such a game is selected.
- A game with no moves, only a result marker such as "*", no longer prevents the file from opening.
- A file containing a variation with no moves in it, such as "1. e4 ({no moves here}) *", no longer quits the app when opened.
- A file containing the literal text "(null)" written by an older version of the app now opens.
## Saving PGN files
- Games the app could only read in part, or not at all, are now saved with their original move text exactly as it was on disk. This matters because the app saves in place: without it, opening one of these newly openable files would have quietly deleted the moves the app could not read.
- Playing a move on an incomplete game switches saving over to the edited moves, which drops the unread remainder of that game. Undo restores the original text; Redo restores your edit.
- Comments are now written inside braces. Previously, saving a file that contained comments produced a file the app could no longer open.
- A game with no Result tag is now saved with "*" as the game termination marker. Previously it wrote the literal text "(null)", which other chess software rejects.
## Move list
- Variations are indented by four spaces per nesting level and start on their own line, both in the move list and in saved PGN files. A game whose moves could not be fully read keeps its original formatting instead.
- Comments are shown with their braces in the move list, matching what gets saved.
## System requirements
- Now requires macOS 12 Monterey or later. Version 2.3.9 ran on macOS 11 Big Sur.
## Other
- Toolbar customizations now stick. The toolbar is customized by right-clicking it; before, any change was discarded when the window closed or the app quit. Note that hiding the toolbar is part of what gets remembered, and there is no menu command to bring it back.
- Version is now 2.4.0 (build 45).
---
# For contributors
## Continuous integration (new)
`c187a81` adds the repository's first CI: `.github/workflows/ci.yml` runs `xcodebuild test` on `macos-26` with Xcode pinned by absolute path to `/Applications/Xcode_26.6.app`, on every pull request and on pushes to master. Token is `contents: read`, `actions/checkout` is pinned by full commit SHA, concurrency cancels superseded runs, and no secrets are referenced, so it runs unchanged on fork PRs. The same commit checks in `Stockfish.xcodeproj/xcshareddata/xcschemes/Stockfish.xcscheme`; before it, no scheme was tracked and a fresh clone built only because Xcode autocreates one.
Two coverage gaps worth knowing: CI builds Debug only, and it passes `CODE_SIGNING_ALLOWED=NO`, so the `CodeSignOnCopy` re-sign of the three embedded engine helpers is never exercised. Nothing in CI builds a Release configuration or an archive.
## Tests
Suite went from 20 methods across six files at the 2.3.9 baseline to 46 across eight, and now runs automatically for the first time.
- `StockfishTests/SFMParserTest.m`: 3 to 21 tests, covering game-boundary round trips, moveless games, moveless variations, and the whole partial-recovery contract including two round-trip idempotency tests over LF and CRLF files.
- `StockfishTests/SFMChessGameTest.m`: 3 to 6, covering the termination-marker fallback, undo/redo of preserved move text, and move rejection on unreadable games.
- `StockfishTests/SFMWindowControllerTest.m` (new, `4ad5dbe`): two app-hosted integration tests that load the real nib, real table view and real engine; nothing mocked. Known weakness: both dismiss the parse-failure alerts with a timer but never assert a modal appeared, so removing the alerts would leave both tests green.
- `StockfishTests/SFMEngineBinaryTest.m` (new, `dc7eee5` plus three follow-ups): per embedded helper, asserts `SecStaticCodeCheckValidity` passes, the signed entitlements equal `Stockfish/Binaries.entitlements` exactly, and the file is under 50 MB. The follow-ups closed real holes: `acf6224` (unreadable size satisfied the bound via `[nil unsignedLongLongValue]`), `46aee38` (key-presence check let extra App Sandbox entitlements through, which macOS treats as fatal for an inheriting helper), `7e34df6` (`SecCodeCopySigningInformation` reads entitlements off a signature it never validates). Gap: nothing asserts the binaries name the network the bundle actually ships.
- No `SFMUCIEngineTest` exists, despite `SFMUCIEngine.m` being the largest non-test source change in the range (252 lines across `7f04331` and `dd926ae`). The outstanding-`go` counting, the self-terminating-search transition, the SIGPIPE-suppressed write and the once-only quit notification are asserted by nothing.
## Architecture docs
`4ad5dbe` adds a 55-line `ARCHITECTURE.md` covering PGN parsing and recovery, saving and editing recovered games, and document selection. Every rule it states has a test behind it. It has no engine section, so two constraints this release just pinned live only in a commit message and an assertion string: the helpers get `com.apple.security.inherit` solely from the signature on the committed binary (Xcode's code-sign-on-copy runs with `--preserve-metadata=identifier,entitlements,flags` and no `--entitlements`), and the engines are built with `-DNNUE_EMBEDDING_OFF`, which appears in exactly one tracked file, the failure message at `StockfishTests/SFMEngineBinaryTest.m:112`. The three engine binaries are committed prebuilt with no build rule in this repo, so a cloner cannot find out how they are produced.
## Engine binaries and repository weight
The committed binaries changed from Daylen's Apple Distribution signature with `flags=0x0` to ad hoc with `flags=0x10002 (adhoc, runtime)`. Entitlements are unchanged. Xcode re-signs on copy, so the shipped app carries the developer identity and now also the hardened runtime flag the old helpers lacked. `nn-1a298aa575a0.nnue` is 98,511,183 bytes (93.9 MiB), a plain git blob with no LFS anywhere in the tree, leaving 6.05 MiB under GitHub's 100 MiB per-file push limit. About 97% of the roughly 348 MiB object store is engine binaries and nets. The next engine bump should decide LFS or not before it lands.
## Also in the range, not user-facing
- `192f2c4` set the PGN comment color to a hardcoded green; `7348ad2` reverted it back to `secondaryLabelColor` for Dark Mode adaptivity. Net diff over the range is whitespace only, so there is nothing to note for users.
- `5dc4a79` first fixed the "(null)" export by writing a bare newline, which folded the next game's headers into the moveless game; `22035b1` settled it with the "*" marker. Only the final behavior ships.
- `5fb2f0b` (a 2016 upstream patch replayed here) removes two `assert` calls from `Chess/movegen.cpp` that fire on valid en-passant FENs. Release defines `NDEBUG` (`project.pbxproj:946`), so C asserts are compiled out of shipping builds; this only affects Debug builds.
- Zero diff in this range for `SFMDocument.{h,m}`, `SFMBoardView.{h,m}`, `SFMPreferencesWindowController.{h,m}`, `SFMUserDefaults.{h,m}`, `SFMUCILine.{h,m}`, `MainMenu.xib` and `Preferences.xib`. No new menu items, no new preferences.
2.0.1
- Updated engine to Stockfish 6
- Added option to show/hide arrows
2.0
Introducing Stockfish 2 for Mac, the biggest update to Stockfish for Mac yet! These are just a few of the features:
- UPDATED DESIGN. We've given the app a visual refresh: there's a new color scheme, dramatically improved animations, and a new toolbar.
- UPDATED ENGINE. The new Stockfish engine is about 45 ELO stronger than Stockfish 5. And there's a 5% speed boost if you're using the latest Haswell processors.
- MULTIPV. Sometimes you want to know the 2nd or 3rd best move in addition to the best move. Enable more lines of analysis in the Engine menu.
- UNDO/REDO. Now Stockfish will warn you if you're about to overwrite the game history with a new move, and you can always undo.
- ENDGAME TABLEBASES. You can select a folder of Syzygy endgame tablebases for Stockfish to use during analysis. (Tablebases downloaded separately.)
- MORE OPTIONS. You can adjust the engine's skill level and contempt, or have Stockfish automatically tweak the settings for strongest play.
Many crashes are now fixed as well. We hope you enjoy using Stockfish 2 for Mac. Please help us out and leave a rating on the App Store if you like it. Thanks!