Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
A provider's package says what to read: one provider.go registers the provider and every source of it, whatever the kind, with the kinds' exported types; provider-specific parsing (OpenAPI adapters, feed readers) sits beside it, with its saved pages, goldens and tests. The kinds keep only how to read. Goldens move unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
…a README The pages a provider's sources had (providers/<x>.md, <x>-sdks.md, <x>-*-surface.md...) are one page now, a section per source, all content kept; each kind's testdata README rows move to the provider that owns the files. RegisterProvider fills in each source's page, and a provider is registered once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
new-plugin writes a source into its provider's folder: a new provider.go, page and testdata README for a new provider (and its import in providers/all), or one more source in the existing registration, page and testdata README. Its test scaffolds every kind, the first as a new provider and the rest into it. AGENTS.md, CONTRIBUTING.md, the README, docs/, the PR template, the review prompts and the Release workflow's new-kind check name kinds/ and providers/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
A PR that changes the Claude workflows can't be reviewed by them (the action checks they match main's), so their wording follows separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
|
@claude review |
|
Claude finished @adssib's task in 1m 54s —— View job ✅ Ready to mergeThis is a big refactor, and it's easy to check: every file under
BlockingNone. Non-blocking suggestions
Calls you asked me to check
|
The import-graph test refuses a non-test file importing a test kit (kittest or a kind's <kind>test), so openapitest's net/http stays out of what runs. new-plugin adds a source inside the provider's RegisterProvider call and reads imports from the parsed file. Section titles that read the same on one page say which source they are; testdata READMEs point at the provider's page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
|
@claude review |
|
Claude finished @adssib's task in 47s —— View job
|
| Rule | Status | Evidence |
|---|---|---|
| 1. Registration and metadata, no hand-kept list | ✅ | Same as the first review. I read the retitled sections (anthropic, numpy, textual, urllib3, cloudflare): each title now matches its source. |
| 2. Provider page with a real "Why this source" | ✅ | Same as before. The renamed headings break no links: the one cross-page anchor (urllib3 → #textual-changelog-textualtextual) still resolves. |
| 3. Golden, testdata row, drop test, quotes | ✅ | No golden or saved file changed in this commit. The testdata README rows now point at ../README.md. The stale openai sentence is gone from providers/stripe/testdata/README.md. |
4. Fetch only through env.Get/kit |
✅ | There's now a test for this: providers/all/imports_test.go forbidden refuses a non-_test.go file that imports core/kit/kittest or kinds/**/*test, except from another test kit. |
| 5. Precision over recall | ✅ | Behaviour is unchanged. |
| 6. Nothing private | ✅ | I found nothing private in the new commit. |
Blocking
addSource can panic on a nil *ast.SelectorExpr. See cmd/new-plugin/main.go:595-596:
sel, ok := call.Fun.(*ast.SelectorExpr)
if pkg, isIdent := sel.X.(*ast.Ident); !ok || ...Go runs the if statement's init, sel.X.(*ast.Ident), before it checks !ok. So when a call's Fun is a plain identifier (append(...), len(...), make(...), specs()), sel is nil and sel.X panics.
This doesn't happen today, and only by luck of ordering. ast.Inspect stops looking once it has found Sources, so only calls that come before plugin.RegisterProvider are reached, and every current provider.go starts with func init(). (Algolia's append(specs(), …) sits inside the call, and the closure returns false before visiting it.) But if a provider adds a package-level var x = make(...), or a helper with an append above init, then make new-plugin --provider <it> crashes instead of adding the source. The fix is to check ok first:
sel, ok := call.Fun.(*ast.SelectorExpr)
if !ok {
return true
}
if pkg, isIdent := sel.X.(*ast.Ident); !isIdent || pkg.Name != "plugin" || sel.Sel.Name != "RegisterProvider" || len(call.Args) != 1 {
return true
}It would also help to add a case to cmd/new-plugin/main_test.go where the existing provider.go has a var _ = len("") (or a helper calling append) above init, so this stays fixed.
Non-blocking suggestions
testKitmatches by suffix. Underkinds/, it treats any package whose last element ends intestas a test kit. That includeskinds/x/latestorkinds/x/contest. A real reader with a name like that would be wrongly blocked from non-test code. Matchingbase == path.Base(path.Dir(pkg))+"test"(the<kind>testconvention) would be exact. That would meankinds/openapi/openapitestandkinds/notices/noticestest, whilekinds/apisurface/apisurfacetestandkinds/migrationguide/migrationguidetestsit directly under their kind, so they match too.- From the first review, still open: merge review prompts: kinds/ and providers/<provider>/ #248 (the stale review prompts) soon after this, and add a follow-up for GitLab's missing golden (this was already true on
main).
Changes since the first review
- ✅ Test kits are now limited to tests by a rule in the import-graph test.
- ✅
addSourcenow looks inside theplugin.RegisterProvidercall (but see the blocking bug above), andaddImportreads imports from the parsed file instead ofbytes.Contains. - ✅ Duplicate section titles now name their source ("…'s public API", "NumPy migration guides"). The
anthropic/modelsknown-gaps line now says "source". - ✅ The testdata README leftovers are fixed, and the rows point at the provider's page.
addSource read sel.X before checking the type assertion, so a provider.go with a plain call (append, make) above its registration would panic; a test pins it. A test kit is kinds/<kind>/<kind>test exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
|
@claude review |
|
Claude finished @adssib's task in 24s —— View job ✅ Ready to mergeCommit 660d4b2 fixes the blocking bug from the second review and takes the
BlockingNone. What the fix does
Non-blocking suggestions
Thanks for the careful work across three rounds. The PR description's migration table will make the bump easy for patch-it's hosted ingestion service. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Splits how to read from what to read (approved by Adib, 2026-11-21).
plugins/is gone. No forwarders, no folder per source.providers/_template.mdis nowdocs/provider-template.md(a page with a section per source).Commits
move the kinds from plugins/ to kinds/: a pure move.move each provider's sources into providers/<provider>: registrations, provider-specific code (the 17 OpenAPI adapters with their Diff/Keep, the feed readers, the retire/eol pages, the changelog/guide/package values), their tests, saved pages and goldens. The kinds export what providers build with (openapi.DeprecationsOnly,openapi.RequestSide,adapter.Releases/Commits/Daily/BasePathPointer/…,changelog.SDK,changelog.Pins,apisurface.PyPI/NPM/NPMPackage,feed.Marked/Dated/Excerpt/ListItem,catalog.Commands.ListingURL,members.Guide.TagOf/CommitsURL); shared test helpers arekinds/<kind>/<kind>testpackages.RegisterProvidernow refuses a second registration of a provider and fills in each source's page.one page per provider: providers' pages merged intoproviders/<provider>/README.md, testdata README rows moved to the provider that owns the files.scaffold into providers/<provider>, and say so in the docs:cmd/new-pluginwrites a new provider's folder (provider.go, README.md, testdata README, import in providers/all) or adds a source to an existing provider'sprovider.go/page/testdata README; its test scaffolds every kind, the first as a new provider and the rest into it. Makefile, AGENTS.md (layout + rules), CONTRIBUTING.md, README, docs/how-it-works.md, docs/writing-a-plugin.md, docs/which-kind.md, docs/plugins.schema.json (page pattern), PR template, CI_go's comment, and release.yml's new-kind check (kinds/).leave the review prompts to their own pr: the Claude review action refuses to run on a PR whose Claude workflow files differ frommain's, so the two review prompts' wording is in review prompts: kinds/ and providers/<provider>/ #248, stacked on this one.keep test kits in tests; tidy the merged pages(after the first review): the import-graph test refuses a non-test file importing a test kit (kittest or a kind's<kind>test), soopenapitest's net/http can't reach code that runs;new-pluginadds a source inside the provider'sRegisterProvidercall and reads imports from the parsed file; same-titled sections on one page now say which source they are; testdata READMEs point at the provider's page.new-plugin: skip calls that aren't a selector; test kits by name(after the second review): a nil-pointer panic inaddSourcewhen a plain call sits above the registration (with a regression test), andtestKitmatcheskinds/<kind>/<kind>testexactly.Behaviour is identical
origin/main(plugins/**/testdata/golden/*) with its new path:75 goldens on origin/main, 75 under providers/, 0 missing or different, 0 new. Every golden test passes against them unchanged.go run ./cmd/list-plugins, before vs after: identical except each source'spage(160 changed lines, every one apage), which now points at its provider'sproviders/<provider>/README.md;docs/plugins.schema.json's page pattern follows.make checkgreen locally (go1.27.1): tidy, build, gofmt, vet, import allowlist, net/http guard (nowcore/fetch,core/kit, and the openapi test kit, which serves recorded responses over httptest),go test -race, todos, leak guard.Needs a minor release
Import paths change, so the first release after this is a minor (v0.7.0), by hand. The scheduled run skips on its own: every
kinds/directory is new against v0.6.0.For patch-it's hosted ingestion service, on its next bump
plugins/allproviders/allplugins/<kind>(openapi, changelog, notices, catalog, migrationguide, apisurface) and their subpackages (openapi/adapter,notices/{retire,feed,eol},migrationguide/{sdkguide,members},apisurface/{pysurface,dtsurface})kinds/<kind>/…, same nameschangelog.MongoDBAtlasmongodb.AtlasAdminAPI(providers/mongodb)sdkguide.Anthropicanthropic.PythonSDK(providers/anthropic)members.NumPy,members.NewRelic,members.PostHognumpy.Numpy,newrelic.PythonAgent,posthog.PythonSDKretire.OpenAI,retire.Anthropic,retire.Gemini,retire.Vertexopenai.Models,anthropic.Models,google.GeminiModels,google.VertexModelRetirementsfeed.GitHubActions,feed.VertexAIModels,feed.CloudflareAPIgithub.Actions,google.VertexAIModels,cloudflare.APIeol.Salesforcesalesforce.RESTAPIcatalog.Redis,catalog.GitHubGraphQLredis.Commands,github.GraphQLchangelog.Textual,changelog.Urllib3,changelog.Stripe*,changelog.Sentry*,changelog.Cloudflare*,changelog.Octokit*,changelog.PostHogGo,changelog.RedisIoredistextual.Textual,urllib3.Urllib3,stripe.Python/Node/Go/Java/Ruby/Dotnet/PHP,sentry.PythonChangelog/JavascriptChangelog/Go/Dotnet,cloudflare.Typescript/Python/Go/Terraform,github.OctokitRest/OctokitNet,posthog.Go,redis.Ioredisapisurface.<Provider><Pkg>(OpenAIPython,StripeNode, …)<provider>.<Source>(openai.PythonSurface,stripe.NodeSurface,google.GenaiPythonSurface,datadog.DdtracePythonSurface, …)adapter.<Provider>(OpenAPI adapters)<provider>.<Provider>(stripe.Stripe,mongodb.MongoDBAtlas, …)plugins/<kind>/testdata/(and<reader>/testdata/)providers/<provider>/testdata/(goldens keep their file names, inproviders/<provider>/testdata/golden/)plugins.jsonpage:…/providers/<name>.md…/providers/<provider>/README.mdAnything that reads the module's goldens or saved pages finds them under
providers/<provider>/testdata/now (providers/*/testdata/golden/*.json).Calls I made (please check)
catalog.Commands(Redis) andcatalog.UpcomingChanges(GitHub GraphQL) andchangelog.Log(MongoDB's JSON changelog) are readers of a shape, andKindOfnames a source's kind by the package its plugin type is in: moving the types to providers would changekindin plugins.json. Only their values (redis.Commands,github.GraphQL,mongodb.AtlasAdminAPI) moved.stripe.Python,stripe.PythonSurface): two kinds'StripePythonwould otherwise collide in one package.retire'sacmepage,catalog'sgraphql).sdkguideandmigrationguidehave no tests of their own left: every one read Anthropic's guide.openapitest,changelogtest,noticestest,migrationguidetest,apisurfacetest), not copies in 26 providers.openapitestusesnet/http/httptest, so the net/http guard allows it by name.RegisterProviderpanics on a second registration of a provider (it used to merge per-kind registrations);Source.Pageis filled in (providers/<id>/README.md), a hand-set value must match.providers/all(a Go test, no new CI step), tests included.new-plugin); none exists today.Related
I read the merged provider pages and the registrations' words; nothing was reworded beyond paths and the identifiers that moved.
🤖 Generated with Claude Code