Skip to content

api/profile queries - #10

Open
Kzoeps wants to merge 6 commits into
api/actor-follow-queriesfrom
api/profile-queries
Open

Kzoeps wants to merge 6 commits into
api/actor-follow-queriesfrom
api/profile-queries

Conversation

@Kzoeps

@Kzoeps Kzoeps commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Why

How to test

Checklist

  • This PR targets dev
  • Every commit is signed off (git commit -s)
  • cargo fmt and cargo clippy pass locally (or the change doesn't touch Rust)
  • Tests are added or updated where it makes sense
  • Docs are updated if behavior changed

Summary by CodeRabbit

  • New Features
    • Added public profile lookup by DID or handle, profile listing with actor filters and pagination, and profile search by display name or description.
    • Profile lookup supports handle resolution through a configurable HTTPS resolver.
  • Documentation
    • Added setup and installer guidance for profile queries, including resolver configuration and requirements.

@Kzoeps
Kzoeps added this pull request to stack #8 September 28, 2026 15:18
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d9b08cb2-881f-4d5f-8103-dab43eccb897

📥 Commits

Reviewing files that changed from the base of the PR and between 51b54ba and f35682a.

📒 Files selected for processing (24)
  • hypercerts-api/.luacheckrc
  • hypercerts-api/README.md
  • hypercerts-api/lexicons/app.certified.actor.getProfile.json
  • hypercerts-api/lexicons/app.certified.actor.getProfiles.json
  • hypercerts-api/lexicons/app.certified.actor.listProfiles.json
  • hypercerts-api/lexicons/app.certified.actor.searchProfiles.json
  • hypercerts-api/lua/endpoints/getProfile.lua
  • hypercerts-api/lua/endpoints/getProfiles.lua
  • hypercerts-api/lua/endpoints/listProfiles.lua
  • hypercerts-api/lua/endpoints/searchProfiles.lua
  • hypercerts-api/lua/shared/profile.lua
  • hypercerts-api/lua/shared/profileList.lua
  • hypercerts-api/lua/shared/profileLookup.lua
  • hypercerts-api/lua/src/getProfile.lua
  • hypercerts-api/lua/src/getProfiles.lua
  • hypercerts-api/lua/src/listProfiles.lua
  • hypercerts-api/lua/src/searchProfiles.lua
  • hypercerts-api/manifest.json
  • hypercerts-api/modules/profile/manifest.json
  • hypercerts-api/tooling/build-lua.test.js
  • hypercerts-api/tooling/installer.js
  • hypercerts-api/tooling/lua-bundles.js
  • hypercerts-api/tooling/profile-installer.test.js
  • hypercerts-api/tooling/profile.test.js

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4c70766a-f21e-4b4c-b637-3defc231a2f4

📥 Commits

Reviewing files that changed from the base of the PR and between 7815c67 and 51b54ba.

📒 Files selected for processing (21)
  • hypercerts-api/.luacheckrc
  • hypercerts-api/README.md
  • hypercerts-api/lexicons/app.certified.actor.getProfile.json
  • hypercerts-api/lexicons/app.certified.actor.listProfiles.json
  • hypercerts-api/lexicons/app.certified.actor.searchProfiles.json
  • hypercerts-api/lua/endpoints/getProfile.lua
  • hypercerts-api/lua/endpoints/listProfiles.lua
  • hypercerts-api/lua/endpoints/searchProfiles.lua
  • hypercerts-api/lua/shared/profile.lua
  • hypercerts-api/lua/shared/profileList.lua
  • hypercerts-api/lua/shared/profileLookup.lua
  • hypercerts-api/lua/src/getProfile.lua
  • hypercerts-api/lua/src/listProfiles.lua
  • hypercerts-api/lua/src/searchProfiles.lua
  • hypercerts-api/manifest.json
  • hypercerts-api/modules/profile/manifest.json
  • hypercerts-api/tooling/build-lua.test.js
  • hypercerts-api/tooling/installer.js
  • hypercerts-api/tooling/lua-bundles.js
  • hypercerts-api/tooling/profile-installer.test.js
  • hypercerts-api/tooling/profile.test.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This change adds three public actor-profile queries: direct profile lookup, profile listing, and profile search. The Lua handlers query PostgreSQL, validate filters and cursors, and resolve handles through a configured HTTPS resolver. The manifests, bundles, installer, documentation, and tests are updated for the profile endpoints.

Changes

Actor profile API

Layer / File(s) Summary
Profile query contracts and shared validation
hypercerts-api/lexicons/*Profile.json, hypercerts-api/lua/shared/profile.lua, hypercerts-api/lua/shared/profileList.lua, hypercerts-api/README.md
Adds query declarations and shared validation for profile records, DIDs, URIs, timestamps, actor filters, and pagination cursors. Documents the query inputs and resolver behavior.
DID and handle profile lookup
hypercerts-api/lua/shared/profileLookup.lua, hypercerts-api/lua/endpoints/getProfile.lua, hypercerts-api/lua/src/getProfile.lua, hypercerts-api/tooling/profile.test.js
Adds indexed profile lookup by DID or handle. Handle lookup validates the configured resolver URL, calls its com.atproto.identity.resolveHandle endpoint, and queries the indexed self record.
Profile listing and search
hypercerts-api/lua/endpoints/listProfiles.lua, hypercerts-api/lua/endpoints/searchProfiles.lua, hypercerts-api/lua/src/listProfiles.lua, hypercerts-api/lua/src/searchProfiles.lua, hypercerts-api/tooling/profile.test.js
Adds actor-filtered listing and text search with validated sorting and cursor pagination. Tests cover filters, search behavior, ordering, pagination, and invalid requests.
Handler registration and build validation
hypercerts-api/manifest.json, hypercerts-api/modules/profile/manifest.json, hypercerts-api/tooling/lua-bundles.js, hypercerts-api/tooling/build-lua.test.js, hypercerts-api/tooling/profile.test.js, hypercerts-api/.luacheckrc, hypercerts-api/README.md
Registers the profile lexicons, Lua sources, and query scripts. Updates Lua bundle checks, profile module tests, and Lua global declarations.
Resolver setting installation
hypercerts-api/tooling/installer.js, hypercerts-api/tooling/profile-installer.test.js, hypercerts-api/README.md
Adds script-variable listing and creation to the installer. For profile assets, it reads an existing resolver setting or obtains and validates a URL before writing assets. Tests cover installer outcomes and failures.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~50 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant getProfile
  participant HandleResolver
  participant PostgreSQL
  Client->>getProfile: Request profile by actor
  getProfile->>HandleResolver: Resolve handle to DID
  HandleResolver-->>getProfile: Return resolved DID
  getProfile->>PostgreSQL: Query indexed self profile
  PostgreSQL-->>getProfile: Return profile row
  getProfile-->>Client: Return profile or lookup error
Loading

Merge Risk: ⚪ Minimal · up to 51b54

This change adds profile lookup, listing, and search queries, plus installer support for the handle resolver setting. No outstanding defects were found. Profile HTTP validation against a running HappyView instance has not been run yet, which is normal follow-up for this stack.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description retains the template but does not state what changed, why it changed, or how to test it. The checklist is also left unchecked. Complete the What this changes, Why, and How to test sections. Update the checklist to reflect the actual branch, sign-off, test, and documentation status.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 98 functions across 14 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the main change: adding API profile queries. It is concise and related to the changeset, although it is a fragment rather than a full sentence.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 98 functions across 14 files. (7 skipped: 7 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Kzoeps
Kzoeps force-pushed the api/profile-queries branch from efd081a to fa83e5d Compare September 29, 2026 07:25
@Kzoeps
Kzoeps force-pushed the api/profile-queries branch from fa83e5d to 51b54ba Compare September 29, 2026 08:35
@Kzoeps
Kzoeps force-pushed the api/profile-queries branch from 51b54ba to 8faec86 Compare September 30, 2026 05:53
@Kzoeps
Kzoeps force-pushed the api/profile-queries branch from 8faec86 to 30e2247 Compare September 30, 2026 15:17
@Kzoeps
Kzoeps marked this pull request as ready for review October 1, 2026 09:18
@Kzoeps
Kzoeps force-pushed the api/profile-queries branch from 30e2247 to f35682a Compare October 1, 2026 09:18
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

1 participant