Skip to content

Cluster DAG writes rejected: 'missing Ed25519 signature' (cluster integration tests fail) #99

Description

@ApiliumDevTeam

Summary

In cluster mode, DAG-action writes are rejected with 500 Internal Server Error — "DagAction rejected: missing Ed25519 signature". The two cluster integration tests fail because of this:

  • cluster_integration_test::test_single_node_cluster_bootstrap
  • cluster_integration_test::test_three_node_cluster_replication

Reproduction

cargo test -p aingle_cortex --features "mcp dag" --test cluster_integration_test
# 1 passed, 2 failed — both with: 500 "DagAction rejected: missing Ed25519 signature"

Expected vs actual

  • Expected: a node started in cluster mode can accept writes that produce signed DAG actions, and the tests pass.
  • Actual: cluster DAG writes are emitted without an Ed25519 signature and are rejected by the DAG validation path.

Root-cause hypothesis

The single-node startup path initializes the Ed25519 DAG signing key (see crates/aingle_cortex/src/main.rs, the #[cfg(feature = "dag")] block that loads/creates node.key and sets the signing key on the state). The cluster initialization path (crates/aingle_cortex/src/cluster_init.rs::init_cluster) does not set dag_signing_key on the AppState, so DAG actions generated on the cluster path are unsigned and then rejected by the signature-required validation.

Likely fix: have init_cluster initialize the DAG signing key the same way the standalone startup does (or share that initialization so both paths set it).

Scope / provenance

Pre-existing — not a regression. This reproduces on the current main base commit 22b45ae (verified by checking out the base and running the same test). It is unrelated to the MCP server work in #98; surfaced during that PR's final verification.

Environment

  • Windows 11, Rust 1.96.0 (MSVC), aingle_cortex features mcp dag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions