Skip to content

Auto-revive a dead or stuck hera_send recipient - #922

Merged
anutron merged 2 commits into
masterfrom
argus/mission-make-hera-send-auto
Aug 3, 2026
Merged

Auto-revive a dead or stuck hera_send recipient#922
anutron merged 2 commits into
masterfrom
argus/mission-make-hera-send-auto

Conversation

@anutron

@anutron anutron commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • hera_send now auto-revives an explicit-to, different recipient before delivering — reusing internal/hera.ReviveRole/s.heraRevive verbatim, the exact same primitive hera_revive already calls. No new gating logic.
  • Soft-fail throughout: a recipient with no live binding (planned/never-spawned/ended role, the common case), a lookup error, a revive error, or heraRevive not being wired (daemon didn't configure a reviver) all skip silently (or Warn-log) and never block the send.
  • On success, the hera_send response gains a - **revive**: <outcome> line (via the existing heraReviveOutcomeMessage) and a matching slog.Info("[hera] revive", ...) log line, so an auto-triggered revive is indistinguishable from a manual hera_revive call.
  • Auto-revive is gated to coordinator callers, an explicit to (never the worker/freelance default-to-coordinator route), and a different role than the caller's own — a worker/freelance default-route send or a coordinator self-send never triggers it.

OpenSpec

Routed through openspec/changes/add-hera-send-auto-revive/ (proposal + design + delta spec against hera-messaging), archived in this same PR to openspec/changes/archive/2026-08-03-add-hera-send-auto-revive/ with the delta folded into openspec/specs/hera-messaging/spec.md.

Test plan

  • New tests in internal/mcp/hera_send_revive_test.go: dead recipient restarted before send; busy/blocked/live-coordinator skip outcomes still deliver; no-live-binding recipient doesn't block send; nil reviver doesn't block send; revive error doesn't block send; worker/freelance default route never triggers; coordinator self-send never triggers.
  • make pre-pr green (build, vet, fmt-check, lint-pr, vuln advisory-only stdlib CVEs confirmed pre-existing/toolchain-only, test-cover-gate 88.8% ≥ 88% floor).
  • openspec validate --all --strict passes (57/57 specs).

🤖 Generated with Claude Code

anutron and others added 2 commits August 2, 2026 17:11
…evive)

A coordinator sending to an explicit, different recipient now revives it
first via the existing hera_revive/ReviveRole primitive, reused verbatim.
Soft-fail throughout: no live binding, a lookup error, a revive error, or
the reviver not being wired all skip silently and never block the send.

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

Co-Authored-By: Claude <noreply@anthropic.com>
…hera-send-auto

# Conflicts:
#	context/knowledge/index.md
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/drn/argus/internal/mcp 87.97% (+0.33%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/drn/argus/internal/mcp/hera.go 82.03% (+1.04%) 718 (+13) 589 (+18) 129 (-5) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/drn/argus/internal/mcp/hera_send_revive_test.go

@anutron
anutron merged commit 8b29433 into master Aug 3, 2026
1 check passed
@anutron
anutron deleted the argus/mission-make-hera-send-auto branch August 3, 2026 01:00
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.

1 participant