fix: v0.10.1 usage ping uses tab presence; CI-safe test
build-deb / Deploy to CT 126 (push) Successful in 12s
build-deb / Lint, test, package (push) Successful in 3m7s
build-deb / Notify on failure (push) Skipped

The usage ping now treats "away" like the needs-you notifier: no DevDesk
tab in view for ~2 minutes. The test sets a presence marker instead of
attaching a tmux client, which never attached in CI. 0.10.0 was never
published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHRLCCdXYm41Qx5kNhehaP
This commit is contained in:
2026-10-12 01:30:18 -04:00
co-authored by Claude Opus 5.5
parent a2edec966a
commit 3a0b099f02
4 changed files with 19 additions and 10 deletions
+4 -5
View File
@@ -1173,12 +1173,11 @@ JSONL
sleep 0.5
[ "$(posts)" -eq 1 ]
[[ "$(jq -r .text "$TMP/posts")" == *"91% of the 5-hour window"* ]]
# next window, but a client is attached: no post, and that window is done
tmux -S "$DEVDESK_SOCKET" new-session -d -s watcher 'sleep 30'
script -qc "tmux -S '$DEVDESK_SOCKET' attach -t =alpha" /dev/null </dev/null >/dev/null 2>&1 &
for _ in $(seq 1 30); do [ -n "$(tmux -S "$DEVDESK_SOCKET" list-clients -F x)" ] && break; sleep 0.1; done
# next window, but a DevDesk tab is in view: no post, and that window is done
mkdir -p "$DEVDESK_PRESENCE_DIR" && touch "$DEVDESK_PRESENCE_DIR/1"
sl 95 2000018000
sleep 1
for _ in $(seq 1 30); do [ "$(cat "$DEVDESK_STATE_DIR/usage-warned")" = 2000018000 ] && break; sleep 0.1; done
sleep 0.5
[ "$(posts)" -eq 1 ]
[ "$(cat "$DEVDESK_STATE_DIR/usage-warned")" = 2000018000 ]
}