Skip to content

fix(dir): add ListTags endpoint - #1877

Merged
csirmazbendeguz merged 1 commit into
mainfrom
fix/tags-api
Jul 24, 2026
Merged

csirmazbendeguz merged 1 commit into
mainfrom
fix/tags-api

Conversation

@csirmazbendeguz

@csirmazbendeguz csirmazbendeguz commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

let's add a ListTags endpoint that will return all catalog tags from the database

we will use this on the frontend instead of extracting tags from the agents

@github-actions

github-actions Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped⏩ skipped✅ passedJul 24, 2026, 11:14 AM

@github-actions github-actions Bot added the size/M Denotes a PR that changes 200-999 lines label Jul 23, 2026
@csirmazbendeguz
csirmazbendeguz marked this pull request as ready for review July 23, 2026 11:23
@csirmazbendeguz
csirmazbendeguz requested a review from a team as a code owner July 23, 2026 11:23
@csirmazbendeguz
csirmazbendeguz force-pushed the fix/tags-api branch 2 times, most recently from 0b2d5ec to 8566d48 Compare July 23, 2026 11:37
@codecov

codecov Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.60000% with 93 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/catalog/v1/ai_finder_service.pb.gw.go 0.0% 46 Missing and 1 partial ⚠️
server/database/gorm/catalog.go 0.0% 40 Missing ⚠️
api/catalog/v1/catalog.go 86.2% 2 Missing and 2 partials ⚠️
server/controller/ai_finder.go 77.8% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Comment thread server/database/gorm/catalog.go Outdated
if err := d.gormDB.
Table("skills").
Select("records.schema_version, skills.name").
Joins("INNER JOIN records ON records.record_cid = skills.record_cid").

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.

IIRC, the data in skills/domain/modules is just an index of the data available in records table. Fetching the data from these tables only means that "there are records that have these skills/domains/modules". Do we really need to join the tables here or we can just fetch? or is this just to get the schema version out?

@csirmazbendeguz csirmazbendeguz Jul 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's for getting the schema version

It's similar to how it's implemented right now, we get the schema version from the record (see catalogTags, mergeSortedTags)

That said, I know it's not ideal. I would suggest normalizing the database like:

skills -> (id, schema_version, name, label)
record_skills -> (record_cid, skill_id)

So skills should store the skills (and each schema version would have their own skills)
And the records <-> skills association is stored in the associative table record_skills

With a normalized db, we wouldn't need JOIN or DISTINCT for this. It's outside the scope of this issue to normalize the database but I'm happy to do it in a follow-up

@csirmazbendeguz csirmazbendeguz Jul 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We've discussed with @paralta and we think there's no reason to include OASF schema version in the tag filters. For example, filtering for "Banking" should include both OASF v1.0.0 and v1.1.0 "Banking" domains. This is better UX

This simplifies these queries as there's no need for JOIN anymore. We will keep including the OASF schema version in the Catalog Entries for now, we will only remove them from the tags

So, for example:

  • tag filter: oasf:*:domains:finance_and_business/banking
  • catalog entry: oasf:1.0.0:domains:finance_and_business/banking or oasf:1.1.0:domains:finance_and_business/banking

Signed-off-by: Bendegúz Csirmaz <[email protected]>

@paralta paralta 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.

LGTM 🚀

@csirmazbendeguz
csirmazbendeguz merged commit 4f1ec1a into main Jul 24, 2026
33 checks passed
@csirmazbendeguz
csirmazbendeguz deleted the fix/tags-api branch July 24, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 200-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(catalog): server-side tag/trusted filtering and pagination for AI Catalog UI

3 participants