fix(ci): use 'poetry run' in test target + run typecheck#129
Merged
Conversation
The test target called the bare 'aw-watcher-window' console script, which only resolves when the venv's bin/ is on PATH. Under the unified release workflow (activates venv, then 'make test') this is flaky: the same job that passes on one run fails with 'aw-watcher-window: No such file or directory' on another, and the retry wrapper just re-runs the identical failure. Switch to 'poetry run aw-watcher-window --help' to match aw-watcher-afk and aw-watcher-input, which resolves the entrypoint regardless of PATH. Also run 'make typecheck' here like the sibling watchers (window was skipping mypy entirely).
| test: | ||
| aw-watcher-window --help | ||
| poetry run aw-watcher-window --help # Ensures that it at least starts | ||
| make typecheck |
There was a problem hiding this comment.
Using a bare
make subprocess here works but loses any flags passed to the parent invocation (e.g., -j, --dry-run, or custom MAKEFLAGS). The idiomatic way to recurse into make is $(MAKE), which forwards the parent's flags automatically. The existing build target has the same pattern, so this is consistent — but worth fixing in both places if CI options ever expand.
Suggested change
| make typecheck | |
| $(MAKE) typecheck |
ErikBjare
added a commit
to ActivityWatch/activitywatch
that referenced
this pull request
Jun 24, 2026
Pulls in ActivityWatch/aw-watcher-window#129, which switches the Makefile test target to 'poetry run aw-watcher-window --help' (+ typecheck). Fixes the flaky 'aw-watcher-window: No such file or directory' failure in the unified release workflow when the venv bin/ isn't on PATH.
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.
Problem
The
testtarget invoked the bare console script:test: aw-watcher-window --helpThis only resolves when the venv's
bin/is onPATH. In the main repo's unified release workflow (ActivityWatch/activitywatch#1313) the step doessource venv/bin/activate && make test, which makes this flaky — the macOS Tauri job passed this step on one run and failed on the next with:The
nick-fields/retrywrapper then just re-ran the identical deterministic failure 3×. (Example: activitywatch run 28040663454, attempt 2.)Fix
Use
poetry run, matchingaw-watcher-afkandaw-watcher-input, which resolve the entrypoint regardless ofPATH. Also runmake typecheckhere like the sibling watchers — window was skipping mypy entirely.The
aw-watcher-windowconsole script is defined inpyproject.toml(aw-watcher-window = "aw_watcher_window:main"), sopoetry runresolves it reliably.