mirror of
https://github.com/block/buzz.git
synced 2026-10-29 21:41:33 +00:00
Merge remote-tracking branch 'origin/main' into codex/bundled-goose
Signed-off-by: Salman Mohammed <smohammed@squareup.com> # Conflicts: # desktop/src-tauri/src/managed_agents/discovery/tests.rs
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# ci-mesh-lifecycle-smoke.sh — relay-driven mesh lifecycle smoke
|
||||
# =============================================================================
|
||||
# Provisions a membership-gated buzz-relay and runs the full relay-driven
|
||||
# mesh lifecycle harness (crates/buzz-relay/examples/mesh_relay_lifecycle_smoke.rs):
|
||||
# mesh lifecycle harness (crates/buzz-mesh-smoke/examples/mesh_relay_lifecycle_smoke.rs):
|
||||
# membership → signed discovery notes → relay-derived allowlist → join →
|
||||
# inference over QUIC → stranger denied.
|
||||
#
|
||||
@@ -48,7 +48,7 @@ if [[ "${SKIP_BUILD}" == "true" ]]; then
|
||||
else
|
||||
log "Building relay, admin CLI, and lifecycle harness (profile: ${CARGO_PROFILE})..."
|
||||
cargo build --profile "${CARGO_PROFILE}" -p buzz-relay -p buzz-admin -p git-credential-nostr
|
||||
cargo build --profile "${CARGO_PROFILE}" -p buzz-relay --example mesh_relay_lifecycle_smoke
|
||||
cargo build --profile "${CARGO_PROFILE}" -p buzz-mesh-smoke --example mesh_relay_lifecycle_smoke
|
||||
fi
|
||||
|
||||
ADMIN_BIN="target/${CARGO_PROFILE}/buzz-admin"
|
||||
|
||||
@@ -113,6 +113,8 @@ const scenarios = [
|
||||
["relay", ["crates/buzz-relay/src/main.rs"], ["rust"]],
|
||||
["migration", ["migrations/123.sql"], ["rust"]],
|
||||
["shared workflow", [".github/workflows/ci.yml"], ["rust", "mobile"]],
|
||||
["integration services", ["docker-compose.yml"], ["rust"]],
|
||||
["CI integration images", ["docker-compose.ci.yml"], ["rust"]],
|
||||
[
|
||||
"mixed mobile and relay",
|
||||
["mobile/lib/main.dart", "crates/buzz-core/src/lib.rs"],
|
||||
|
||||
80
scripts/databricks-label-fixtures.json
Normal file
80
scripts/databricks-label-fixtures.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"_comment": "Shared Databricks display-label fixtures, replayed by crates/buzz-agent/src/databricks_label_grammar.rs and desktop/src/features/agents/ui/databricksLabelFixtures.test.mjs. `lookup` rows run through the full label helper (exact record -> unique alias -> generative grammar -> raw); a null label means the raw id is shown. Every `generated` row must stay absent from exact records so a curated addition cannot mask a broken grammar. `curator_only_labels` lists the exact records whose curated label intentionally differs from what the grammar derives from the id: curator suffixes like `(latest)` / `Preview`, a version alias, or a versionless name the grammar deliberately refuses.",
|
||||
"lookup": [
|
||||
{ "id": "databricks-gpt-5-5", "tier": "exact", "label": "GPT-5.5" },
|
||||
{ "id": "DATABRICKS-GPT-5-5", "tier": "exact", "label": "GPT-5.5" },
|
||||
{ "id": "databricks-claude-sonnet-4", "tier": "exact", "label": "Claude Sonnet 4.5" },
|
||||
{ "id": "databricks-gemini-3-pro", "tier": "exact", "label": "Gemini 3 Pro Preview" },
|
||||
{ "id": "goose-claude-4-7-opus", "tier": "exact", "label": "Claude Opus 4.7" },
|
||||
{ "id": "data_workflow_tools.goose.goose-claude-opus-5-5", "tier": "exact", "label": "Claude Opus 5.5" },
|
||||
{ "id": "system.ai.claude-opus-5-5", "tier": "alias", "label": "Claude Opus 5.5" },
|
||||
{ "id": "goose-gpt-5-6-sol", "tier": "alias", "label": "GPT-5.6 Sol" },
|
||||
{ "id": "goose-claude-haiku-4-5", "tier": "alias", "label": "Claude Haiku 4.5 (latest)" },
|
||||
{ "id": "system.ai.deepseek-v4-pro-0813", "tier": "alias", "label": "DeepSeek V4 Pro" },
|
||||
{ "id": "builderbot-glm-5-2", "tier": "alias", "label": "GLM-5.2" },
|
||||
{ "id": "system.ai.gpt-6-astra", "tier": "generated", "label": "GPT-6 Astra" },
|
||||
{ "id": "data_workflow_tools.goose.goose-gpt-6-astra", "tier": "generated", "label": "GPT-6 Astra" },
|
||||
{ "id": "data_workflow_tools.goose.goose-gpt-6-sol", "tier": "generated", "label": "GPT-6 Sol" },
|
||||
{ "id": "data_workflow_tools.goose.goose-gpt-6-luna", "tier": "generated", "label": "GPT-6 Luna" },
|
||||
{ "id": "system.ai.gemini-3-7-flash", "tier": "generated", "label": "Gemini 3.7 Flash" },
|
||||
{ "id": "system.ai.gemini-3-8-flash", "tier": "generated", "label": "Gemini 3.8 Flash" },
|
||||
{ "id": "system.ai.deepseek-v4-1-flash", "tier": "generated", "label": "DeepSeek V4.1 Flash" },
|
||||
{ "id": "databricks-gpt-5-3-codex", "tier": "generated", "label": "GPT-5.3 Codex" },
|
||||
{ "id": "databricks-gpt-5-5-pro", "tier": "generated", "label": "GPT-5.5 Pro" },
|
||||
{ "id": "system.ai.mistral-large-3", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.grok-5-mini", "tier": "generated", "label": "Grok 5 Mini" },
|
||||
{ "id": "system.ai.claude-opus-5-5-thinking", "tier": "generated", "label": "Claude Opus 5.5 Thinking" },
|
||||
{ "id": "system.ai.gemini-3-7-flash-0925", "tier": "generated", "label": "Gemini 3.7 Flash" },
|
||||
{ "id": "system.ai.phi-5-mini", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.minimax-m3", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.qwen36-35b-a3b", "tier": "generated", "label": "Qwen3.6 35B A3B" },
|
||||
{ "id": "system.ai.gpt-6-sol", "tier": "generated", "label": "GPT-6 Sol" },
|
||||
{ "id": "system.ai.gpt-6-luna", "tier": "generated", "label": "GPT-6 Luna" },
|
||||
{ "id": "system.ai.nova12-pro", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.qwen10-32b", "tier": "generated", "label": "Qwen10 32B" },
|
||||
{ "id": "system.ai.gpt10", "tier": "generated", "label": "GPT10" },
|
||||
{ "id": "system.ai.qwen35-122b-a10b-instruct", "tier": "generated", "label": "Qwen3.5 122B A10B Instruct" },
|
||||
{ "id": "system.ai.claude-5-6-opus", "tier": "generated", "label": "Claude Opus 5.6" },
|
||||
{ "id": "system.ai.claude-5-6-v2", "tier": "generated", "label": "Claude 5.6 V2" },
|
||||
{ "id": "system.ai.claude-5-6-thinking", "tier": "generated", "label": "Claude 5.6 Thinking" },
|
||||
{ "id": "system.ai.gemini-3-7-1-flash", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.deepseek-v4-1-2-flash", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.\u212aimi-k4", "tier": "raw", "label": null },
|
||||
{ "id": "databricks-\u212aimi-k4", "tier": "raw", "label": null },
|
||||
{ "id": "\ufeffsystem.ai.nova-3\ufeff", "tier": "raw", "label": null },
|
||||
{ "id": "\u0085system.ai.nova-3\u0085", "tier": "raw", "label": null },
|
||||
{ "id": "goose-qwen3-5-122b-a10b", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.llama3-1-8b", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.claude3-5-sonnet", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.nova12-3-4", "tier": "raw", "label": null },
|
||||
{ "id": "builderbot-pr-reviews-v2", "tier": "raw", "label": null },
|
||||
{ "id": "prod.ai.rag-agent-3", "tier": "raw", "label": null },
|
||||
{ "id": "dev.ai.rag-agent-3", "tier": "raw", "label": null },
|
||||
{ "id": "builderbot-pr-reviews", "tier": "raw", "label": null },
|
||||
{ "id": "gpt-5", "tier": "raw", "label": null },
|
||||
{ "id": "gpt-5.5", "tier": "raw", "label": null },
|
||||
{ "id": "qwen3:32b", "tier": "raw", "label": null },
|
||||
{ "id": "claude-opus-4.7", "tier": "raw", "label": null },
|
||||
{ "id": "command-r-plus", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.qwen3:32b", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.claude-opus-4.7", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.command-r-plus", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.gpt", "tier": "raw", "label": null },
|
||||
{ "id": "system.ai.gpt-05", "tier": "raw", "label": null },
|
||||
{ "id": "databricks-team-2025-01", "tier": "raw", "label": null },
|
||||
{ "id": "custom-unlisted-endpoint", "tier": "raw", "label": null },
|
||||
{ "id": " ", "tier": "raw", "label": null }
|
||||
],
|
||||
"curator_only_labels": [
|
||||
"databricks-claude-haiku-4-5",
|
||||
"databricks-claude-opus-4-1",
|
||||
"databricks-claude-opus-4-5",
|
||||
"databricks-claude-sonnet-4",
|
||||
"databricks-claude-sonnet-4-5",
|
||||
"databricks-gemini-3-1-flash-lite",
|
||||
"databricks-gemini-3-1-pro",
|
||||
"databricks-gemini-3-flash",
|
||||
"databricks-gemini-3-pro",
|
||||
"databricks-inkling"
|
||||
]
|
||||
}
|
||||
@@ -137,6 +137,11 @@ run_unit_tests() {
|
||||
run_test_step "buzz-backend-kubernetes tests" \
|
||||
cargo test -p buzz-backend-kubernetes -- --nocapture
|
||||
|
||||
# Keep fallback parity with `just test-unit`: one LaunchDarkly-feature run
|
||||
# exercises both default and feature-gated buzz-feature-flags tests.
|
||||
run_test_step "buzz-feature-flags tests (launchdarkly)" \
|
||||
cargo test -p buzz-feature-flags --features launchdarkly -- --nocapture
|
||||
|
||||
# buzz-agent model-capabilities corpus: the Rust half of the cross-language
|
||||
# drift guard. model_capabilities.rs embeds scripts/model-capabilities.json +
|
||||
# scripts/normative-corpus.json via include_str! and replays the full locked
|
||||
|
||||
@@ -128,27 +128,43 @@ BEGIN
|
||||
RAISE EXCEPTION 'local community is missing; run just setup first';
|
||||
END IF;
|
||||
|
||||
-- A real channel for the failed-enforcement report below. Kick is only valid
|
||||
-- on `event` reports, and the relay rejects it pre-mutation unless the report
|
||||
-- carries a channel_id (FK into channels). Seeding this channel makes the
|
||||
-- Kick action reachable in the UI and lets the enforcement genuinely run and
|
||||
-- fail, so the Cancel & reopen recovery path is exercisable locally.
|
||||
INSERT INTO channels (community_id, id, name, created_by)
|
||||
VALUES (
|
||||
local_community_id,
|
||||
'c4a11e10-0000-4000-8000-000000000001',
|
||||
'seed-enforcement-channel',
|
||||
decode(repeat('3b', 32), 'hex')
|
||||
)
|
||||
ON CONFLICT (community_id, id) DO UPDATE SET name = EXCLUDED.name;
|
||||
|
||||
INSERT INTO moderation_reports (
|
||||
community_id, id, report_event_id, reporter_pubkey, target_kind,
|
||||
target_event_id, target_pubkey, target_blob_sha256, report_type, note,
|
||||
target_event_id, target_pubkey, target_blob_sha256, channel_id, report_type, note,
|
||||
status, resolved_by, resolved_at, created_at
|
||||
) VALUES
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000001', decode(repeat('01', 32), 'hex'), decode(repeat('11', 32), 'hex'), 'event', decode(repeat('21', 32), 'hex'), NULL, NULL, 'spam', 'Repeated unsolicited promotion across several channels.', 'open', NULL, NULL, now() - interval '8 minutes'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000002', decode(repeat('02', 32), 'hex'), decode(repeat('12', 32), 'hex'), 'pubkey', NULL, decode(repeat('22', 32), 'hex'), NULL, 'impersonation', 'Profile appears to impersonate a community organizer.', 'open', NULL, NULL, now() - interval '25 minutes'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000003', decode(repeat('03', 32), 'hex'), decode(repeat('13', 32), 'hex'), 'blob', NULL, NULL, decode(repeat('23', 32), 'hex'), 'malware', 'Attachment was flagged after download.', 'open', NULL, NULL, now() - interval '50 minutes'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000004', decode(repeat('04', 32), 'hex'), decode(repeat('14', 32), 'hex'), 'event', decode(repeat('24', 32), 'hex'), NULL, NULL, 'illegal', 'Contains material that may require legal review.', 'open', NULL, NULL, now() - interval '2 hours'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000005', decode(repeat('05', 32), 'hex'), decode(repeat('15', 32), 'hex'), 'blob', NULL, NULL, decode(repeat('25', 32), 'hex'), 'nudity', NULL, 'open', NULL, NULL, now() - interval '5 hours'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000006', decode(repeat('06', 32), 'hex'), decode(repeat('16', 32), 'hex'), 'pubkey', NULL, decode(repeat('26', 32), 'hex'), NULL, 'profanity', 'Repeated abusive replies from this account.', 'open', NULL, NULL, now() - interval '12 hours'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000007', decode(repeat('07', 32), 'hex'), decode(repeat('17', 32), 'hex'), 'event', decode(repeat('27', 32), 'hex'), NULL, NULL, 'other', 'Does not fit a standard report category.', 'open', NULL, NULL, now() - interval '1 day'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000008', decode(repeat('08', 32), 'hex'), decode(repeat('18', 32), 'hex'), 'pubkey', NULL, decode(repeat('28', 32), 'hex'), NULL, 'impersonation', 'Escalated while ownership is verified.', 'escalated', decode(repeat('38', 32), 'hex'), now() - interval '1 hour', now() - interval '2 days'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000009', decode(repeat('09', 32), 'hex'), decode(repeat('19', 32), 'hex'), 'blob', NULL, NULL, decode(repeat('29', 32), 'hex'), 'malware', 'Resolved after the attachment was removed.', 'resolved', decode(repeat('39', 32), 'hex'), now() - interval '1 day', now() - interval '3 days'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000010', decode(repeat('0a', 32), 'hex'), decode(repeat('1a', 32), 'hex'), 'event', decode(repeat('2a', 32), 'hex'), NULL, NULL, 'other', 'Dismissed after reviewing the surrounding thread.', 'dismissed', decode(repeat('3a', 32), 'hex'), now() - interval '3 days', now() - interval '4 days')
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000001', decode(repeat('01', 32), 'hex'), decode(repeat('11', 32), 'hex'), 'event', decode(repeat('21', 32), 'hex'), NULL, NULL, NULL, 'spam', 'Repeated unsolicited promotion across several channels.', 'open', NULL, NULL, now() - interval '8 minutes'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000002', decode(repeat('02', 32), 'hex'), decode(repeat('12', 32), 'hex'), 'pubkey', NULL, decode(repeat('22', 32), 'hex'), NULL, NULL, 'impersonation', 'Profile appears to impersonate a community organizer.', 'open', NULL, NULL, now() - interval '25 minutes'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000003', decode(repeat('03', 32), 'hex'), decode(repeat('13', 32), 'hex'), 'blob', NULL, NULL, decode(repeat('23', 32), 'hex'), NULL, 'malware', 'Attachment was flagged after download.', 'open', NULL, NULL, now() - interval '50 minutes'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000004', decode(repeat('04', 32), 'hex'), decode(repeat('14', 32), 'hex'), 'event', decode(repeat('24', 32), 'hex'), NULL, NULL, NULL, 'illegal', 'Contains material that may require legal review.', 'open', NULL, NULL, now() - interval '2 hours'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000005', decode(repeat('05', 32), 'hex'), decode(repeat('15', 32), 'hex'), 'blob', NULL, NULL, decode(repeat('25', 32), 'hex'), NULL, 'nudity', NULL, 'open', NULL, NULL, now() - interval '5 hours'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000006', decode(repeat('06', 32), 'hex'), decode(repeat('16', 32), 'hex'), 'pubkey', NULL, decode(repeat('26', 32), 'hex'), NULL, NULL, 'profanity', 'Repeated abusive replies from this account.', 'open', NULL, NULL, now() - interval '12 hours'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000007', decode(repeat('07', 32), 'hex'), decode(repeat('17', 32), 'hex'), 'event', decode(repeat('27', 32), 'hex'), NULL, NULL, NULL, 'other', 'Does not fit a standard report category.', 'open', NULL, NULL, now() - interval '1 day'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000008', decode(repeat('08', 32), 'hex'), decode(repeat('18', 32), 'hex'), 'pubkey', NULL, decode(repeat('28', 32), 'hex'), NULL, NULL, 'impersonation', 'Escalated while ownership is verified.', 'escalated', decode(repeat('38', 32), 'hex'), now() - interval '1 hour', now() - interval '2 days'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000009', decode(repeat('09', 32), 'hex'), decode(repeat('19', 32), 'hex'), 'blob', NULL, NULL, decode(repeat('29', 32), 'hex'), NULL, 'malware', 'Resolved after the attachment was removed.', 'resolved', decode(repeat('39', 32), 'hex'), now() - interval '1 day', now() - interval '3 days'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000010', decode(repeat('0a', 32), 'hex'), decode(repeat('1a', 32), 'hex'), 'event', decode(repeat('2a', 32), 'hex'), NULL, NULL, NULL, 'other', 'Dismissed after reviewing the surrounding thread.', 'dismissed', decode(repeat('3a', 32), 'hex'), now() - interval '3 days', now() - interval '4 days'),
|
||||
(local_community_id, 'a11d0000-0000-4000-8000-000000000011', decode(repeat('0b', 32), 'hex'), decode(repeat('1b', 32), 'hex'), 'event', decode(repeat('2b', 32), 'hex'), NULL, NULL, 'c4a11e10-0000-4000-8000-000000000001', 'spam', 'Event report in a real channel — Kick is offered and the enforcement genuinely runs and fails, exercising the Cancel & reopen recovery path.', 'open', NULL, NULL, now() - interval '3 minutes')
|
||||
ON CONFLICT (community_id, report_event_id) DO UPDATE SET
|
||||
reporter_pubkey = EXCLUDED.reporter_pubkey,
|
||||
target_kind = EXCLUDED.target_kind,
|
||||
target_event_id = EXCLUDED.target_event_id,
|
||||
target_pubkey = EXCLUDED.target_pubkey,
|
||||
target_blob_sha256 = EXCLUDED.target_blob_sha256,
|
||||
channel_id = EXCLUDED.channel_id,
|
||||
report_type = EXCLUDED.report_type,
|
||||
note = EXCLUDED.note,
|
||||
status = EXCLUDED.status,
|
||||
@@ -191,4 +207,4 @@ sql="${sql//__WORKSPACE_DIAGNOSTICS_SIZE__/$(fixture_size "${workspace_diagnosti
|
||||
|
||||
run_psql -v ON_ERROR_STOP=1 -c "${sql}"
|
||||
|
||||
echo "Seeded 10 moderation reports, 7 feedback entries, and 5 attachments for the local admin dashboard."
|
||||
echo "Seeded 11 moderation reports, 7 feedback entries, and 5 attachments for the local admin dashboard."
|
||||
|
||||
Reference in New Issue
Block a user