block/buzz · error

mentions a-replica-only

Error message

mentions a-replica-only

What it means

Panic from `.expect("mentions a-replica-only")` when seeding the replica database in the community-routing test. It fires if the mention insert for the replica-only community-A event fails on the replica pool.

Source

Thrown at crates/buzz-db/src/runtime/tests.rs:1959

            pool,
            CommunityId::from_uuid(comm_b),
            &b_shared,
            Some(chan_b),
        )
        .await
        .expect("mentions b-shared");
    }
    let a_replica_only = tagged("a-replica-only", base + 10);
    let b_replica_only = tagged("b-replica-only", base + 11);
    insert_top_level(&replica, comm_a, chan_a, &a_replica_only).await;
    insert_mentions(
        &replica,
        CommunityId::from_uuid(comm_a),
        &a_replica_only,
        Some(chan_a),
    )
    .await
    .expect("mentions a-replica-only");
    insert_top_level(&replica, comm_b, chan_b, &b_replica_only).await;
    insert_mentions(
        &replica,
        CommunityId::from_uuid(comm_b),
        &b_replica_only,
        Some(chan_b),
    )
    .await
    .expect("mentions b-replica-only");

    // Needs-action fixtures: approval kind, replica-only in BOTH
    // communities, so the assertion below is replica-served on A and
    // must still not see B's.
    let a_approval = tagged_kind(46010, "a-approval-replica-only", base + 20);
    let b_approval = tagged_kind(46010, "b-approval-replica-only", base + 21);
    insert_top_level(&replica, comm_a, chan_a, &a_approval).await;
    insert_mentions(
        &replica,

View on GitHub (pinned to dad5a33865)

Solutions

  1. Verify insert_top_level for a_replica_only succeeded before insert_mentions
  2. Check the replica pool's connection settings
  3. Run migrations on the replica scratch DB

Example fix

// before
.await.expect("mentions a-replica-only");
// after
.await.unwrap_or_else(|e| panic!("mentions a-replica-only: {e}"));
Defensive patterns

Strategy: try-catch

Validate before calling

sqlx::query("SELECT 1").execute(&replica).await?;
assert!(fetch_event(&replica, &a_replica_only.id).await.is_some());

Try / catch

insert_mentions(&replica, comm_a, &a_replica_only, Some(chan_a)).await
    .unwrap_or_else(|e| panic!("mentions a-replica-only: {e}"));

Prevention

When it happens

Trigger: insert_mentions on the `replica` pool with comm_a / a_replica_only fails: replica DB not provisioned, FK missing because insert_top_level for a_replica_only failed, or connection loss.

Common situations: Divergence-fixture setup where the replica DB was created but the parent event insert silently skipped, or replica connection string wrong.

Related errors


AI-assisted analysis of block/buzz@dad5a33865 (2026-08-30). Data as JSON: /api/errors/3e37b092ff97d9c3. Report an issue: GitHub.