fix(registry): P0 follow-ups — type reclassification guard, docs IA, source trust clarity#3539
Draft
bokelley wants to merge 2 commits into
Draft
fix(registry): P0 follow-ups — type reclassification guard, docs IA, source trust clarity#3539bokelley wants to merge 2 commits into
bokelley wants to merge 2 commits into
Conversation
source is not present on /operator response (OperatorAgentSchema has no source field); remove the incorrect claim per pre-PR review finding. https://claude.ai/code/session_01LpZQ7dcUTFgreLrUkKsLht
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #3538
Ships the P0-ready subset from issue #3538 (registry follow-ups from #3495). Migrations 454+455 already landed the member_profiles backfill; this PR addresses the remaining P0 items that were code + docs, not data.
What ships
1. Crawler type reclassification guard (
server/src/crawler.ts:580)Old guard:
!knownTypes.has(agent.url) && inferredType !== 'unknown'— skipped agents that already had any non-unknown type, even a wrong one (the root cause of Bidcliq/Swivel staying asbuying).New guard:
inferredType !== 'unknown' && inferredType !== knownTypes.get(agent.url)— updates the stored type whenever the new inferred type is non-unknown and differs from what's stored. Refuses to downgrade tounknown. Prevents recurrence without needing another one-shot migration.2. OpenAPI tag rename:
"Lookups & Authorization"→"Authorization Lookups"Changed across 4 source files:
registry-api.ts(8 tags + 2 comments),static/openapi/registry.yaml(8 tags + tag definition),scripts/generate-openapi.ts(map key),docs/registry/index.mdx(CardGroup card + section heading + anchor href). Fixes thelookups-%26-authorizationURL slug that was unshareable and unsearchable in Mintlify. Versioned snapshots underdist/are frozen historical artifacts and were intentionally not updated.3. OpenAPI description annotations on
source,member,discovered_fromfields (server/src/schemas/registry.ts)Trust-level semantics added:
sourceexplainsregisteredvsdiscovered;memberclarifies it's present only for registered agents;discovered_fromclarifies it's present only for discovered agents. Annotations placed on the.optional()wrapper — consistent with howsourceis annotated and correct for zod-to-openapi.4. Auth-aware note on
/api/registry/operatorOpenAPI descriptionDocuments the three-tier visibility already implemented in the runtime handler: anonymous → public only; API-access token → adds
members_only; profile owner → addsprivate. Zero runtime change.5.
docs/registry/index.mdx— missing operator/publisher rows + subsectionAdded
/api/registry/operatorand/api/registry/publisherto the Authorization Lookups overview table (they were documented in sub-pages but absent from the overview). Added a short subsection explaining when to call each and the operator endpoint's auth-aware behavior.6. New
docs/registry/registering-an-agent.mdxTwo-path registration table (member direct vs discovered via adagents.json), JSON examples showing
sourcefield differences, what AgenticAdvertising.org membership unlocks, path for non-member agents. Problem 5 Option B (community_agents/self_attested) flagged for human product decision.What's deferred (stays open on #3538)
?source=query param + UI segmentation — author's P1 phasing; additive but requires more UI work.type: 'unknown'agents — needsgroup by discovery_errordata investigation before building retry logic; also needslast_probe_attempt_atschema change.buyingenum question — explicitly out of scope per issue author.Non-breaking justification
All six changes are non-breaking: the crawler guard is a server-internal logic fix with no wire format change; the tag rename affects only the generated docs slug (not any wire field); the schema annotations add optional OpenAPI metadata to existing fields; the operator description change adds documentation to an existing endpoint; the docs changes are additive.
Pre-PR review
Blocker found and fixed: Both reviewers independently flagged that
registering-an-agent.mdxincorrectly claimedsourceappears on the/api/registry/operatorresponse —OperatorAgentSchemahas nosourcefield. Fixed in commit31ece72: sentence now reads "Thesourcefield is returned on every agent inGET /api/registry/agents.".openapi()placement on optional wrapper is correct for zod-to-openapi. Nit: link text inindex.mdx:167could be reworded for readability.OperatorAgentSchemaconfirmed to have nosourcefield; discovered agents are returned unconditionally by/api/registry/agents(no visibility gate), consistent with "public only" trust-level claim in the new docs page.Session: https://claude.ai/code/session_01LpZQ7dcUTFgreLrUkKsLht