6 Commits

Author SHA1 Message Date
Daniel Sauer
6a22b47ef6 fix(await-signal): update agent last_activity on signal received (#774)
When await-signal detects activity, call `bd agent heartbeat` to update
the agent's last_activity timestamp. This enables witnesses to accurately
detect agent liveness and prevents false "agent unresponsive" alerts.

Previously, await-signal only managed the idle:N label but never updated
last_activity, causing it to remain NULL for all agents.

Fixes #773
2026-01-20 14:10:26 -08:00
mayor
9cd2696abe chore: Bump version to 0.4.0
Some checks failed
Release / goreleaser (push) Failing after 5m20s
Release / publish-npm (push) Has been skipped
Release / update-homebrew (push) Has been skipped
Key fix: Orphan cleanup now skips Claude processes in valid Gas Town
tmux sessions (gt-*/hq-*), preventing false kills of witnesses,
refineries, and deacon during startup.

Updated all component versions:
- gt CLI: 0.3.1 → 0.4.0
- npm package: 0.3.0 → 0.4.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 12:46:49 -08:00
gastown/crew/jack
3f724336f4 feat(patrol): add backoff test formula and fix await-signal
Add mol-backoff-test formula for integration testing exponential backoff
with short intervals (2s base, 10s max) to observe multiple cycles quickly.

Fix await-signal to use --since 1s when subscribing to activity feed.
Without this, historical events would immediately wake the signal,
preventing proper timeout and backoff behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 04:45:35 -08:00
max
1b69576573 fix: Address golangci-lint errors (errcheck, gosec) (#76)
Apply PR #76 from dannomayernotabot:

- Add golangci exclusions for internal package false positives
- Tighten file permissions (0644 -> 0600) for sensitive files
- Add ReadHeaderTimeout to HTTP server (slowloris prevention)
- Explicit error ignoring with _ = for intentional cases
- Add //nolint comments with justifications
- Spelling: cancelled -> canceled (US locale)

Co-Authored-By: dannomayernotabot <noreply@github.com>

🤖 Generated with Claude Code
2026-01-03 16:11:55 -08:00
gastown/polecats/nux
a6ae2c6116 feat(backoff): Add gt agent state command and await-signal idle tracking
Layer 1: Implements gt agent state command for managing agent bead labels:
- gt agent state <bead> - Get all state labels
- gt agent state <bead> --set idle=0 - Set label value
- gt agent state <bead> --incr idle - Increment numeric label
- gt agent state <bead> --del idle - Delete label

Layer 2: Fixes await-signal iteration tracking:
- Adds --agent-bead flag to read/write idle:N label
- Implements exponential backoff: base * mult^idle_cycles
- Auto-increments idle counter on timeout
- Returns idle_cycles in result for caller to reset on signal

This enables patrol agents to back off during quiet periods while staying
responsive to signals. Part of epic gt-srm3y.

(gt-srm3y)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:58:56 -08:00
Steve Yegge
8a46d80fb8 Add await-signal command for patrol agent feed subscription (gt-vdprb.1)
Implements the primary wake mechanism for patrol agents:
- Subscribes to bd activity --follow as a background process
- Returns immediately when any line of output is received
- Timeout with optional exponential backoff as safety net
- JSON output mode for scripting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 22:02:45 -08:00