Skip to content

Add durable Companion mode group sessions - #39

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

alex-w-99 wants to merge 5 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 OpenCode plugin.

  • Initialize each group activation with one complete history input and ordered live turns.
  • Preserve group reply targets and pending work through the existing durable session manager.
  • Update the plugin to 0.2.15 and pin Inkbox SDK 0.7.3.

Description

The existing turn journal gains hydration and paused states, stable initialization identifiers, ordered reservations and ownership-aware session updates. Email replies retain their stored parent and audience; text replies retain their conversation ID. The change includes SDK-backed pagination, ingress, reply and recovery tests, documentation and dependency updates. The full branch also adds skipWebhookReconcile for pre-provisioned subscriptions, bypassing subscription reconciliation while retaining webhook verification and delivery handling.

The branch now includes main through 878d67a. Merge resolution preserves A2A task updates, hosted-SMS delivery correlation, Companion session ownership and the current CI dependency wrappers. Companion mode advances the current 0.2.14 package to 0.2.15; the existing branch history is preserved. CI dependency overlays now retain SDK 0.7.3 instead of reinstalling 0.5.9 after the lockfile install.

Reason

Group conversations need complete context, fixed replies and recoverable ordered turns without interrupting initialization or replaying uncertain host work.

Decisions

  • Persistence: Extend the native durable turn manager rather than introduce another queue.
  • Host input: Submit one complete initialization text part with a 128 KiB bound and pause uncertain outcomes.
  • Configuration: Installation preserves identity settings and the existing subscription-reconciliation option.
  • 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: 925 unit tests, 24 latest-host contract tests, typecheck/lint/build, and the real packaged-plugin loader smoke check. CodeQL also passes.
  • CI now checks out that exact public commit, builds sdk/typescript, packs it, and installs the real tarball through the existing setup wrapper and INKBOX_SDK_PATH loader/live hooks. Only the SDK lock resolution is temporarily changed for installation; the original manifest and lock are restored.
  • 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, lint, and the 21 Companion durable host-boundary cases in tests/gateway/sessions.test.ts passed. Manifest and lock restoration were verified byte-for-byte.
  • Post-merge isolated checkout: npm ci --ignore-scripts --prefer-offline, npm run typecheck, and npm run lint passed using the cached local SDK 0.7.3 artifact and current locked dependencies.
  • Post-merge npx vitest run tests/gateway/sessions.test.ts tests/gateway/dispatch.test.ts tests/gateway/state.test.ts: 86 passed on Vitest 4.1.11.
  • CI overlay correction: npx vitest run tests/contract/live-harness.test.ts passed all 9 cases.
  • Real SDK pagination fixtures for mail, phone and iMessage each produced four page reads and one instrumented session.promptAsync call with one complete text part. Host SDK/plugin version was 1.17.18; no external model inference was run.
  • Group initialization/restart: expect ordered live turns, canonical group replies and no duplicate initializer. Hosted delivery correlation and A2A state updates remain supported.
  • Earlier isolated packed-plugin upgrade from 0.2.10 to the pre-merge Companion package 0.2.11 passed; this is not a packaged-install claim for 0.2.15.
  • git diff --check passed after resolving merge conflicts.
  • 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 35500004376 remains in progress. Canary/loader, both channel lanes and the three inbound A2A lanes passed at inspection; later lanes still require terminal results. No complete full-stack pass is claimed.

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. Merge conflicts and package-version reconciliation are resolved.

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.

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 and others added 2 commits August 7, 2026 23:37
At boot the gateway points the identity's mailbox, phone number, iMessage, and
A2A events at whatever URL it just came up on. That is the right default when
the gateway owns its ingress, but not when subscriptions are provisioned ahead
of time: there the destination is already fixed, and the API key may not be
permitted to change it, so the write is redundant at best and fatal to boot at
worst.

Default false, so nothing changes unless a deployment opts in. Settable as
gateway.skipWebhookReconcile or INKBOX_SKIP_WEBHOOK_RECONCILE.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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