Commit Graph
21 Commits
Author SHA1 Message Date
Bastian Mäuser f697963705 Document the release checklist: registry upload is separate from release attachments
A release only visible as an attachment does not reach apt; the Debian
registry pool upload is a second, required step. Learned the hard way
when v0.2.1 shipped without it and machines stayed on 0.2.0.
2026-11-12 02:10:34 +01:00
Bastian Mäuser a74b95dca7 Bump version to 0.2.1 v0.2.1 2026-11-12 02:06:24 +01:00
Bastian Mäuser 9da7cdb1a5 Ignore the local Gitea push token 2026-11-12 02:01:31 +01:00
Bastian Mäuser dcbe307c4a Bump sd-notify to 0.5 and toml to 1.0
sd-notify 0.5 drops the unset_environment bool from notify() (we always
passed false; the unset variant is a separate function we never used).
toml 1.x is API-compatible for our Config deserialization and its MSRV
is exactly 1.85, matching the project floor. zbus stays on 5.x: v6
requires rustc 1.89, past the Ubuntu 24.04 toolchain this repo commits
to. Resolver locked all updated deps at Rust-1.85-compatible versions.
2026-11-12 01:55:53 +01:00
Bastian Mäuser 4e4bf28508 Document missing_after_secs default as fallback only
The code default stays 30 s for configs that omit the key, but 30 s
false-locks with the companion beacon (event gaps of 25-60 s are
routine). Docs now say explicitly that shipped configs must set 60+.
2026-11-06 15:12:18 +01:00
Bastian Mäuser 923d0fc485 Fix rust-lld path in the arm64 recipe: rustc 1.85 has no rustlib-dir print v0.2.0 2026-11-06 12:27:06 +01:00
Bastian Mäuser e4623f33c3 Bump version to 0.2.0 2026-11-06 12:17:48 +01:00
Bastian Mäuser dcf403200a Fix probe reliability and restore sane missing_after
Two false locks with the phone present: missing_after=30 sat below the
realistic worst-case event gap (beacon counter rotation every 10s times
2-20% duty sampling, with frozen-RSSI dedupe collapsing catches inside
one window), and the connect probe ran while our own discovery
duty-cycling was active, where attempts stall or abort with
le-connection-abort-by-local.

Probe now stops discovery first and retries (2x6s); sample config and
handoff document the sampling math. Local config additionally raises
rssi_lock to -85, where nearby-phone readings were pinning.
2026-11-06 12:17:47 +01:00
Bastian Mäuser 38087583cf Document Debian installation via release and package registry
Option A adds the Gitea Debian registry as an apt source (updates land
with apt upgrade), option B installs a release .deb directly; both share
the same per-user setup steps.
2026-11-05 17:03:06 +01:00
Bastian Mäuser b93c0134dd Add Debian packaging and arm64 cross build
cargo-deb metadata produces a .deb with the binary, the packaged user
unit variant, man page and example config; arm64 cross-builds as a
static musl binary via an isolated rustup and rust-lld (recipe in
README). Add MIT LICENSE for the package copyright.
v0.1.0
2026-11-05 16:34:47 +01:00
Bastian Mäuser b4e51a58f6 Explain locks with a desktop notification after unlock
After locking, wait for the session to come back (logind Unlock,
ScreenSaver ActiveChanged, or a new session after re-login) and post a
notification saying the phone left Bluetooth range and how long ago.
On by default, off with unlock_notice = false. Hidden test-notice
subcommand exercises the path without a real lock.
2026-11-05 16:17:19 +01:00
Bastian Mäuser 276e7c5f50 Report target sightings in the log every minute
The event stream was invisible at the default log level: only state
changes were logged, so a healthy or silent beacon feed looked the
same in the journal. Summarize sighting count, last RSSI and state
per minute at INFO — zero updates in a report now exposes a silent
stretch immediately.
2026-11-05 16:10:09 +01:00
Bastian Mäuser 44f3d94d4b Tighten sample timeouts now that the companion app ships
With the beacon app advertising reliably from a foreground service and
rotating its payload, the pause-tolerant 120s missing_after is no longer
needed: 30s/15s restores a ~40s lock after leaving while the 10s connect
probe keeps guarding against silent stretches. Third-party beacon apps
still warrant 120s; the comments now say which tier applies.
2026-11-05 15:19:16 +01:00
Bastian Mäuser 44510411fc Add Android companion beacon app (v1)
Kotlin/Compose foreground service advertising a connectable legacy
advertisement at ~1 Hz with a counter that rotates in ServiceData every
10s: changed payload values make BlueZ emit PropertiesChanged even when
the RSSI repeats, keeping the daemon's freshness clock fed for a
stationary phone. Running from a foreground service with a battery
optimization exemption defeats the advertising pauses that caused the
false locks. Replaces third-party beacon apps; the daemon needs no
changes. Verified with a real Gradle build (AGP 8.13.2, Kotlin 2.3.21,
compileSdk 36).
2026-11-05 15:15:03 +01:00
Bastian Mäuser aef8e2af17 Add AGENTS.md and handoff notes for agents
Distill the session findings (BlueZ RSSI dedupe, beacon pauses, MSRV
pinning, scan-only decision) so future agents and humans don't have to
rediscover them. AGENTS.md carries the rules, docs/HANDOFF.md the
history and open threads.
2026-11-05 15:01:54 +01:00
Bastian Mäuser a5b798dceb Recommend patient timeouts in the sample config
Beacon apps pause advertising while the phone sits still, so the 30s
default for missing_after_secs false-locked. Ship 120s plus comments
explaining the beacon pauses and the 10s pre-lock connect probe;
presence_timeout_secs 30 pairs with the duty escalation.
2026-11-05 14:58:45 +01:00
Bastian Mäuser c25ccde58e Probe for 10s and log its outcome before locking
The phone's beacon app pauses advertising for stretches while in range,
which is what the 3s probe could not bridge. Give the controller a 10s
window to find the phone, and log probe outcomes at INFO/WARN so the
journal explains every lock decision.
2026-11-05 14:57:48 +01:00
Bastian Mäuser 43a79d8a43 Fix false locks: escalate duty when updates stall, probe before locking
BlueZ dedupes identical RSSI values, so a stationary phone can go quiet
in the event stream while in range. At the 2% present duty cycle the
~1Hz beacon was caught less often than presence_timeout, causing
Present/Suspect flapping and locks after 60s of silence with the phone
at -60 dBm.

- Present: step up to the Suspect duty once the last sighting ages past
  half of presence_timeout, without leaving Present
- Lock path: attempt a 3s LE connect to the phone first; success cancels
  the lock and returns to Present, failure locks as before
2026-11-05 14:48:10 +01:00
Bastian Mäuser 426342eb10 Pin Version so all builds on Ubuntu 24.04 or newer 2026-11-05 14:38:49 +01:00
Bastian Mäuser 57a8357dd7 first commit 2026-11-05 14:17:51 +01:00
Bastian Mäuser 2dc85ba948 first commit 2026-11-05 14:15:31 +01:00