block/buzz · error

mentions b-shared

Error message

mentions b-shared

What it means

Same failure family as error 71 but for community B: `.expect("mentions b-shared")` panics when insert_mentions fails to insert the mention row for `b_shared` into community B's scoped tables.

Source

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

    for pool in [&writer, &replica] {
        insert_top_level(pool, comm_a, chan_a, &a_shared).await;
        insert_mentions(
            pool,
            CommunityId::from_uuid(comm_a),
            &a_shared,
            Some(chan_a),
        )
        .await
        .expect("mentions a-shared");
        insert_top_level(pool, comm_b, chan_b, &b_shared).await;
        insert_mentions(
            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),

View on GitHub (pinned to dad5a33865)

Solutions

  1. Confirm Postgres is reachable and migrations applied
  2. Insert the parent event (insert_top_level) before its mentions
  3. Inspect the underlying sqlx error rather than panicking on expect

Example fix

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

Strategy: try-catch

Validate before calling

sqlx::query("SELECT 1").execute(pool).await?;
assert!(fetch_event(pool, &b_shared.id).await.is_some(), "b_shared must exist first");

Try / catch

insert_mentions(pool, comm_b, &b_shared, Some(chan_b)).await
    .unwrap_or_else(|e| panic!("mentions b-shared: {e}"));

Prevention

When it happens

Trigger: insert_mentions(pool, CommunityId::from_uuid(comm_b), &b_shared, Some(chan_b)) fails — pool connection error, missing parent event row, or channel h-tag constraint failure.

Common situations: Shared-fixture setup running against an unreachable or un-migrated Postgres; wrong channel id for community B causing a scoping constraint failure.

Related errors


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