Skip to content

refactor(channels): share durable ingress monitor - #111186

Merged
steipete merged 6 commits into
mainfrom
claude/ingress-monitor-b2
Jul 19, 2026
Merged

steipete merged 6 commits into
mainfrom
claude/ingress-monitor-b2

Conversation

@steipete

@steipete steipete commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Signal, Slack, Discord, iMessage, Twitch, and Tlon each carried local copies of the durable ingress admission, claim, retry, pruning, and shutdown machinery. Keeping those copies aligned made correctness fixes easy to miss across channels and left transport-specific behavior mixed into shared queue lifecycle code.

Why This Change Was Made

This maintainer-requested batch migrates the shared lifecycle idioms onto createChannelIngressMonitor while retaining each channel's payload codec, delivery policy, retry classification, retention, and transport acknowledgement behavior. Signal keeps its debounce fan-out, and Twitch keeps its deferred-claim ownership and composed shutdown signal because those lifecycles are channel-specific; Slack's post-append acknowledgement ordering is protected by the shared admission/claim lock.

AI-assisted implementation; I reviewed the complete diff and understand the resulting ownership boundaries.

User Impact

There is no intended user-visible behavior change. Durable ingress behavior is now implemented through one tested monitor path, reducing drift across these six channels while preserving their existing delivery and shutdown semantics.

Evidence

  • Post-rebase focused matrix: 10 test files across 6 Vitest shards, 244 tests passed.
  • pnpm deadcode:exports: production, full-tree, and scripts scans passed with 0 entries.
  • pnpm deadcode:unused-files: production and full-tree scans passed with 0 entries.
  • Changed-files formatting gate passed; git diff --check passed.
  • First exact-head CI lint findings were corrected; affected shared-helper and Twitch suites passed 15 tests.
  • Final corrected branch autoreview: clean, no accepted/actionable findings (0.84 confidence).
  • Diff: 13 files, 932 insertions, 1,032 deletions (net -100 lines).

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: slack Channel integration: slack channel: tlon Channel integration: tlon channel: twitch Channel integration: twitch size: XL maintainer Maintainer-authored PR labels Jul 19, 2026
@steipete steipete self-assigned this Jul 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b020ad14b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +271 to +274
onDurableAdmission: async (raw) => {
if (raw.kind === "events-api") {
await raw.afterDurableAdmission?.();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Slack acknowledgements from blocking unrelated admissions

When concurrent Slack events arrive and one ack() is slow or never resolves, awaiting it here holds the monitor-wide admission/claim lock; src/channels/message/ingress-monitor.ts:418 also chains every later admission through the same admissionTail. Consequently, unrelated events cannot even be durably enqueued or acknowledged, the drain cannot claim ready rows, and stop() waits indefinitely on that acknowledgement. The previous Slack path awaited each event's acknowledgement independently, so preserve the per-row append-before-dispatch ordering without putting the external acknowledgement inside the global admission critical section.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the claude/ingress-monitor-b2 branch from 4b020ad to b59aba9 Compare July 19, 2026 04:27
@steipete
steipete merged commit 938e3d5 into main Jul 19, 2026
123 checks passed
@steipete
steipete deleted the claude/ingress-monitor-b2 branch July 19, 2026 04:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 19, 2026
* refactor(signal): share durable ingress monitor

* refactor(slack): share durable ingress monitor

* refactor(discord): share durable ingress monitor

* refactor(imessage): share durable ingress monitor

* refactor(twitch): share durable ingress monitor

* refactor(tlon): share durable ingress monitor
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* refactor(signal): share durable ingress monitor

* refactor(slack): share durable ingress monitor

* refactor(discord): share durable ingress monitor

* refactor(imessage): share durable ingress monitor

* refactor(twitch): share durable ingress monitor

* refactor(tlon): share durable ingress monitor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: signal Channel integration: signal channel: slack Channel integration: slack channel: tlon Channel integration: tlon channel: twitch Channel integration: twitch maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant