Repository navigation
macOS verification: build, tests and first CI - #1
Merged
Merged
Conversation
On macOS (M2, Node 22.23) "an event rule > builds the event pad..." failed 5 times out of 5 with `expected '' to be '0.2'` at `seconds.min`. The field's min and max come from the limits in the answer to review_feedback, which useFeedbackReview asks for only after the draft has been unchanged for 150 ms. The test read `min` straight after its last selectOptions, so it passed only when an earlier step happened to leave 150 ms of quiet for a review to land. It now waits for the bound, as the neighbouring "holds for a time the runtime accepts" test already does. Test-only; nothing depends on the system.
macOS 15.4.1 on an M2, Rust 1.97.0 beside the machine's 1.83.0. Frontend: one test failed from a race with a 150 ms debounce (fixed in the previous commit). Rust: cargo check, fmt and clippy clean on the first try; observer/macos.rs compiled as written.
704 passed, 5 failed, 2 ignored. The four failures NEXT_PHASE.md predicted (values recorded on Linux) and one it did not: an intermittent race in the baseline of the_same_application_again_is_a_no_op.
On macOS two tests failed against files recorded on Linux:
surfaces::tests::contract_fixture_matches_the_default_workspace and
persistence::tests::a_real_v3_workspace_migrates_to_exactly_what_ships_now.
default_workspace() picked four starter pads with cfg! (Terminal, VS Code,
Files, Screenshot), and a fifth helper, demo_cmd, picked `ping` or `sleep`
with cfg!(windows), so on any system but Linux the starter workspace could
not equal the Linux fixtures. Nothing was wrong with the product.
The system is now a parameter: Platform { Linux, MacOs, Windows },
default_workspace_for(platform), and default_workspace() passing
Platform::current(). The two tests ask for the Linux workspace, which is
what their files hold, and the dump_workspace example writes the Linux
workspace on every system, so refreshing the fixture on a Mac no longer
breaks Linux. New tests check, on every system, the pads that differ per
system and that nothing else differs.
The fixtures under examples/ are unchanged.
On macOS two tests failed: the_context_fixture_has_every_field_the_runtime_emits (tests/context_contract.rs) and rules_are_checked_reordered_and_flagged (tests/context_engine.rs). context::status() read the namespace with cfg! (native_namespace), so with the scripted observer, which reports x11 identities, every x11 rule was flagged "for another system" on a Mac (`problems: [OtherSystem, OtherSystem, ...]`), and the context fixture, made on Linux, no longer matched what the runtime emits. The namespace is a property of whatever reports the identities: ForegroundObserver::namespace(), by default the namespace of the system LaunchDeck was built for, which is right for the macOS, Windows and X11 observers and for NoObserver, so nothing changes in the product on any system. The scripted observer says x11. The engine keeps the namespace next to the observer's status and status() uses it. New test: a_rule_for_another_system_is_flagged_wherever_this_runs, which flags a macOS and a Windows rule against the scripted observer on any system. observer/macos.rs, windows.rs, x11.rs and identity.rs are unchanged; the fixtures under examples/ are unchanged (dump_context on macOS now writes the same file).
the_same_application_again_is_a_no_op failed on macOS 1 run in 10 alone and 1 in 5 with its target: `nothing was activated, left: 2, right: 0`. With a temporary eprintln, a failing run had the same events as a passing one, one surface.changed and one page.changed, both for the first activation; only the baseline differed (0 instead of 2). until_shown polls the runtime's state, which activate() changes before it publishes those events on the bus (delivered on another task) and before it sends the state and the context. The test took its baseline in that window. The repeated observations activated nothing. New helper until_heard(surface): waits until the last page.changed the interface received is for that surface and the last context it was sent is the runtime's current one (sent after the state). Used where a test counts or reads what the interface heard right after a state change: the no-op test, and two that had the same window without having failed yet (app_a_shows_surface_a_app_b_shows_surface_b_on_the_launchpad, the_interface_is_told_when_the_context_changes_and_only_then). After: the no-op test 50 runs out of 50 alone, the context_engine target 20 out of 20.
Three fixes, one commit each; afterwards three full runs of 715 passed, 0 failed, 2 ignored, the once-intermittent test 50 out of 50 alone.
From the draft in NEXT_PHASE.md section 5, checked on 2026-10-05: - actions/checkout v7 (v7.0.1), actions/setup-node v7 (v7.0.0), Swatinem/rust-cache v2 (v2.9.2): current majors. - Runners: ubuntu-24.04 pinned (ubuntu-latest moves to 26.04 in November, actions/runner-images#14748, still open); macos-latest is macOS 26 on arm64 (#14167, closed); windows-latest is Windows Server 2025, allowed to fail until it has been seen green. - Rust pinned to 1.97.0, the toolchain verified on Linux and on macOS; stable is 1.99.0 and its newer clippy could fail -D warnings for reasons that have nothing to do with a system. - Linux packages: libdbus-1-dev and pkg-config added (libdbus-sys is linked through tauri -> tao, found with cargo tree for the Linux target). - cargo test runs with --no-fail-fast so that every failure is listed. - Fast checks run before tests and builds; a new check goes with its kind. Rust does not need the built interface (clippy checked without dist/). - Read-only token, no secrets, cancel superseded runs, line endings kept as committed on Windows. Not run yet: it needs a push. actionlint 1.7.12 reports nothing.
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.
First build and test of LaunchDeck on macOS (sections 1 to 3 and 5 of
NEXT_PHASE.md), and the first CI. No new features. The running record, with every command and its result, is inVERIFICATION.md.Machine: MacBook Air M2, macOS 15.4.1, Rust 1.97.0 (the toolchain of the Linux run), Node 22.23.
What was found
typecheck,lint,build)npm test: 1 of 309 failed, a race between a test and a 150 ms debounce (not predicted, not system-specific).cargo check --all-targets,fmt,clippy -D warningscontext/observer/macos.rscompiled as written, no Cargo feature missing.cargo testNEXT_PHASE.md(values recorded on Linux) and one intermittent race inthe_same_application_again_is_a_no_op.Fixes, one commit each
ae2dda4test: the event-rule builder test waits for the runtime's limits, as its neighbour does.3002297fix: the starter workspace's system is a parameter (Platform,default_workspace_for), includingdemo_cmd; the fixture tests anddump_workspaceask for Linux explicitly.093e7c1fix:ForegroundObserver::namespace(); the scripted observer saysx11;status()no longer readscfg!. Behaviour of the product unchanged on every system.699abf3test:until_heard, so tests count what the interface heard only after an activation has landed (the no-op test and two neighbours with the same window).No fixture under
examples/was regenerated;dump_workspaceanddump_contexton the Mac now write the committed files byte for byte.After the fixes, on the Mac: 3 full runs of
cargo test --no-fail-fast, each 715 passed, 0 failed, 2 ignored; the once-intermittent test 50 out of 50 alone and its target 20 out of 20;npm test309 passed; fmt, clippy, typecheck, lint clean.CI
.github/workflows/ci.ymlfrom the draft, checked against current releases: Rust pinned to 1.97.0 (stable is 1.99.0),libdbus-1-devandpkg-configadded for Linux,cargo test --no-fail-fast, read-only token, no secrets. Windows is allowed to fail until it has been seen green. This pull request is its first run.Test plan
NEXT_PHASE.mdby hand: Auto Context, Keychain, keyboard shortcuts, Launchpad X, Home AssistantVERIFICATION.md(README "Verified where", platform notes)