Scale-to-zero: idle detection and dormant quiesce #824

Closed
opened 2026-10-27 13:37:54 +00:00 by sam · 0 comments
Owner

Scale-to-zero idle detection:

  1. Idle predicate: running_agent_count == 0 AND seconds_since_last_inbound > idle_timeout AND no live background work.
  2. Dormant transition: Signal relay transport to close socket (supervisor preserved).
  3. Wake trigger: Inbound message on wake URL resumes gateway.
  4. Structural precondition: Only arms when messaging is relay-only or absent AND a wake URL is registered.

Ref: docs/prds/hermes-gap-analysis.md section 6 (scale_to_zero.py)

Acceptance Criteria

When no messages arrive for the configured idle timeout (with no active agents), the gateway transitions to dormant. An inbound message wakes it.

Notes

docs/prds/hermes-gap-analysis.md (referenced above) was intentionally deleted in commit 65aa5b4 ('chore: cleanup', 2026-07-28) after it had already spawned this and ~14 sibling beads issues from its 60 identified gaps — it is not a broken link to restore. This issue's description is the surviving record of its slice of that analysis.
Maintainer 2026-09-22: meaning unclear on review; investigated. The deleted source doc carries this as TWO WORDS in a parity table only - 'scale-to-zero idle detection' (:141) and '| Scale-to-zero | None | P3 |' (:148) - with no specification anywhere. The detailed spec in this bead's description is therefore unattributable. It also presupposes a relay transport with a socket to close and a wake URL to resume from; archie polls Telegram and serves a local UI, so it has neither. Recommendation: close as not-applicable, keeping this provenance so the checkbox is not re-inflated.

Close reason

Not applicable (maintainer 2026-09-22). The deleted source doc carries this as two words only - "scale-to-zero idle detection" (hermes-gap-analysis.md:141) and "| Scale-to-zero | None | P3 |" (:148) - with no specification anywhere, so the detailed spec in this bead was unattributable. It also presupposes a relay transport with a socket to close and a wake URL to resume from; archie polls Telegram and serves a local UI, so it has neither. Closed as not-applicable rather than as done, so the parity checkbox is not re-inflated by a later reader.


Imported from beads archie-core-1786637497472-292-8bddcc8f · GitHub #313 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-21

Scale-to-zero idle detection: 1. **Idle predicate**: running_agent_count == 0 AND seconds_since_last_inbound > idle_timeout AND no live background work. 2. **Dormant transition**: Signal relay transport to close socket (supervisor preserved). 3. **Wake trigger**: Inbound message on wake URL resumes gateway. 4. **Structural precondition**: Only arms when messaging is relay-only or absent AND a wake URL is registered. Ref: docs/prds/hermes-gap-analysis.md section 6 (scale_to_zero.py) ### Acceptance Criteria When no messages arrive for the configured idle timeout (with no active agents), the gateway transitions to dormant. An inbound message wakes it. ### Notes docs/prds/hermes-gap-analysis.md (referenced above) was intentionally deleted in commit 65aa5b4 ('chore: cleanup', 2026-07-28) after it had already spawned this and ~14 sibling beads issues from its 60 identified gaps — it is not a broken link to restore. This issue's description is the surviving record of its slice of that analysis. Maintainer 2026-09-22: meaning unclear on review; investigated. The deleted source doc carries this as TWO WORDS in a parity table only - 'scale-to-zero idle detection' (:141) and '| Scale-to-zero | None | P3 |' (:148) - with no specification anywhere. The detailed spec in this bead's description is therefore unattributable. It also presupposes a relay transport with a socket to close and a wake URL to resume from; archie polls Telegram and serves a local UI, so it has neither. Recommendation: close as not-applicable, keeping this provenance so the checkbox is not re-inflated. ### Close reason Not applicable (maintainer 2026-09-22). The deleted source doc carries this as two words only - "scale-to-zero idle detection" (hermes-gap-analysis.md:141) and "| Scale-to-zero | None | P3 |" (:148) - with no specification anywhere, so the detailed spec in this bead was unattributable. It also presupposes a relay transport with a socket to close and a wake URL to resume from; archie polls Telegram and serves a local UI, so it has neither. Closed as not-applicable rather than as done, so the parity checkbox is not re-inflated by a later reader. --- _Imported from beads `archie-core-1786637497472-292-8bddcc8f` · GitHub #313 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-21_
sam added the mediumfeature labels 2026-10-27 13:37:54 +00:00
sam self-assigned this 2026-10-27 13:37:54 +00:00
sam closed this issue 2026-10-27 13:37:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#824