fork sync: merge block/buzz main (2026-09-01) - #107
Merged
Conversation
…lock#6994) PR 2 of the NIP-FI plan: the schema foundation. Establishes the durable server-side identity ledger and final-admission surface that the runtime phases build on. All of Phase A's migrations live here; later phases own their own deltas. Depends on nothing — PR 1 (block#6776, merged) owned zero migration files. This PR's relations are shaped to store exactly what PR 1's verifier produces: issuer-qualified identity and the four denial classes. They meet in a later PR that writes a verified assertion into these tables in one transaction. ## Two internally-ordered migrations - `0041_nip_fi_identity_foundation.sql` (migration A) — core identity + base-lifecycle relations (5 tables): issuer-qualified `(iss, sub)` bindings, lifecycle history/selectors, enrollment policies, and operation receipts. Applies cleanly to current `main`. - `0042_nip_fi_authorization_foundation.sql` (migration B) — the final-admission surface (10 tables): authorization events + capacity, admission results, replay/receipt guards, audit, invalidation domains/floors, protected-object authority, authority epochs, and restore version deltas. Applies to A's resulting state. Fifteen NIP-FI relations total, zero dangling foreign keys. Identity is issuer-qualified throughout — no single-global-issuer assumption in any relation, no `Block`-hardcoding. A single deployment may run one issuer; that is config, not schema. ## Durable, immutable ledger posture All 15 relations are append-only (immutable `no_delete`/`no_truncate` triggers) and carry `community_id` as provenance, not ownership. Both migrations widen the single SQL source of truth `community_write_fence_excluded_table` so the relations are never fence-attached, never purged on community deletion, and never counted as tenant-scoped drift by the deletion control plane's exact-set catalog check — the same posture main already applies to `product_feedback` and `rate_limit_violations`. `schema/schema.sql` keeps one consolidated definition of that function whose exclusion array byte-matches `0042`, guarded by a parity assertion so a future consolidation cannot silently drop NIP-FI relations from the ledger. This makes a tenant's identity/authorization ledger survive community deletion, per the spec's `FI-INV-02` (durable binding) and `FI-INV-03` (tombstone monotonicity) and `NIP-FI.md`'s "durable server state" ruling. `communities(id)` FK never dangles: community rows become permanent tombstones, never hard-deleted. ## Authorization shape and cardinality contracts Authenticated `OperatorDenied` events (`actor_kind` 1–3, non-null `request_fingerprint`) carry a null `semantic_fingerprint` and commit without a denial-attempt row. The denial-attempt cardinality and shape guards are scoped to unresolved pre-auth kind-9 events (`actor_kind = 4`). Applied and no-op lifecycle receipts (`outcome_code IN (1, 3)`) require exactly one mapped success-transition event; denied lifecycle receipts (`outcome_code = 2`) require zero events from the complete core lifecycle success-transition class (kinds 1, 2, 3, 6: enrolled, revoked, rotated, retired) — any such event paired with a denied receipt would record a transition that never occurred. ## Mined vs. new Re-cut from Franco's block#1476 (`0029`/`0030`) and Cea's block#4772 committer schema, re-cut along FK topology and renumbered above the live `main` tip. The buzz-auth core of block#1476 is Cea-authored; `Co-authored-by` reflects verified per-commit authorship of the mined schema. Zero Rust/`deletion.rs` edits — the migration-only exclusion widening keeps `EXPECTED_SCOPED_TABLES` untouched. --------- Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz> Co-authored-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com> Co-authored-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>
…#7135) 🤖 ## Summary - add curated human-readable labels for Databricks Goose models that otherwise render as fully qualified identifiers - render `data_workflow_tools.goose.goose-glm-5-3` as `GLM-5.3` - render `goose-claude-4-6-sonnet`, `goose-claude-4-7-opus`, and `goose-kimi-2-7` as `Claude Sonnet 4.6`, `Claude Opus 4.7`, and `Kimi 2.7` - make the Global Defaults closed model picker use the provider-scoped display label while preserving the raw discovered model ID as the persisted value - remove the obsolete `keepSelectedModelValueLabel` escape hatch and its raw-label override path so selected discovered models have one consistent display behavior - classify the exact discovered Goose Claude IDs with their canonical adaptive-thinking capability axes, including Sonnet 4.6's exclusion of `xhigh` - expand Rust and TypeScript alias coverage and regenerate the shared 139-vector capability corpus ## Test plan - `cargo test -p buzz-agent --lib` — 517 passed, 1 ignored - `cd desktop && pnpm test` — 5,821 passed - Desktop TypeScript typecheck — passed - Biome on the changed component — passed - `git diff --check` — passed - targeted Playwright Global Defaults regression — passed on the preceding implementation head; the subsequent commit only removes dead picker-prop plumbing Verified at `b9609d12696173aa309d2dbaf4f093a502756c36`. The hook-bound push exceeded the harness timeout in unrelated Rust doc tests, so the already-verified rebased commit was pushed with hooks bypassed. Follow-up to block#6955. --------- Signed-off-by: Kalvin Chau <kalvin@block.xyz> Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
🤖 I’m Larry, updating this description on Logan’s behalf. ## Summary Build named macOS demo apps without Finder automation or collisions with installed Buzz. `just desktop-demo-build "PR 6407 Demo"` produces a matching app and DMG, with a fresh build identity even when the same display name is reused. - The headless DMG packager uses `hdiutil`; optional Finder styling is bounded. The existing production release recipe is unchanged. - Each demo has independent app data, keychain, nest, CLI name, voice-model storage, repository discovery, and agent OAuth/config storage. Reset preserves production and sibling-demo state, and retains retry intent when credential removal or root resolution fails. - Native links accept only the active build’s registered scheme, then translate validated entity links into the frontend’s canonical `buzz:` format. - The recipe builds all six executable sidecars. Display names are capped at 31 ASCII characters so the generated identity fits Rust’s build-time limit. **Open delivery requirement:** downloaded demos must run without a Gatekeeper security override. The current recipe is ad-hoc signed and unnotarized; it does **not** satisfy this requirement. Trusted branch-demo signing/distribution remains blocked on establishing an approved signing path. This PR is not being presented as complete download-and-run delivery. ### Related issue N/A — reported in the Buzz DMG-packaging workstream. ### Testing At `11ce21ff97cb387ad676e7caa65b00964097d0bb`, macOS Blox passed the Tauri workspace suite and compiled-flags gate (including the full named-demo state; each library pass: 2,992 passed, 19 ignored), Tauri all-target clippy, the full `buzz-agent` package suite, and frontend lint/typecheck plus 5,733 tests. Regression coverage includes cold-start/running entity-link handling, wrong-build rejection, OAuth deletion failure and retry, unresolved credential roots, and production/sibling preservation. At the same head, an extra full named-demo/mesh-enabled run had 3,092 passing tests and one failure: a pre-existing shared-compute `auto` versus `mesh` expectation, also reproduced on the old published head `a77b25eca`. The ordinary and demo-state matrix above passes; this is not an all-features-green claim. Live macOS Launch Services delivery remains unverified. GitHub CI completed with 30 successful checks and 9 skipped. The exact-range security review has not run; its authorization notice remains open. CI success does not establish trusted signing or downloaded-app launch. Earlier demo artifacts established matching app/DMG names, side-by-side launch, and six non-empty executable arm64 sidecars. These screenshots show an earlier artifact, not a new build of the final repair commit. Signature-integrity checks are not Gatekeeper/notarization evidence. <img width="1032" height="548" alt="Buzz PR 6407 Demo disk image containing the matching app" src="https://github.com/user-attachments/assets/bca0277e-db03-4308-b280-fcad55e6d601" /> <img width="1186" height="821" alt="Buzz PR 6407 Demo running alongside other Buzz installations" src="https://github.com/user-attachments/assets/b4bf4ae5-c341-4e15-8090-9d2ea7c623b6" /> --------- Signed-off-by: Logan Johnson <loganj@squareup.com> Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz> Co-authored-by: Other Brother Darryl <cee32d92756729ee0c097c5661b879c6199931cd25315c8cf398dcbf0f155cf1@buzz.block.builderlab.xyz> Co-authored-by: Larry <loganj+sandbox-larry@squareup.com> Co-authored-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
## Issue I would send a message in the thread side pane and the main chat's composer would then open its at-mention completion UI: https://github.com/user-attachments/assets/25e79e05-8672-4f6e-b5cc-81a46638f229 ## Summary - Render inline composer autocomplete only for the focused rich-text editor. - Preserve editor focus when opening composer-owned mention controls. - Add an end-to-end regression for sending in a side thread while the main composer retains an agent mention. ## Root cause The main channel composer and thread composer share the channel sending state. A thread send toggled the inactive main editor disabled and enabled, causing programmatic editor updates to recompute its stale mention query and remount the mention menu. ## Verification - Desktop unit suite: 5,556 passed - Persistent agent audience E2E spec: 18 passed - TypeScript typecheck - Vite E2E build - Biome and repository text/pubkey/file-size ratchets --------- Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Jitter <2b2e6415e748c35180847a37aadae06a11e30dddc76b784e7fd9354c4eb42e7a@buzz.block.builderlab.xyz> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Resolves the single conflict reported in #106 (desktop/src-tauri/src/managed_agents/reserved_env_keys.rs). It is purely additive: both sides appended a new entry to RESERVED_ENV_KEYS at the same position, with no overlap in meaning. - fork side added BUZZ_ACP_REPLAY_FLOOR, the per-deploy wake replay floor carried in launch.policy_env by wake-on-mention deploys (commands/agents_deploy.rs, crates/buzz-waker/src/effects.rs). - upstream side added BUZZ_AGENT_CONFIG_DIR, the demo-build agent config root introduced with build_identity.rs. Both keys are live and independent, so both stay in the list; kept the fork entry first to preserve its adjacency to BUZZ_ACP_SETUP_PAYLOAD, and kept each side's explanatory comment with its own key. Signed-off-by: Junchao Yan <yjc801@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #106. Merges
block/buzzmain (571c1902d) into fork main(
109c5992e). Opened as a PR rather than pushed directly because themain: PR gateruleset blocks direct pushes.Upstream commits merged (4)
Conflict resolved (1 file)
desktop/src-tauri/src/managed_agents/reserved_env_keys.rs— purelyadditive. Both sides appended one entry to
RESERVED_ENV_KEYSat the sameposition, with no overlap in meaning:
BUZZ_ACP_REPLAY_FLOOR, the per-deploy wake replay floor written intolaunch.policy_envby wake-on-mention deploys(
commands/agents_deploy.rs,crates/buzz-waker/src/effects.rs).BUZZ_AGENT_CONFIG_DIR, the demo-build agent config rootintroduced with
build_identity.rs.Kept both, fork entry first so it stays adjacent to
BUZZ_ACP_SETUP_PAYLOAD,each with its own explanatory comment. Neither key matches the credential
filters in
buzz-terminal'sreserved_keys_are_coveredguard, so thatcross-crate test is unaffected.
Silent-merge review
The other seven files touched by both sides auto-merged; I read each one to
confirm the result is coherent rather than merely conflict-free:
migration.rs— upstream'sif !is_demo_build()guard aroundmigrate_legacy_app_data_dir/sync_shared_agent_datalanded above thefork's
backfill_agent_community_scope, which still runs beforefold_personas_into_agent_storeas its comment requires.nest.rs— upstream replacedNEST_DIR_DEVwithbuild_identity::nest_name();NEST_DIR_PRODis still referenced, so nodead-code fallout.
runtime.rs— upstream'sapply_demo_config_home(&mut command)?ispresent after the
descriptor.envloop and beforeapply_effort_env, asupstream placed it.
useMentions.ts— upstream'sevent.key === "Tab" && !event.shiftKeysurvived the fork's surrounding rewrite of the same handler.
lib.rs,Justfile,agents.spec.ts— non-overlapping hunks.Fork-only surfaces spot-checked as intact after the merge:
home_community_allows,BUZZ_ACP_REPLAY_FLOOR,xyz.waggle.app.dev/WAGGLE_IDENTIFIER_PREFIX,backfill_agent_community_scope.Pre-existing upstream nit, deliberately not fixed here to keep the sync
faithful:
nest.rs:322doc-links[NEST_DIR_DEV], which block#6407 deleted.The dangling link is present in
upstream/mainitself.Verification
just ci— pass end to end (exit 0), run with the ambientBUZZ_ACP_*vars stripped so they can't leak into buzz-acp's own default-value tests.
Covers
check(workspace + tauri fmt and clippy, desktop/web/mobile checks,security-review-check, file-size ratchet),
test-unit,desktop-test,desktop-build,desktop-tauri-check,desktop-tauri-test,web-build,mobile-test. 6266 tests passed across 39 Rust suites, 0 failed; Flutter2019/2019.
The file-size ratchet passes untouched — worth noting because it is what
forced the two file splits on the previous sync (#105); this merge does not
push any file past its inherited ceiling.
Extra checks for the schema half of the merge, since block#6994 adds 1957 lines
of SQL:
(each file in its own transaction,
ON_ERROR_STOP=1), including the twonew NIP-FI ones.
pgschema plan --file schema/schema.sqlagainst a migration-built database reports 14 modify / 5 drop after this
merge versus 15 modify / 5 drop before it. Diffing the two object lists,
the sole difference is
community_write_fence_excluded_table, whichdrifted before and now matches — feat(db): add NIP-FI identity and final-admission schema foundation block/buzz#6994 updated
schema.sqland0042inlockstep. Every other drift item is byte-identical to the pre-merge
baseline, i.e. pre-existing and not introduced here. No NIP-FI object
appears in the drift at all.
Not run:
just test(the integration suite). It needs Postgres andRedis; Postgres is up on this host but there is no Redis and no Docker
daemon, so I could not run it and am not claiming otherwise. Scope note in
mitigation: this merge changes no
buzz-relay,buzz-auth, orbuzz-dbruntime source — the onlybuzz-dbchange is the migrator's ownunit tests asserting the new migration count and contents, which
test-unitdoes run, plus the two migration files validated against realPostgres above.
Resolved by Will for the
buzz-fork-syncroutine.