[lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) - #30
Conversation
Signed-off-by: Michael Feth <mfethe1@gmail.com>
…ered 0037->0048 per owner resolve thread 79398) Merge feat/REG-10 (6e1565f) into product/main (adeec6e), resolving both sides per Michael's 2026-09-10 owner resolve: - migration 0037_community_brand_color.sql -> 0048_community_brand_color.sql (0037 is upstream-owned relay_admin_action_lease; 0047 contested by block#7333) - runtime/migration.rs: count 45 -> 46; brand-color test retargeted version 48 - nip11.rs: RelayInfo::build merged to 8 params (brand_color 3rd, admin_api kept); all test call sites updated; both icon and admin_api test suites kept Signed-off-by: Michael Feth <mfethe1@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ntegration The run-99 worktree applied these fixes after the merge commit but they were not committed before push: (1) include_str depth for runtime/ move, (2) five 7-arg RelayInfo::build test calls extended to the merged 8-param signature. Signed-off-by: Michael Feth <mfethe1@gmail.com>
…un in brand color test - cargo fmt --all on crates/buzz-relay/src/nip11.rs (7 diffs, all from RelayInfo::build gaining the brand_color parameter) - #[allow(clippy::too_many_arguments)] on RelayInfo::build with rationale; the parameter is required by REG-10 and pushes arity to 8/7. Verified this is the only arity site in the workspace. - Drop redundant run_migrations() from community_brand_color_round_trips_and_clears_independently_from_icon. setup_db() connects to an already-migrated shared test database; re-running migrations replayed 0001's CREATE TYPE channel_type and failed 42710. No other test in community.rs calls run_migrations. Local gates: cargo fmt --all -- --check exit 0; cargo clippy --workspace --all-targets -- -D warnings clean.
Trunk landed 0047_agent_machine_homes (AGENT-HOMES-001 PR-3) while this branch carried its own 0047_task_event_changes, so both sides claimed version 47. PR #30 already owns 0048_community_brand_color, so this takes 0049. sqlx::migrate! globs migrations/ by filename, so renaming the file is the whole renumber. Inventory assertions pin 47 migrations, 46/47/49.
Trunk landed 0047_agent_machine_homes while this branch carried its own 0047_task_optimistic_concurrency. PR #30 owns 0048 and PR #18 owns 0049, so this takes 0050 (matching the numbering PR #27 already expects). sqlx::migrate! globs migrations/ by filename, so the rename is the whole renumber. Inventory now pins 47 migrations with 50 last.
Trunk landed 0047_agent_machine_homes; this branch keeps 0048_community_brand_color. Both are additive, so the inventory is 47 with 48 last.
…eg10-brand-color-run99 # Conflicts: # crates/buzz-db/src/runtime/migration.rs
🧪 Jev PR-Triage PilotPR #30: [lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) — verdict: BLOCK
Block reason (if any): |
🧪 Jev PR-Triage (v3)PR #30: [lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) — verdict: BLOCK
🔍 Reviewer focus
Block reason (if any): |
…or-run99 Resolve migration.rs inventory conflict: merged tree carries 49 migrations — upstream 0045 push revocation tombstones (sync #67) + REG-10 0048 community_brand_color + fork 0046/0047/0049. Versions 45-49 at indices 44-48.
🧪 Jev PR-Triage (v3)PR #30: [lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) — verdict: BLOCK
🔍 Reviewer focus
Block reason (if any): |
🧪 Jev PR-Triage (v3) — ADVISORY, NON-GATINGPR #30: [lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) — verdict: BLOCK
🔍 Reviewer focus
Block reason (if any): |
The brand_color migration was renumbered 0037 -> 0048 because 0037 is upstream-owned (relay_admin_action_lease), but two comments still named 0037: - migrations/0048: the numbering note also claimed product/main owned 0035_task_system and a sibling branch owned 0036. Neither holds -- 0035 is relay_operators, 0036 is relay_admin_actions, task_system is 0046. Replaced with the real reason, which migration.rs:709 already records. - schema/schema.sql:61: brand_color was attributed to "migration 0037", pointing the schema SSOT at an unrelated upstream migration. Comment-only; no DDL change. The three remaining 0037 references in schema.sql (1927/1944/1971) are correct -- they describe the lease migration -- and are untouched. Safe to edit 0048's text: checksum immutability binds migrations already applied by running relays; 0048 is unmerged and has no checksum pin. cargo test -p buzz-db --lib runtime::migration: 14 passed, 0 failed -- including community_brand_color_is_additive_and_mirrored_in_desired_state, which include_str!s both edited files.
🧪 Jev PR-Triage (v3)PR #30: [lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) — verdict: BLOCK
🔍 Reviewer focus
Block reason (if any): |
A 9033 event rewrote every profile field from the tags it carried, so a field whose tag was absent was cleared. The only shipped desktop publisher, setCommunityIcon, sends [["icon", icon]] and nothing else -- so saving a community icon silently wiped that community's brand color, and vice versa. The single-scalar design was safe; adding a second scalar to the same replace-command made cross-field data loss the default path through the settings UI. Write each field only when its own tag is present. An empty value still clears that one field, which keeps "remove my icon" working. Also wire the brand color to something: it set --buzz-brand-color, which nothing in the repo read. It now feeds applyAccentColor, so a community brand overrides the personal accent swatch while that community is active, and the existing accent machinery handles contrast. - relay_admin.rs: tag-presence-gated writes; correct the comment that claimed atomicity two sequential UPDATEs do not provide. - relayBrandColor.ts: return the resolved color so the caller can adopt it; an aborted fetch returns null so a stale tenant cannot win. - ThemeProvider.tsx: hold the brand color in state and give it precedence over the user accent. - Tests: a regression test that fails on the replace semantics, plus ThemeProviderBrandColor.test.mjs covering the React layer -- the relayUrl effect, the abort cleanup, and the precedence rule. All three mutants (abort cleanup, precedence, adoption) now die; they survived every pre-existing suite.
Independent review + fix (commit
|
🧪 Jev PR-Triage (v3)PR #30: [lenny] integrate REG-10: per-community brand color (NIP-11 buzz_brand_color, migration 0048) — verdict: BLOCK
🔍 Reviewer focus
Block reason (if any): |
Documented sole-approver exceptionMerging with the fix author as sole approver, authorised by Michael (2026-09-19, "Yes merge and do all of these"). Fork collaborators = [mfethe1] only, so no second reviewer exists; Pattern B two-agent signoff is unsatisfiable here. Evidence at merge time, head
|
What changed
buzz_brand_colorin the NIP-11 document — host-scoped, no cross-tenant leak (conformance A≡B proof extended).relayBrandColor.tsapplies the relay-advertised color as a composable custom property; 202-line test module.relay_admin_action_lease, 0047 contested by upstream feat(desktop): report private per-Desktop runtime capabilities block/buzz#7333.Merge resolution (feat/REG-10 6e1565f × product/main adeec6e)
runtime/migration.rs: count 45→46; brand test retargeted to version 48; include_str path depth fixed for the runtime/ move.nip11.rs:RelayInfo::buildmerged to 8 params (brand_color 3rd; trunk's admin_api kept 7th); all 16 test call sites updated; trunk's admin_api test suite preserved intact.Evidence (run 99, 2026-09-10)
provenance context follows exact local inventory...) fails IDENTICALLY on baseline → zero regressions; 12 new brand-color tests greencommunity_brand_color_is_additive_and_mirrored_in_desired_statepasses on the merged treeSensitive paths (owner merge required — never self-merge)
migrations/0048_community_brand_color.sql(schema),schema/schema.sql,crates/buzz-db/src/store/community.rsrelay_admin.rs), pre-auth NIP-11 exposure (nip11.rs)UNVERIFIED
Merge commit: 129a3ec (integration/reg10-brand-color-run99). Authored locally (REG-10 branch authored by lenny/claude-loop, adopted per owner resolve).