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.
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_bootstrapcluster_integration_test::test_three_node_cluster_replicationReproduction
Expected vs actual
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/createsnode.keyand sets the signing key on the state). The cluster initialization path (crates/aingle_cortex/src/cluster_init.rs::init_cluster) does not setdag_signing_keyon theAppState, so DAG actions generated on the cluster path are unsigned and then rejected by the signature-required validation.Likely fix: have
init_clusterinitialize 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
mainbase commit22b45ae(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
aingle_cortexfeaturesmcp dag.