block/buzz · error · anyhow::Error
unsupported project announcement kind
Error message
unsupported project announcement kind
What it means
build_project_owner_announcement_events only signs project-owner announcement templates whose kind is 30617 (NIP-34 git repository announcement) or 30621 (project announcement). Any other kind is rejected with this bail because the relay has no handler that will accept or process such an announcement.
Source
Thrown at crates/buzz-acp/src/lib.rs:1716
observer.as_ref(),
&control.request_id,
"ok",
&published_events,
None,
);
});
}
fn build_project_owner_announcement_events(
announcements: Vec<ProjectOwnerAnnouncementTemplate>,
keys: &nostr::Keys,
) -> Result<Vec<nostr::Event>> {
let now = nostr::Timestamp::now().as_secs();
announcements
.into_iter()
.map(|template| {
if !matches!(template.kind, 30_617 | 30_621) {
anyhow::bail!("unsupported project announcement kind");
}
if !template.tags.iter().any(|tag| {
tag.first().is_some_and(|value| value == "d")
&& tag.get(1).is_some_and(|value| !value.trim().is_empty())
}) {
anyhow::bail!("project announcement is missing its address");
}
let tags = template
.tags
.into_iter()
.map(|tag| {
nostr::Tag::parse(tag)
.map_err(|error| anyhow::anyhow!("invalid project tag: {error}"))
})
.collect::<Result<Vec<_>>>()?;
let created_at = template.created_at.unwrap_or(now);
if created_at > now.saturating_add(300) {
anyhow::bail!("project announcement timestamp is too far in the future");View on GitHub (pinned to dad5a33865)
Solutions
- Set the template's kind to 30617 (repo announcement) or 30621 (project announcement)
- Cross-check the canonical kind registry in crates/buzz-core/src/kind.rs before inventing kind values
- Regenerate the config from a current example config instead of hand-editing
Example fix
# agent config
# before
project_owner_announcements:
- kind: 30078
tags: [["d", "my-project"]]
# after
project_owner_announcements:
- kind: 30621
tags: [["d", "my-project"]] Defensive patterns
Strategy: validation
Validate before calling
// Preflight templates before harness startup
const SUPPORTED: &[u16] = &[30617, 30621];
for t in &config.project_owner_announcements {
if !SUPPORTED.contains(&t.kind) {
anyhow::bail!("template kind {} not in {SUPPORTED:?}", t.kind);
}
} Type guard
fn is_supported_announcement_kind(kind: u16) -> bool {
matches!(kind, 30617 | 30621)
} Prevention
- Treat buzz-core/src/kind.rs as the single source of kind integers; never hand-pick kind values in config
- Validate the whole startup config in one pass before spawning agents so failures surface early with full context
When it happens
Trigger: Agent/harness startup configuration contains a project_owner_announcements template entry whose kind is any value other than 30617 or 30621 (e.g. a copied 30078 chat kind or a made-up kind), and startup reaches build_project_owner_announcement_events.
Common situations: Hand-edited harness config or a template copied from a different event type; a buzz-acp version change that narrowed the allowed kinds while stale config is still deployed.
Related errors
- project announcement is missing its address
- project announcement timestamp is too far in the future
- moderation notice recipient must be a 32-byte pubkey, got {}
- BUZZ_RELAY_PRIVATE_KEY must be set when BUZZ_REQUIRE_AUTH_TO
- malformed {SETUP_PAYLOAD_ENV_VAR}: {e}
AI-assisted analysis of block/buzz@dad5a33865 (2026-08-20).
Data as JSON: /api/errors/720b57a88b49671a.
Report an issue: GitHub.