Skip to content

[external-events] Migrate SDK runtime bridge to register/ingest flow#141

Merged
jasny merged 9 commits into
feat/ingestfrom
feat/external-events
May 26, 2026
Merged

[external-events] Migrate SDK runtime bridge to register/ingest flow#141
jasny merged 9 commits into
feat/ingestfrom
feat/external-events

Conversation

@jasny
Copy link
Copy Markdown
Contributor

@jasny jasny commented May 23, 2026

Summary

  • Replaced legacy worker ABI dispatch (external_event) with split Host ABI calls: register, ingest, and encode_public_event.
  • Migrated SDK runtime replay in Ownable.service to the split register/ingest replay contexts (register_msg.json and ingest_msg.json).
  • Wired the active app service container to the migrated Ownable and EQTY runtimes.
  • Updated consume flow to build canonical ingest payload (source + eventType + attributes) and replay through rpc.ingest.
  • Added canonical public-event emission flow: encode_public_event through the ownable worker, EQTYService.emitPublicEvent() on Anchor with fee resolution, then local registerPublicEvent() replay/dedupe.
  • Cleaned SDK public-event payload shape to the canonical source/blockNumber/transactionIndex/logIndex/eventType/data fields used by the split register ABI.
  • Removed stale potion Rust test references that still imported/called register_external_event.
  • Replaced Ownables package dependencies with the released 0.6.1 package line.

Canonical Plan

  • /home/arnold/Projects/eqty/.runs/2026-05-23_18-38-53_external-events/plans/ownables-sdk.md

Verification

  • yarn install passed and resolved Ownables packages to 0.6.1
  • yarn typecheck passed after the final ^0.6.1 manifest update
  • yarn build passed with existing Vite chunk-size / dynamic-import warnings
  • yarn ownables:build passed
  • yarn ownables:deploy passed

PR Scope

  • Base: feat/ingest
  • Wallet/mobile app remains out of scope.
  • No temporary local filesystem dependency remains.

Temporary Dependencies

  • None

Upstream Dependency / Version Replacement

  • @ownables/adapter-viem: ^0.5.1 -> ^0.6.1
  • @ownables/builder-client: ^0.5.1 -> ^0.6.1
  • @ownables/core: ^0.5.1 -> ^0.6.1
  • @ownables/platform-browser: ^0.5.1 -> ^0.6.1

Remaining Risks / Follow-up

  • The repo's E2E harness is not accepted as proof in this run because it is currently broken / false-green.
  • Browser proof for the full public-event path is deferred to the separate E2E harness repair goal.

@jasny jasny changed the base branch from main to feat/ingest May 24, 2026 19:16
@jasny
Copy link
Copy Markdown
Contributor Author

jasny commented May 24, 2026

QA follow-up implemented for ownables-sdk Playwright report:

  • Fixed setup failure: yarn ownables:deploy now creates public/ownables before copying zips (mkdir -p ./public/ownables && cp ./ownables/*.zip ./public/ownables/).
  • Investigated reported direct-runtime failures:
    • Unknown event type: "consume" is consistent with current ownable contract behavior when calling public-event encode/register on the wrong ownable/event type (e.g. robot encode/register path rejects event types; consume is for ingest on robot).
    • INVALID_CBOR ... expected bytes is consistent with passing a string payload where register expects binary-bytes payload.
  • Verified local app runtime setup via required flow (yarn ownables:deploy, dev server with VITE_E2E=1 VITE_OWNABLE_EXAMPLES_URL=/ownables) and Playwright MCP checks for local source modules + ownable zip availability.

Verification run:

  • yarn ownables:deploy
  • timeout 60s yarn typecheck
  • yarn build
  • yarn ownables:build

Commit pushed on feat/external-events:

  • 21b4cbc Fix ownables deploy when public directory is missing

@jasny jasny marked this pull request as ready for review May 26, 2026 04:03
@jasny jasny merged commit 854824d into feat/ingest May 26, 2026
@jasny jasny deleted the feat/external-events branch May 26, 2026 04:16
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