fix(ci): unblock macOS dev-release prereqs#1231
fix(ci): unblock macOS dev-release prereqs#1231ErikBjare merged 2 commits intoActivityWatch:masterfrom
Conversation
Greptile SummaryThis PR fixes two concrete macOS CI blockers introduced after #1230: it corrects the Poetry environment used when running Python submodule tests, and it adds hardened-runtime + entitlements to the Tauri
Confidence Score: 5/5Safe to merge — both changes are targeted, well-justified, and the prior entitlements concern has been addressed in this commit. No P0 or P1 findings remain. The Makefile fix is mechanically correct (cd-then-poetry-run is the standard pattern for per-module Poetry invocations). The codesign fix correctly pairs --options runtime with the pre-existing entitlements.plist that was already purpose-built for PyInstaller binaries. The previous review concern about missing --entitlements is confirmed resolved. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[make test] --> B[for module in TESTABLES]
B --> C{module/pyproject.toml exists?}
C -- yes --> D["cd module && poetry run make test (module's own virtualenv)"]
C -- no --> E["make -C module test (plain make, e.g. Rust)"]
D --> F{exit code?}
E --> F
F -- 0 --> B
F -- non-zero --> G["echo Error; exit 2"]
subgraph signing [build_app_tauri.sh codesign]
H{APPLE_PERSONALID set?}
H -- yes --> I["codesign --deep --force --options runtime --entitlements entitlements.plist --sign APPLE_PERSONALID dist/ActivityWatch.app"]
H -- no --> J[skip signing]
end
Reviews (2): Last reviewed commit: "fix(ci): preserve entitlements under har..." | Re-trigger Greptile |
scripts/package/build_app_tauri.sh
Outdated
| echo "Signing app with identity: $APPLE_PERSONALID" | ||
| codesign --deep --force --sign "$APPLE_PERSONALID" "dist/${APP_NAME}.app" | ||
| # Hardened runtime is required for notarization prechecks on macOS. | ||
| codesign --deep --force --options runtime --sign "$APPLE_PERSONALID" "dist/${APP_NAME}.app" |
There was a problem hiding this comment.
Missing
--entitlements with hardened runtime
Enabling --options runtime is the right call for notarization, but the codesign invocation doesn't pass --entitlements. The repo already ships scripts/package/entitlements.plist (with com.apple.security.cs.allow-jit and com.apple.security.cs.allow-unsigned-executable-memory) specifically because the Python sub-watchers (packaged via PyInstaller in the dist/activitywatch/ tree) need those exceptions to run under hardened runtime.
Without --entitlements, --deep will sign every nested binary with strict hardened-runtime defaults, which can silently prevent Python's JIT from executing and break watchers like aw-watcher-window or aw-server at runtime on notarized builds.
| codesign --deep --force --options runtime --sign "$APPLE_PERSONALID" "dist/${APP_NAME}.app" | |
| codesign --deep --force --options runtime --entitlements scripts/package/entitlements.plist --sign "$APPLE_PERSONALID" "dist/${APP_NAME}.app" |
If the Tauri build does not include any PyInstaller-bundled Python interpreters (i.e., the Python sub-watchers are shipped as plain scripts rather than frozen executables), then this suggestion can be skipped. A brief comment clarifying that would help future maintainers understand why no entitlements are needed here.
There was a problem hiding this comment.
Fixed in 7d3994d.
You were right: the Tauri bundle still copies the packaged helpers from dist/activitywatch/* into the app bundle, so hardened runtime needs the existing scripts/package/entitlements.plist for those PyInstaller-built binaries. I added --entitlements scripts/package/entitlements.plist to the codesign step.
Indeed, is the fix you did enough? |
|
@greptileai review |
|
Yes. Current status: every check is green except the last |
|
All checks are green now. I tried to merge this with |
This fixes the two concrete macOS blockers visible in
Build Taurionmasterafter #1230 merged.Fixes:
aw-watcher-window --helpfailure onmacos-latest.app, which fixes thexcnotary precheckfailure before notarizationValidation:
aw-watcher-windowbash -n scripts/package/build_app_tauri.shContext: