Skip to content

feat(cluster-protocol): bootstrap v1 and prove initialize/get #644

Description

@tomdps

Parent

Execution

AFK. This is the first tracer bullet and can start immediately after its body is verified.

What to build

Establish the smallest real Open Engine Cluster Protocol v1 path: a Rust client negotiates openengine.cluster/v1 with a backend-neutral server and reads the canonical empty cluster state. The same behavior must work in process and through NDJSON stdio, proving the wire and backend seams before later graph or lifecycle semantics are added.

The slice introduces the Cargo workspace and the four foundation crates (openengine-cluster-protocol, openengine-cluster-server, openengine-cluster-client, and openengine-cluster-testkit), a pinned Rust toolchain, generated-artifact drift checking, and the async ClusterBackend/client transport boundaries. Only initialize and empty get are functional in this issue; other methods may be typed but must return an explicit unsupported-domain response rather than pretend to work.

JSON-RPC uses named params, rejects batches, keeps stdout protocol-only in stdio mode, and reports diagnostics on stderr. Empty state has spec:null, phase:"empty", no generation/run ID, and atCursor:null.

Acceptance criteria

  • Rust client and server negotiate exactly openengine.cluster/v1; an incompatible version returns UNSUPPORTED_PROTOCOL_VERSION in error.data.code.
  • initialize and get return the same canonical empty status over in-process and NDJSON stdio transports.
  • Batch JSON-RPC, positional params, malformed envelopes, and unknown methods are rejected deterministically with correct JSON-RPC numeric classes.
  • Stdio stdout contains only complete one-line protocol frames; diagnostics go to stderr.
  • Generated JSON Schema/OpenRPC skeletons and golden envelopes are committed and CI fails on drift.
  • The existing npm entrypoint and CLI behavior remain unchanged.
  • Rust format, clippy with warnings denied, workspace tests, existing Node lint/tests, and opcore check --changed pass.
  • Required CI's existing check job runs the Rust gates; Rust is not placed only in an optional side job.
  • AGENTS.md documents the new protocol crate routing and source-of-truth convention; CLAUDE.md is untouched.

Verification

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
npm run lint
npm test
opcore check --changed

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions