Test and switch to pool

Start with deterministic local tests, then change only assignment policy from one pinned node to an eligible pool.

In-memory transport

InMemoryWrapperNodeTransport records ordered calls and completions. Provide one pinned item, run the client, and assert the call sequence and structured result.

import {
  InMemoryWrapperNodeTransport,
  TabWorkerNodeClient,
} from "@tabworker/sdk";

const transport = new InMemoryWrapperNodeTransport({ pinnedWork });
const node = new TabWorkerNodeClient({ descriptor, transport });

// Run the lifecycle, then inspect transport.calls and transport.completions.

Minimum adapter cases

Switch assignment policy

The executor and message lifecycle do not change. Remove pinnedNodeId from eligible jobs and construct the brain with assignmentMode: "pool". The runtime matches capability and available concurrency.

import {
  BrainRuntime,
  InMemoryBrainDurableState,
  type BrainWireTransport,
  type WrapperJobAdapter,
} from "@tabworker/sdk";

export function createPoolBrain(
  jobs: WrapperJobAdapter,
  wire: BrainWireTransport,
) {
  return new BrainRuntime(
    new InMemoryBrainDurableState(),
    jobs,
    wire,
    { assignmentMode: "pool" },
  );
}

Staging check

Use a fresh test application, one-time pairing reference, dedicated node ID, and zero-reward work. Verify pairing has a single winner, replay returns the original result, cross-tenant access is hidden, participant-less completion creates no earning, cancellation/revoke stop execution, reconnect resumes the same claim, and live-effect flags remain false.

Documentation checks

This site build validates local links and anchors, compiles the shared snippets against the SDK source, inventories every public file, and scans the output for private paths, commit-like identifiers, credential shapes, and private-key material.