Skip to content

Port identity services changes from identity-services PR #11#19

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-identity-services-code
Draft

Port identity services changes from identity-services PR #11#19
Copilot wants to merge 2 commits intomainfrom
copilot/update-identity-services-code

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 31, 2026

Syncs the identity services copy in this repo with upstream identity-services#11.

MongoDB indexes

  • Added targeted indexes on txid+outputIndex (unique), certificate.serialNumber, subject, certifier, compound subject+certifier, subject+type, userName, and userName+certifier

Pagination

  • Added limit and offset to IdentityQuery type, threaded through all lookup → storage manager find paths via findRecordWithQuery

Query flexibility

  • certifiers no longer required for attributes, identityKey, or certificateTypes queries — now optional filters

Search improvements

  • getFuzzyRegex now tokenizes by word instead of character (reduces catastrophic backtracking on longer inputs)
  • normalizeSearchInput trims and collapses whitespace
  • userName attribute uses exact match instead of fuzzy regex
  • any attribute uses $text index search for queries >2 chars, regex fallback for 2-char queries, rejects <2 chars

Allocation reduction

  • ProtoWallet('anyone') cached as class-level property in both IdentityTopicManager and IdentityLookupService instead of per-call/per-output instantiation
  • data array built with for...of + push instead of reduce with spread

Copilot AI linked an issue Mar 31, 2026 that may be closed by this pull request
- Add targeted MongoDB indexes for performance
- Add limit/offset pagination support to all find methods
- Make certifiers optional in query conditions
- Improve fuzzy search with normalizeSearchInput
- Cache ProtoWallet('anyone') as class property
- Optimize data array construction in TopicManager

Agent-Logs-Url: https://github.com/bsv-blockchain/overlay-express-examples/sessions/ac051fc4-3093-49a8-ab76-b332d1661af8

Co-authored-by: sirdeggen <8416253+sirdeggen@users.noreply.github.com>
Copilot AI changed the title [WIP] Update identity services to match upstream changes Port identity services changes from identity-services PR #11 Mar 31, 2026
Copilot AI requested a review from sirdeggen March 31, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identity Services PR fall behind

2 participants