Skip to content

Build the exact-version Global Inbox authorization feasibility harness #33

Description

@KazanderDad

Parent Goal: https://github.com/Cubid-Me/cubid-monorepo/issues/47
Depends on: https://github.com/Cubid-Me/cubid-monorepo/issues/46
Blocks: the static-revocation proof Task and final Phase 0 validation Task

Objective

Implement an isolated, non-production, exact-version XMTP harness that creates a disposable inbox and authorizes a distinct partner installation through the recovery-controller candidate approved in the decision pack, with separate keys/databases and no central Cubid/FriendR installation.

Expected Surfaces

  • A dedicated unpublished harness/example such as examples/global-inbox-feasibility/ in Cubid-Me/cubid-sdk, with its own README, pinned dependency manifest, scripts, and ignored local state.
  • Exact XMTP client/signer/gateway packages and lockfile entries selected by https://github.com/Cubid-Me/cubid-monorepo/issues/46.
  • Deterministic unit/integration tests for canonical action validation, one-time grant binding, signer/factor policy, local database separation, state confirmation, and failure cases.
  • Redacted evidence output documenting environment/network, versions, inbox state, installation identity/hash, signer boundary, gateway choice, and inbox-update consumption.
  • Branch-scoped session log required by the SDK repo before commit.

Scope

  • Create a disposable non-production inbox using the approved recovery-controller candidate.
  • Generate partner installation keys locally and initialize a separate local database.
  • Bind authorization to the exact inbox, partner/harness identity, installation, user session/factor, nonce, and expiry where supported.
  • Require the approved independent user/platform factor and demonstrate that Cubid/FriendR service material alone is insufficient.
  • Confirm the resulting installation through observed XMTP state, not only local return values.
  • Record installation count/update consumption and safe identifiers before and after authorization.
  • Cover wrong signer/factor, wrong inbox/installation, expired or replayed grant, duplicate invocation, offline/partial failure, and gateway outage behavior supported by the pinned stack.

Non-Goals

  • No production SDK API, package export, public release, hosted control plane, FriendR app change, browser integration, management UI, billing, or real-user data.
  • No central installation, message proxy, message/graph indexing, or reusable general-purpose signing endpoint.
  • No static revocation in this Task; that is the next child Task.

Guardrails

  • Do not modify cubid-monorepo/packages/core/; public SDK and harness work stays in this repo.
  • Do not commit private keys, recovery shares, database keys, payer credentials, message content, raw graph data, or reusable authorization material.
  • Keep recovery-controller and gateway payer material cryptographically and operationally separate.
  • Use disposable identities and an explicitly non-production XMTP environment.
  • If the approved signer cannot perform the canonical action without unilateral Cubid control, stop and return no-go evidence.

Acceptance Criteria

  • The harness is reproducible from documented commands with exact dependency versions.
  • One disposable inbox and one distinct partner installation exist with separate installation keys and local database state.
  • Authorization requires the approved independent factor; Cubid/FriendR alone cannot complete it.
  • Observed XMTP state matches the requested installation and produces redacted evidence.
  • Duplicate/replay behavior does not silently consume another installation/update.
  • Failure and outage cases do not corrupt local state or create an unapproved replacement installation.
  • Tests and logs prove prohibited secrets/data are not persisted or emitted.

Validation Plan

  • Run the repo's install, lint, typecheck, and test commands plus the dedicated harness command on the pinned non-production network.
  • Repeat authorization from clean local state and from an interrupted/retry state.
  • Inspect local storage boundaries and safe before/after network state.
  • Scan tracked files and captured logs for secrets and prohibited data.
  • Record exact commands/results, commit hash, changed files, network/environment, and safe evidence in the issue comment.

Stop Condition

Stop after the authorization harness, tests, README/evidence, and SDK branch session log are committed on the shared Feature branch and the issue contains implementation evidence. Do not start static revocation or choose the next Task; the orchestrator will run independent validation first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions