镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(mobile): find verified people who have no profile - #9086

Merged
loganj merged 2 commits into
mainfrom
loganj/mobile-verified-only-people-search
Nov 5, 2026
Merged

loganj merged 2 commits into
mainfrom
loganj/mobile-verified-only-people-search

Conversation

@loganj

@loganj loganj commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Mobile now finds a person who has a relay-verified profile (NIP-FI, kind 30382) but never published a kind:0 profile. This happens, for example, when someone skips profile setup. The relay's POST /profiles/search already finds such people by their verified name. Each one comes back as a kind:30382 head with no kind:0. Mobile kept only kind:0 results, so these people did not appear.

  • RelaySessionNotifier.searchProfiles keeps kind:30382 heads from the endpoint.
  • VerifiedProfilesNotifier.searched turns a search page into people:
    • If the relay authority is not known yet, it first waits for NIP-11 discovery. Otherwise, a search that finished first would drop these people for that query.
    • It checks each head's signature with the directory's off-isolate proof checker.
    • Proven heads go into the verified directory, so the rows show verified names right away.
  • searchedPeople (in verified_profile.dart) builds one row per person, in the relay's order:
    • If the person has a kind:0, the newest kind:0 is used, as before.
    • If not, it uses the proven head that the authority signed, provided it parses as an active verified profile.
  • These cases add no row:
    • a head signed by another key;
    • a head that names the relay key but has a bad signature;
    • a retraction;
    • a malformed subject.
  • Behavior change for all mobile mentions: every verified person now matches in mention ranking by their verified full name and username, as well as by display name, including people who have a kind:0. The relay's search matches these same three names. Without this, a person whose display name is their username (glilienfeld, full name "Gabi Lilienfeld") came back from the relay for "gabi", and then the local filter dropped them.
  • Callers:
    • Mention search, which also serves Add members and New DM.
    • The user rows in global search, through directoryUsersFromSearch.

The desktop app has the same fix for Manage members: block/buzz-app#2554

Screenshots

These come from the real Add members sheet on an Android emulator. Only the relay session, verified-profile discovery and the member actions are faked. The names are made up. Jordan Park has a kind:0. jrivera has only a verified profile, with the full name "Jordan Rivera". The search is "jordan". The row shows the verified display name, which here is the same as the username.

Search finds jrivera After tapping + on jrivera
jrivera is found next to Jordan Park jrivera is selected to add

Tests

  • add_members_sheet_names_test.dart: a journey in which Gabi has display_name = glilienfeld and full_name = "Gabi Lilienfeld", and NIP-11 discovery is slow.
    • While discovery is pending, typing "gabi" shows nothing yet.
    • When discovery finishes, Gabi appears with no further keystroke.
    • A head from another key does not appear, and neither does a head that names the relay key but has a bad signature.
    • Add member adds Gabi's key.
  • I removed each fix in turn: the full-name alias, the signature proof, and the wait for discovery. The journey fails each time, for the expected reason.
  • verified_profile_test.dart: a table of searchedPeople cases.
    • A kind:0 wins over a head, and the newest kind:0 counts.
    • These find nobody: another signer, a retraction, an uppercase subject, a non-profile kind, and any head when the authority is unknown.
  • relay_session_test.dart and channel_management_provider_test.dart: rows for the kept heads and the directory row.
  • flutter analyze is clean, and the full flutter test passes on 6efef79: 4,462 tests.

Note: mobile on main does not compile at e558f15. account_identity_store.dart calls the removed _keys. That fix is #9085. The local runs above had that one-line fix applied but not committed. Until it lands, mobile CI on this PR will fail.

Not covered

  • Search during a reconnect: discovery starts only when the relay session is connected. If an HTTP search succeeds while the session is reconnecting, that search leaves these people out.
  • Discovery failure: if NIP-11 discovery fails, the search also leaves these people out.
  • In both cases the mention cache keeps that partial page for the query, and the next search tries discovery again. People who have a kind:0 show as before. Showing the left-out people when the authority arrives later would need the cached results to be rebuilt; that is a possible follow-up.

🤖 Generated with Claude Code

loganj and others added 2 commits November 4, 2026 22:36
The relay's profile search returns a person's verified head
(kind 30382) when it has no kind:0 for them, but mobile kept only
kind:0, so people who skipped profile setup could not be found by
their verified name in Add members, New DM, mentions or search.

searchProfiles now keeps those heads, and searchedPeople turns a head
that the relay authority signed into a row named by its verified
display name. A head from any other key, a retraction, or a head when
the authority is unknown finds nobody.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Review fixes for verified-only people search:

- Prove each search head's signature with the directory's off-isolate
  checker before it can create a row; a head that claims the relay key
  with a bad signature finds nobody.
- Wait for NIP-11 discovery when the authority is not known yet, so a
  search that settles first no longer drops verified-only people.
- Proven heads name their subjects in the verified directory, and a
  verified person is matched by full name and username as well as display
  name, as the relay search matches them. Gabi (display name glilienfeld,
  full name Gabi Lilienfeld) is now found by "gabi".

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj force-pushed the loganj/mobile-verified-only-people-search branch from 6efef79 to 65372a7 Compare November 5, 2026 03:38
@loganj
loganj marked this pull request as ready for review November 5, 2026 14:00
@loganj
loganj requested a review from a team as a code owner November 5, 2026 14:00
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 6b8a72e8355125d24e4f4fab1e083dced4119f5c...65372a74fba26364e5aa9d765c85b4f1b1fe55da
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete findings in the authorized PR range after tracing search callers, signature verification, authority discovery, community scoping, and event replacement handling.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source and history inspection. Builds and tests were not executed.

Generated by Codex Security Review |
Requested by: @loganj |
Workflow run

@joahg joahg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Read the search path: heads are signature-checked via the proof checker before they produce rows, forged or retracted heads add none, and discovery is awaited first. Looks correct.

@loganj
loganj merged commit c39ee50 into main Nov 5, 2026
60 checks passed
@loganj
loganj deleted the loganj/mobile-verified-only-people-search branch November 5, 2026 23:53
wpfleger96 added a commit that referenced this pull request Nov 6, 2026
…-log-ws-writes

* origin/main:
  fix(mobile): find verified people who have no profile (#9086)
  feat(protocol): define compact membership discovery (BUZZ-615) (#9117)
  perf(db): hydrate search hits with exact event timestamps (#9126)
  perf(db): prune post-commit push enqueue by signed event timestamp (#9128)
  perf(db): use exact event timestamps for transactional deletion (#9130)
  perf(redis): index mesh ready records and share one Redis connection (#9113)
  fix(mobile): delay iOS message actions until a deliberate hold (#9049)
  feat(cli): user status expiry and status read (#8777)
  feat(cli): send a thread message to the channel (#8778)
  feat(relay): add kind 30180 custom emoji entry (#8783)
  feat(cli): read-only unread state (NIP-RS) (#8789)
  feat(cli): report a message to relay moderators (#8829)
  buzz-db: read explicit #h sets one channel at a time (#9110)
  feat(cli): list huddles and their participants (#8830)
  docs(agents): add open-source boundary and drop private repo list (#9114)
  fix(mobile): answer push snapshot bridge calls at user-initiated QoS; report hop latency on callback timeout (#8916)
  test(mobile): lock in invite-page and bare-host community link entry (#9047)
  fix(desktop): keep an own send out of the frozen timeline tail (#9095)
  fix(db): end each table's maintenance transaction before the next (#9096)

Signed-off-by: Will Pfleger <wpfleger@block.xyz>
tellaho added a commit that referenced this pull request Nov 6, 2026
* origin/main: (54 commits)
  release(mobile): push candidate tags as the operator, not the App (#9084)
  test(mobile): check posterless video previews renew the relay assertion (#9144)
  feat(relay): log WebSocket EVENT writes on the access target (#9154)
  perf(db): plan multi-value #d reads with their values (#9131)
  fix(mobile): confirm before starting a Huddle from the header (#9155)
  feat(cli): send NIP-FI evidence via credential chain and Buzz desktop (#8999)
  fix(mobile): find verified people who have no profile (#9086)
  feat(protocol): define compact membership discovery (BUZZ-615) (#9117)
  perf(db): hydrate search hits with exact event timestamps (#9126)
  perf(db): prune post-commit push enqueue by signed event timestamp (#9128)
  perf(db): use exact event timestamps for transactional deletion (#9130)
  perf(redis): index mesh ready records and share one Redis connection (#9113)
  fix(mobile): delay iOS message actions until a deliberate hold (#9049)
  feat(cli): user status expiry and status read (#8777)
  feat(cli): send a thread message to the channel (#8778)
  feat(relay): add kind 30180 custom emoji entry (#8783)
  feat(cli): read-only unread state (NIP-RS) (#8789)
  feat(cli): report a message to relay moderators (#8829)
  buzz-db: read explicit #h sets one channel at a time (#9110)
  feat(cli): list huddles and their participants (#8830)
  ...

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>

This branch was previously deployed

1 inactive deployment
codex-review — 65372a74 Deployed Nov 5, 2026 by loganj via Run Codex Security Review #12824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants