Skip to content

Add durable Companion mode group sessions - #73

Open
alex-w-99 wants to merge 6 commits into
mainfrom
feat/skip-webhook-reconcile
Open

alex-w-99 wants to merge 6 commits into
mainfrom
feat/skip-webhook-reconcile

Conversation

@alex-w-99

@alex-w-99 alex-w-99 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Executive Summary

Add durable Companion mode group sessions to the OpenClaw plugin.

  • Load complete paginated conversation history into one native host input.
  • Recover pending work and preserve group reply targets across live messages.
  • Update the plugin to 0.2.15 and pin Inkbox SDK 0.7.3.

Description

The Companion receiver uses persistent account journals and native session overrides for conversation and activation isolation. It feeds the channel runtime after assembling complete context, preserves stored email reply audiences and text conversation identifiers, and pauses uncertain outcomes. The change includes host-boundary and ingress tests, README/changelog updates, and package/CI dependency pins.

The branch now includes main through 19247ca, including the latest voice-driver changes. The existing branch history is preserved, and the comparison against main remains the Companion feature change.

Reason

A group activation needs one complete context input and durable ordering so retries and restarts do not turn partial history into multiple host turns.

Decisions

  • Host input: Use native channel dispatch and a 128 KiB complete-input limit; oversized or incomplete context pauses instead of being truncated.
  • Recovery: Preserve uncertain submissions for reconciliation because host acceptance can precede a lost acknowledgement.
  • Configuration: Installing the plugin leaves identity Companion configuration unchanged.
  • Unreleased SDK in CI: Build public SDK commit 449966c885208d41f995d09c54072e012df9eb1a rather than depend on a registry release that is not yet available; keep the product dependency at 0.7.3.

Testing

  • Current PR CI run passes: Node 22 and 24 unit lanes each report 715 passed, 16 existing minimum-host skips; the latest-host contract lane reports 32 passed. CodeQL also passes.
  • Latest OpenClaw 2026.9.5 required a narrow declaration for its shipped file-lock runtime entry and updated discovery of two relocated contract functions. A new real-host test verifies lock acquisition and release after callback failure on both minimum and latest hosts; the original contract assertions remain exercised.
  • CI now checks out that exact public commit, builds sdk/typescript, packs it, and installs the real tarball through the existing setup wrapper. Only the SDK lock resolution is temporarily changed for installation; the original manifest and lock are restored. Live Python drivers use the matching pinned source.
  • Cold isolated dependency installation and host overlay passed with zero SDK registry requests in HTTP logs. The exact source tarball has computed integrity sha512-4UnymkHdZcG/2bWrMvFXp+oTXhxMlSMK1DGuVntrgHK8YFuDfQ8ZyraFGLwKV3c4sa36IVoHk3mA/Rmpozqtpw==; this differs from the older local artifact recorded in the release lock. No fabricated integrity is used.
  • Against this exact source build: typecheck plus tests/inbound/companion.test.ts and tests/ci-resilience.test.ts passed 41 tests. Manifest and lock restoration were verified byte-for-byte.
  • Post-merge npm run typecheck and npx vitest run tests/inbound/companion.test.ts passed: 38 tests against the local SDK 0.7.3 artifact.
  • Earlier affected Companion/session selection passed 188 tests; typecheck and build passed. An earlier broader selection passed 251 with one existing minimum-host SQLite-validator skip.
  • Shared multi-page fixtures for mail, phone and iMessage used the actual SDK helper: four page reads, one initialization dispatch, preserved authors/attachments/notices. The host API boundary was instrumented against OpenClaw 2026.5.27; external model inference was not run.
  • Isolated packed-plugin upgrade from 0.2.14 to 0.2.15, package imports, and cached npm ci passed using the local SDK artifact before the merge.
  • Group initialization and restart: expect one initializer, ordered live input, preserved group replies and no replay after uncertain acceptance.
  • git diff --check passed after merging main.
  • These are unreleased source-build installation results, not published-registry installation evidence. Live channel/model acceptance remains unverified.

Readiness-triggered CI snapshot (2026-09-20 08:48 UTC)

Readiness-triggered Full stack e2e 35500003487 was still running at inspection. Canary passed, but the mock-channel lane failed email and SMS reachability because delivered replies contained something went wrong (2 failed, 46 passed, 22 skipped). Source SDK installation succeeded in that lane; the runtime failure needs diagnosis. Full PR CI is not yet green.

Release dependencies

This PR is ready for review; newly triggered live CI and channel/model acceptance remain separate checks. SDK 0.7.3 remains unreleased; product manifests and the normal distribution mechanism are unchanged. Before a registry-based release, regenerate or verify the SDK lock against the actual published artifact.

Companion PR stack

These six peer PRs target their own main branches. CI source-build validation does not imply SDK registry publication. The coordinated set is now ready for review; integration and live acceptance are tracked separately.

Earlier CI run 35494867120 failed in both unit jobs and the contract job during npm ci: the SDK 0.7.3 tarball returned 404. Typecheck and tests did not run in those jobs. Draft-gated live jobs were skipped.

Review and release status

Ready for review. SDK/CLI 0.7.3 remains unreleased; SDK PR 190 and public source commit 449966c885208d41f995d09c54072e012df9eb1a are the dependency reference. Current-head unit/contract CI passed; any readiness-triggered live checks require their own completed results. Package publication and full live channel/model acceptance are not claimed.

@alex-w-99
alex-w-99 marked this pull request as ready for review September 20, 2026 08:36
@blacksmith-sh

blacksmith-sh Bot commented Sep 20, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_email_reply/test_email_reachability View Logs
test_sms/test_sms_reachability View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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