Skip to content

Prepare the v0.1.0 release: CI, docs, backend fallback, tests - #2

Merged
hmziqrs merged 5 commits into
mainfrom
release/v0.1.0-prep
Jul 29, 2026
Merged

Prepare the v0.1.0 release: CI, docs, backend fallback, tests#2
hmziqrs merged 5 commits into
mainfrom
release/v0.1.0-prep

Conversation

@hmziqagent

Copy link
Copy Markdown
Collaborator

Completes the v0.1.0 release preparation: ships CI, release docs, a backend-fallback feature, and broadens test coverage 38 → 98 tests. Verified locally on a host without Polkit/X/Windows (the Windows MSVC job runs on CI).

Commits

  • chore — drop stray rust_out/stdin build artifacts and gitignore them; fix Cargo.toml repositoryfreeoxide/wake, add readme/authors.
  • ci — new .github/workflows/ci.yml: fmt, linux (test default + linux-x11, linux-wayland check, both clippy variants), windows-gnu cross-check, windows-latest MSVC build+test.
  • docsCHANGELOG.md, CONTRIBUTING.md; README state-path fix (pending.{pid}.json, oxiwake.lock), Installation section, CI badge.
  • feat(backend)pick_and_acquire walks the priority list with automatic fallback (skip unavailable/failed, propagate other errors); daemon selects via this path with singleton-lock-before-acquire preserved (run_daemon_impl); doctor_all() surfaces errored probes as available=false rows instead of dropping them silently.
  • test — DoctorReport snapshot tests per backend, Paths::resolve tests via a pure resolve_under helper, end-to-end CLI smoke suite (tests/cli_smoke.rs); reserved-but-unused API documented.

Verification

check
clippy --all-targets & --no-default-features --lib (-D warnings)
cargo test / --features linux-x11 ✅ (98 tests)
cargo check --features linux-wayland / --target x86_64-pc-windows-gnu / --all-features
cargo fmt --check

Behavior changes

  • Acquisition now falls back across the priority list when the primary backend is unavailable or refused — a host whose logind inhibitor is denied will try portal → gnome → kde → screensaver instead of failing outright.
  • ow doctor shows a row for every compiled-in backend, including ones whose probe errored.

Notes / out of scope

  • authors = ["Freeoxide"] is a placeholder — easy to amend before merge.
  • Not done here (separate steps): tag v0.1.0, GitHub Release, branch protection on main, crates.io publish.
  • Deferred to v0.2: real D-Bus acquire/release integration tests (need a connection-trait seam), Windows runtime tests (need a Windows CI runner).

Remove the leaked rust_out/stdin ELF binaries from the working tree and
gitignore them at the repo root. Correct the Cargo.toml repository URL to
the real remote (freeoxide/wake; the old freeoxide/oxiwake does not resolve)
and add the readme and authors fields for crates.io/docs.rs metadata.
Runs on push to main and pull requests. fmt job gates rustfmt; linux job
runs the documented verify matrix (test default + linux-x11, wayland check,
both clippy variants); windows-gnu-cross type-checks the Windows backend from
Linux; windows job builds and tests on windows-latest MSVC.
Fix the README state-path listing to match the code (pending.{pid}.json,
oxiwake.lock) for both Linux and Windows, add an Installation section, and a
CI badge. Add CHANGELOG.md (Keep a Changelog) with the v0.1.0 entry and
CONTRIBUTING.md documenting the verify matrix, feature model, and the shared
CARGO_TARGET_DIR convention.
pick_and_acquire walks supported_backends() in priority order, skipping
BackendUnavailable/AcquireFailed and propagating other errors, so a host
whose primary backend refuses the lock falls through to weaker ones. The
daemon selects via this path with the singleton lock taken before acquire
(split into run_daemon_impl). doctor_all() now emits an available=false row
for a backend whose doctor() errors instead of dropping it silently.
doctor.rs splits os_release parsing from file I/O for unit testing.
Add DoctorReport snapshot tests across every backend, Paths::resolve
tests via a pure resolve_under helper, and an end-to-end CLI smoke suite
(spawning the real ow binary for help/version/status/doctor). Document the
forward-looking but currently-unused API surface (WakeMode::Delay/BlockWeak,
DoctorReport::not_compiled, OxiwakeError::AlreadyRunning) as reserved.
@hmziqrs
hmziqrs merged commit e0b9b80 into main Jul 29, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants