Skip to content

fix(channels): report a channel that cannot receive as unhealthy instead of connected - #115229

Merged
steipete merged 6 commits into
mainfrom
worktree-agent-a3d17fe6b5c46611f
Jul 28, 2026
Merged

steipete merged 6 commits into
mainfrom
worktree-agent-a3d17fe6b5c46611f

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #114998, #114970

What Problem This Solves

Resolves a problem where a channel that could not receive a single message still reported itself as connected and healthy.

Channel health was derived from the transport only. On a production gateway that hid 26+ hours of completely dead inbound Slack behind connected, bot:config, app:config, health:healthy. Outbound kept working the whole time, which is exactly what kept the transport looking fine, and across the entire retained log not one inbound event was admitted. openclaw channels status showed nothing wrong, readiness stayed green, and the health monitor never touched the account because it evaluated as healthy.

Slack is the worst case but not a special case: it never publishes lastTransportActivityAt, so evaluateChannelHealth's stale-socket check is skipped for it entirely. Nothing else in the health snapshot described inbound at all.

Why This Change Was Made

Inbound admission is a separate failure domain from transport connectivity, so it gets its own health dimension rather than overloading connected — which is deliberately tri-state since #114970, with 17 of 27 channel plugins relying on "absent" meaning "no transport signal".

The shared ingress monitor now rethrows a typed ChannelIngressUnavailableError when it cannot open its durable queue (#114998 made that failure reach the caller; this makes it classifiable). The channel supervisor records it as ingressUnavailable on the account, and evaluateChannelHealth reports ingress-unavailable.

Deliberate boundaries:

  • Absence stays "unknown", never "fine". The field is ingressUnavailable?: true — there is no false to collapse into a misleading negative, which is the mistake fix(channels): stop restart-looping channels that report no transport connectivity #114970 had to undo for connected. Channels that never report ingress are untouched.
  • No traffic-staleness heuristic. A genuinely quiet channel must never look unhealthy for having received nothing, so time-since-last-event is not used as a signal. There is a regression test pinning this.
  • Recovery stays automatic, and no new restart loop is introduced. An earlier revision of this PR suppressed health-monitor restarts for this reason; review caught that it latches a transient queue-open failure into a permanent outage, because the verdict is only cleared by a later start that would then never happen. The restart path is also the recovery path, so it is left alone — it just now logs reason: ingress-unavailable instead of the generic stuck. The existing isAutoRestartScheduled guard still keeps the supervisor the single restart owner during its backoff ladder.
  • Readiness keeps its documented backoff grace, extended to the ingress reason in readiness.ts where that policy already lives, so a retrying channel does not flap readiness. Once the ladder stops setting restartPending, the account stays red rather than hiding dead inbound.

Non-goals: no config surface, no protocol change (the account snapshot schema is intentionally schema-light and additionalProperties: true), no channel-subsystem refactor.

User Impact

Operators can now see, and be alerted to, a channel that is silently unable to receive:

  • openclaw channels status reports Channel cannot admit inbound events; its durable ingress queue is unavailable. Outbound may still work.
  • The account is unhealthy instead of healthy, and gateway readiness reports it as failing once it stops retrying.
  • Health-monitor restarts for this cause name it (health-monitor: restarting (reason: ingress-unavailable)), so a repeating restart is readable as dead inbound rather than an anonymous crash.

Channels that do not report ingress state, and quiet channels with no traffic, behave exactly as before.

Evidence

Focused tests and the changed gate, on Blacksmith Testbox (this worktree has no usable local node_modules):

pnpm test src/gateway/channel-health-policy.test.ts \
          src/gateway/channel-health-monitor.test.ts \
          src/gateway/server-channels.test.ts \
          src/channels/message/ingress-monitor.test.ts \
          src/infra/channels-status-issues.test.ts \
          src/gateway/server/readiness.test.ts
CI=1 pnpm check:changed

New regression coverage, per the two behaviors that matter most:

  • channel-health-policy.test.ts — a channel with a live transport and dead ingress is unhealthy; a quiet channel with no traffic and no ingress signal stays healthy; socketless channels publishing no connectivity are untouched; the ingress reason survives the stopped state a failed start actually lands in.
  • server-channels.test.ts — the supervisor records the verdict from a typed start failure, and clears it on the next start so a repaired failure does not stay latched.
  • readiness.test.ts — green during restart backoff, red once retries stop, red for a running-but-dead-ingress account.
  • ingress-monitor.test.ts — start() throws the typed error with the original denial as cause, and the guard still matches when a plugin wraps it.

At the current head the six suites report 203 tests passed across 6 files, and check:changed is green (conflict markers, env ratchet, max-lines ratchet, changelog attributions, wildcard re-exports, duplicate scan coverage, dependency pin, format). A targeted -t ingress run confirmed the new tests actually execute rather than filtering to a zero-test pass.

Codex autoreview (gpt-5.6-sol, high) ran to clean. Two of its findings materially changed the design and are described under "Why This Change Was Made".

Unrelated CI failure, resolved by rebase

An earlier head hit checks-node-compact-large-4 failing on three ui/src/pages/config/config-page.test.ts redirect assertions, which this PR does not touch. Root cause was a cross-file state leak: ui/src/pages/agents/panels-tools-skills.browser.test.ts clicks a real <a href="#agent-tool-read"> and never restored location.hash, and shards run with isolate=false, so whichever sibling file asserted on the hash next failed depending on shard packing. #115221 landed a file-wide afterEach URL reset that fixes it at the polluter, so this branch simply rebases onto it and carries no UI change.

Known gap, filed separately

extensions/nostr/src/nostr-ingress.ts:187-194 swallows its own ingress start failure into options.onError instead of letting it propagate, so nostr is the one channel of 21 that will still report healthy with dead inbound. Every other durable-ingress channel propagates. Fixing it is a plugin-owner behavior change and is tracked separately, along with a resource leak this work surfaced: extensions/slack/src/monitor/provider.ts:578 arms ingress outside the try that owns teardown, so a throwing ingress start leaks the Bolt app, HTTP handler and undici dispatcher (extensions/feishu/src/monitor.account.ts:564 has the same shape).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 14:04
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jul 28, 2026
@steipete
steipete force-pushed the worktree-agent-a3d17fe6b5c46611f branch from 5bd0ed9 to 1943505 Compare July 28, 2026 15:27
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Jul 28, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 11:53 AM ET / 15:53 UTC.

ClawSweeper review

What this changes

The PR adds an inbound-ingress failure signal so channel status, readiness, and automatic recovery treat a channel that cannot admit messages as unhealthy even when its transport is connected.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 6 items remain

Keep open: the health-model approach is sound, but the new docs promise coverage that the PR itself says Nostr does not provide, and the branch still lacks after-fix real runtime proof.

Priority: P1
Reviewed head: f3b987163996d82d573d4cb52e3ed85085aec643
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation has focused coverage, but a concrete documentation mismatch and missing after-fix runtime proof keep it below merge-ready confidence.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR provides focused automated tests and CI results plus pre-fix production context, but no after-fix real runtime transcript showing the changed status, readiness, and recovery behavior; add redacted live output or logs before merge and update the PR body for re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR provides focused automated tests and CI results plus pre-fix production context, but no after-fix real runtime transcript showing the changed status, readiness, and recovery behavior; add redacted live output or logs before merge and update the PR body for re-review.
Evidence reviewed 4 items Typed ingress failure reaches the health boundary: The PR adds a typed queue-open failure, records only a proven unavailable ingress state on the account snapshot, and evaluates that state as unhealthy before ordinary lifecycle checks.
The documented behavior has a known integration exception: The PR body states that the Nostr ingress implementation catches its queue-start failure instead of propagating it, so that channel can still report healthy despite dead inbound; the new generic documentation does not state this limitation.
Health affects both operator reporting and recovery: The changed policy turns ingress-unavailable into a restart reason, while readiness grants only the existing stopped-account restart handoff grace; this is a message-delivery and availability-sensitive change.
Findings 1 actionable finding [P2] Scope the ingress-health documentation to reporting channels
Security None None.

How this fits together

Channel plugins start durable ingress monitors that admit inbound events into queues. The gateway supervisor converts runtime outcomes into account snapshots, which health policy, readiness, status, and the restart monitor use to inform operators and recovery behavior.

flowchart LR
  A[Channel plugin startup] --> B[Durable ingress monitor]
  B --> C{Queue opens?}
  C -->|No| D[Gateway account snapshot]
  C -->|Yes| E[Inbound event admission]
  D --> F[Health and readiness evaluation]
  F --> G[Status output]
  F --> H[Automatic restart path]
Loading

Decision needed

Question Recommendation
Should this PR land with the Nostr ingress exception explicitly documented and tracked separately, or should the exception be fixed before the generic health claim is merged? Scope and prove the current change: Update the health documentation to state that only integrations which propagate ingress startup failures receive this signal, then provide redacted real runtime proof.

Why: The branch intentionally leaves one durable-ingress channel unable to emit the new health signal, while the new public documentation describes the behavior without that boundary.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR provides focused automated tests and CI results plus pre-fix production context, but no after-fix real runtime transcript showing the changed status, readiness, and recovery behavior; add redacted live output or logs before merge and update the PR body for re-review.
  • Scope the ingress-health documentation to reporting channels (P2) - The new docs say a channel whose durable ingress queue cannot open is recorded as unable to receive, but this PR’s body identifies Nostr as a current counterexample because it catches that failure and continues. Either fix that propagation in this PR or describe the present supported coverage so Nostr operators are not told that a healthy status proves inbound admission.
  • Resolve merge risk (P1) - A Nostr queue-open failure is still swallowed, so the new generic documentation can lead operators to trust a healthy status that does not detect that channel’s dead inbound path.
  • Resolve merge risk (P1) - Ingress-unavailable now changes readiness and triggers restart behavior; automated tests cover the modeled cases, but the PR has no redacted after-fix runtime trace showing status, readiness, and recovery on an actual channel setup.
  • Complete next step (P2) - A protected maintainer-labeled PR needs human review of the documented Nostr coverage gap and contributor-supplied real behavior proof before merge.

Findings

  • [P2] Scope the ingress-health documentation to reporting channels — docs/gateway/health.md:49
Agent review details

Security

None.

PR surface

Source +105, Tests +283, Docs +11. Total +399 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 8 111 6 +105
Tests 6 285 2 +283
Docs 2 11 0 +11
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 407 8 +399

Review metrics

Metric Value Why it matters
Health decision surfaces 1 account field, 1 health reason, 1 restart reason These values now feed operator status, readiness, and restart decisions, so a real runtime proof should cover their combined behavior.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/infra/channels-status-issues.test.ts, migration/backfill/repair: src/infra/channels-status-issues.ts, vector/embedding metadata: src/gateway/channel-health-policy.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Document the supported coverage and add runtime proof (recommended)
    State the current Nostr exception in the operator docs and attach a redacted after-fix status/readiness/recovery transcript before merge.
  2. Expand the fix to Nostr first
    Propagate Nostr ingress-start failure through the same typed path and prove it before making the generic documentation claim.
  3. Accept the known coverage gap
    Land only if maintainers explicitly accept that one durable-ingress integration remains invisible to this health signal and the docs are narrowed accordingly.

Technical review

Best possible solution:

Scope the documentation to integrations that propagate durable-ingress startup failures (or include the Nostr owner fix), then add a redacted after-fix runtime transcript that demonstrates the unhealthy status, readiness transition, and successful recovery path.

Do we have a high-confidence way to reproduce the issue?

No high-confidence independent current-head reproduction is included. The source path and production report identify the failure mode, but the submitted evidence is focused tests and CI rather than an after-fix real channel runtime run.

Is this the best way to solve the issue?

Unclear. Separating inbound admission from transport connectivity is the right boundary, but the public claim must match the Nostr exception and the integrated runtime behavior still needs proof.

Full review comments:

  • [P2] Scope the ingress-health documentation to reporting channels — docs/gateway/health.md:49
    The new docs say a channel whose durable ingress queue cannot open is recorded as unable to receive, but this PR’s body identifies Nostr as a current counterexample because it catches that failure and continues. Either fix that propagation in this PR or describe the present supported coverage so Nostr operators are not told that a healthy status proves inbound admission.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.84

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bb06e0fbcc13.

Labels

Label justifications:

  • P1: A channel can silently fail to receive inbound messages while outward transport remains usable, affecting a real channel workflow.
  • merge-risk: 🚨 message-delivery: The new ingress classification determines whether an account with dead inbound is surfaced and restarted.
  • merge-risk: 🚨 availability: The same classification changes readiness failure and automatic restart behavior for channel accounts.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides focused automated tests and CI results plus pre-fix production context, but no after-fix real runtime transcript showing the changed status, readiness, and recovery behavior; add redacted live output or logs before merge and update the PR body for re-review.

Evidence

What I checked:

  • Typed ingress failure reaches the health boundary: The PR adds a typed queue-open failure, records only a proven unavailable ingress state on the account snapshot, and evaluates that state as unhealthy before ordinary lifecycle checks. (src/channels/message/ingress-monitor.ts:604, f3b987163996)
  • The documented behavior has a known integration exception: The PR body states that the Nostr ingress implementation catches its queue-start failure instead of propagating it, so that channel can still report healthy despite dead inbound; the new generic documentation does not state this limitation. Public docs: docs/gateway/health.md. (docs/gateway/health.md:49, f3b987163996)
  • Health affects both operator reporting and recovery: The changed policy turns ingress-unavailable into a restart reason, while readiness grants only the existing stopped-account restart handoff grace; this is a message-delivery and availability-sensitive change. (src/gateway/channel-health-policy.ts:75, f3b987163996)
  • Related merged history establishes the surrounding contract: Merged related work preserved absent transport connectivity as unknown and made durable-ingress queue failure reach channel startup; this PR builds the separate health classification on top of those two boundaries. (src/gateway/server-channels.ts:810, ca2681313b89)

Likely related people:

  • steipete: Authored the merged transport-tristate and durable-ingress startup fixes that establish the behavior this PR extends, and authored this channel-health follow-up. (role: recent area contributor; confidence: high; commits: 30fda068aa54, ca2681313b89; files: src/gateway/server-channels.ts, src/channels/message/ingress-monitor.ts, src/gateway/channel-health-policy.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Narrow the generic documentation or include the Nostr propagation repair.
  • Attach a redacted after-fix runtime transcript covering channel status, readiness, and restart recovery.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-28T15:34:13.207Z sha 1943505e34155f910f7c48f6d10775cee6936990 :: needs real behavior proof before merge. :: none

steipete added 6 commits July 28, 2026 08:48
…the transport

`connected` is a transport signal, so a channel holding a healthy socket while its
durable ingress queue is unavailable evaluated as `health: healthy` and admitted
nothing. On a production gateway that hid 26+ hours of completely dead inbound Slack
behind `connected, bot:config, app:config, health:healthy`; outbound kept working,
which is what kept the transport looking fine.

Add inbound admission as its own health dimension rather than overloading `connected`
(deliberately tri-state since 30fda06, and 17 of 27 channel plugins depend on
absent meaning "no transport signal"). The shared ingress monitor now rethrows a
typed ChannelIngressUnavailableError when it cannot open its durable queue, the
channel supervisor records that as `ingressUnavailable` on the account, and
`evaluateChannelHealth` reports `ingress-unavailable` ahead of every lifecycle
window. Absence stays "unknown", never "fine", so socketless and simply quiet
channels are untouched; no traffic-staleness heuristic is introduced.

The health monitor deliberately does not restart such an account. A denied or
unusable ingress queue is a capability/config failure that a restart cannot fix, and
the channel's own bounded backoff ladder already tried. Today that case instead loops
at the 10-restarts-per-hour cap forever, so this removes a restart treadmill rather
than adding one.
The health-monitor skip latched a transient queue-open failure into a permanent
inbound outage: ingressUnavailable is only cleared by a later start, and skipping
the restart meant that start never happened. Report the dimension and name the
restart reason instead of suppressing recovery.
Shadowing not-running would have made readiness flap during the supervisor's
documented restart-backoff grace. The blind spot the dimension exists for is a
running channel with a live transport and dead inbound, so evaluate it there and
leave stopped accounts on their lifecycle reason. Also applies oxfmt.
…koff grace

Two review cycles pulled in opposite directions on the same bounded window: the
health policy must keep the ingress cause in the not-running state a failed start
actually lands in, while readiness must not flap during restart backoff. Put each
in its owner -- the policy states the truth, and readiness extends its existing
restart-handoff grace to the ingress reason. Once the ladder stops setting
restartPending, the account stays red instead of hiding dead inbound.
The new health.md section needs docs/docs_map.md regenerated, and knip flagged
CHANNEL_INGRESS_UNAVAILABLE_CODE as an unused production export -- it only has
callers inside its own module.
@steipete
steipete force-pushed the worktree-agent-a3d17fe6b5c46611f branch from 1943505 to f3b9871 Compare July 28, 2026 15:48
@steipete
steipete merged commit 58a3051 into main Jul 28, 2026
119 checks passed
@steipete
steipete deleted the worktree-agent-a3d17fe6b5c46611f branch July 28, 2026 16:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 28, 2026
…etwork-none

* origin/main:
  fix(macos): signed rebuild no longer stalls on app shutdown (#103957)
  fix(agents): prevent repeated Code Mode output across waits (#115213)
  refactor(ui): split Profile (identity) from Usage (statistics) (#115245)
  fix(channels): report a channel that cannot receive as unhealthy instead of connected (#115229)
  fix(cli): reject malformed infer model refs (#115225)
  feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (#115264)
  test(migrations): avoid mtime precision in checkpoint fixture (#115269)
  test(signal): verify archive limits without malformed tar (#115270)
  test(ui): reset config route hash between cases
  fix(talk): remove unsupported Codex OAuth realtime
vincentkoc added a commit that referenced this pull request Jul 28, 2026
…-20260728

* origin/main:
  fix(macos): signed rebuild no longer stalls on app shutdown (#103957)
  fix(agents): prevent repeated Code Mode output across waits (#115213)
  refactor(ui): split Profile (identity) from Usage (statistics) (#115245)
  fix(channels): report a channel that cannot receive as unhealthy instead of connected (#115229)
  fix(cli): reject malformed infer model refs (#115225)
  feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (#115264)
  test(migrations): avoid mtime precision in checkpoint fixture (#115269)
  test(signal): verify archive limits without malformed tar (#115270)
  test(ui): reset config route hash between cases
  fix(talk): remove unsupported Codex OAuth realtime
vincentkoc added a commit to LZY3538/openclaw that referenced this pull request Jul 28, 2026
* origin/main: (199 commits)
  refactor(workboard): tidy Control UI card execution helpers (openclaw#115195)
  perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281)
  fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232)
  fix: restore Fish completion after global CLI options (openclaw#115222)
  refactor(agents): collapse the client-tool catalog branch (openclaw#115212)
  fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957)
  fix(agents): prevent repeated Code Mode output across waits (openclaw#115213)
  refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245)
  fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229)
  fix(cli): reject malformed infer model refs (openclaw#115225)
  feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (openclaw#115264)
  test(migrations): avoid mtime precision in checkpoint fixture (openclaw#115269)
  test(signal): verify archive limits without malformed tar (openclaw#115270)
  refactor(sessions): isolate legacy transcript fixtures (openclaw#115231)
  fix(discord): clear pending launch watchdog (openclaw#115100)
  fix(agents): stop quadratic subagent prompt rendering (openclaw#115263)
  fix(memory-core): recover dreaming cron reconciliation (openclaw#115174)
  fix(qa-lab): filter incompatible channel scenarios (openclaw#115087)
  fix(android): respect locale in compact labels
  test(i18n): prove iOS discovery catalog ownership
  ...
vincentkoc added a commit to christian-lallo/openclaw that referenced this pull request Jul 28, 2026
* origin/main: (62 commits)
  feat(macos): enable Computer Control by default and diagnose stale Accessibility grants (openclaw#115280)
  fix(qa): restore full-stack scenarios and truthful suite exits (openclaw#115290)
  feat(memory): backfill past sessions from Control UI (openclaw#115266)
  docs: link macOS onboarding pages to app download (openclaw#111361)
  feat(skills): shared authoring standards make learned skills routable (openclaw#115103)
  fix(matrix): suppress previews for modifying hooks
  fix: prevent node gateway hangs and runaway local inference (openclaw#115248)
  refactor(ui): adopt @lit/task across remaining page surfaces (openclaw#115274)
  fix(slack): cap chat.update edit text at the 4000-char limit, not the 8000 send limit (openclaw#115027)
  [AI-assisted] docs: recommend Node 26 in quickstart, landing, and platform install docs (openclaw#115064)
  refactor(workboard): tidy Control UI card execution helpers (openclaw#115195)
  perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281)
  fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232)
  fix: restore Fish completion after global CLI options (openclaw#115222)
  refactor(agents): collapse the client-tool catalog branch (openclaw#115212)
  fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957)
  fix(agents): prevent repeated Code Mode output across waits (openclaw#115213)
  refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245)
  fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229)
  fix(cli): reject malformed infer model refs (openclaw#115225)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…ead of connected (openclaw#115229)

* fix(channels): make channel health reflect inbound ingress, not just the transport

`connected` is a transport signal, so a channel holding a healthy socket while its
durable ingress queue is unavailable evaluated as `health: healthy` and admitted
nothing. On a production gateway that hid 26+ hours of completely dead inbound Slack
behind `connected, bot:config, app:config, health:healthy`; outbound kept working,
which is what kept the transport looking fine.

Add inbound admission as its own health dimension rather than overloading `connected`
(deliberately tri-state since 937bcfd, and 17 of 27 channel plugins depend on
absent meaning "no transport signal"). The shared ingress monitor now rethrows a
typed ChannelIngressUnavailableError when it cannot open its durable queue, the
channel supervisor records that as `ingressUnavailable` on the account, and
`evaluateChannelHealth` reports `ingress-unavailable` ahead of every lifecycle
window. Absence stays "unknown", never "fine", so socketless and simply quiet
channels are untouched; no traffic-staleness heuristic is introduced.

The health monitor deliberately does not restart such an account. A denied or
unusable ingress queue is a capability/config failure that a restart cannot fix, and
the channel's own bounded backoff ladder already tried. Today that case instead loops
at the 10-restarts-per-hour cap forever, so this removes a restart treadmill rather
than adding one.

* fix(channels): keep automatic recovery for a dead-ingress account

The health-monitor skip latched a transient queue-open failure into a permanent
inbound outage: ingressUnavailable is only cleared by a later start, and skipping
the restart meant that start never happened. Report the dimension and name the
restart reason instead of suppressing recovery.

* fix(channels): scope the ingress dimension to running accounts

Shadowing not-running would have made readiness flap during the supervisor's
documented restart-backoff grace. The blind spot the dimension exists for is a
running channel with a live transport and dead inbound, so evaluate it there and
leave stopped accounts on their lifecycle reason. Also applies oxfmt.

* fix(channels): keep the ingress reason and give readiness its own backoff grace

Two review cycles pulled in opposite directions on the same bounded window: the
health policy must keep the ingress cause in the not-running state a failed start
actually lands in, while readiness must not flap during restart backoff. Put each
in its owner -- the policy states the truth, and readiness extends its existing
restart-handoff grace to the ingress reason. Once the ladder stops setting
restartPending, the account stays red instead of hiding dead inbound.

* style: reshape the readiness backoff predicate for oxfmt

* fix(ci): regenerate the docs map and drop an unused ingress export

The new health.md section needs docs/docs_map.md regenerated, and knip flagged
CHANNEL_INGRESS_UNAVAILABLE_CODE as an unused production export -- it only has
callers inside its own module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant