Repository navigation
sources: openapi specs, PyPI and npm API surfaces (combined) - #244
6 commits merged into
Conversation
…spec Three specs committed several times a day, versioned by the day: a spec read from its commits is now one version per day, at the day's last commit (Daily), for every commit-listed adapter, so no version ID is listed twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
|
Claude finished @adssib's task in 1m 41s —— View job Rules
Bugs
Verified
I didn't run Non-blocking
|
| out = append(out, Change{Change: event.PackageRemovedParameter, Kind: old.Kind, Symbol: k, Parameter: op.Name, Before: before, After: after}) | ||
| case now.Params[i].Kind == "args": | ||
| return out | ||
| case op.HasDef && !now.Params[i].HasDef: |
There was a problem hiding this comment.
The event names the wrong parameter when one is inserted in the middle. Comparing by position, old f(a, b?) → new f(a, x, b?) reaches this case at i == 1. b? was optional and x is required, so this emits changed_default with Parameter: "x", and the text says "f's parameter x is no longer optional". But x never existed, so that description is wrong, and the hint ("Pass x…") is misleading.
The call does break, so recall isn't the problem. The problem is the event's wording, which ends up in someone's PR. One fix that keeps precision: emit the event only when the parameter at that position has the same name in both releases, and otherwise emit a note (renames already produce no event, as acme.renamed in TestPositionalParameters shows):
case op.HasDef && !now.Params[i].HasDef && now.Params[i].Name == op.Name:
out = append(out, Change{Change: event.PackageChangedDefault, ...})
case op.HasDef && !now.Params[i].HasDef:
out = append(out, Change{Symbol: k, Note: fmt.Sprintf("%s: parameter %d is now %s, required (was %s, optional)", k, i, now.Params[i].Name, op.Name)})A case like "acme.inserted": f(a, b?) → f(a, x, b?) in TestPositionalParameters would pin it.
Registers anthropic, stripe, google-genai, sentry-sdk, pymongo, redis, numpy, supabase, algoliasearch, elasticsearch, ddtrace, cloudflare, textual and urllib3, each with a golden pair and a drop pair of real releases. openai/python-sdk is now openai/python-surface: anthropic's python-sdk id is its migration guide's, and every API-surface source is named <provider>/<...>-surface. The reader now drops what scanning recent releases of these packages showed to be no removal: a name its module still binds (an alias, an import, a star import or __getattr__ it can't list), a property's setter, self or cls gone, modules named internal or vendor, and an __init__'s imports from outside its own modules. A star import re-exports in any module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
dtsurface reads a tarball's .d.ts, .d.mts and .d.cts files as text (a tokenizer and a parser of declarations, standard library only): every entry point package.json declares, what each exports, and below classes and namespaces their public members, with parameters compared by position. Nothing in the package runs. Registers ten npm sources (openai, @anthropic-ai/sdk, stripe, @google/genai, @sentry/node, mongodb, @redis/client, @supabase/supabase-js, @neondatabase/serverless, convex), each with a golden and a drop pair of real releases. One declaration reachable at several import paths is now one event for both ecosystems, its paths in the subject's symbols. new-plugin's apisurface template takes the ecosystem (an npm: package picks the npm reader). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Under another name it may have been inserted before the optional one, so changed_default (and its wording) applies only when the name is the same. Also: OpenAI's Lister check beside its adapter; the class-by-name gap on the npm pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
|
@claude review Round 2: fixed the inserted-parameter case (a required parameter under another name in an optional one's place is now a note; |
|
Claude finished @adssib's task in 41s —— View job ✅ Ready to merge: the round 1 bug is fixed and tested, and the renames are complete everywhere I looked.
Rules
Round 1 bug: fixed
The BlockingNone. Non-blocking
Not verified hereI can't run the tests from here. |
What this changes
The three stacked PRs in one, for merging into
mainat once:openapi:openai/api,cloudflare/api-spec,mongodb/atlas-admin-spec, each version by version (one version per day, the day's last commit), andadapter.Dailyfor every commit-listed spec.apisurface: 14 more PyPI packages (anthropic, stripe, google-genai, sentry-sdk, pymongo, redis, numpy, supabase, algoliasearch, elasticsearch, ddtrace, cloudflare, textual, urllib3),openai/python-sdkrenamedopenai/python-surface, and a reader that reads fewer false removals.apisurfacefor npm (I19.12): thedtsurfacereader of TypeScript declarations, ten npm packages, one event per declaration.Closes #212
28 new sources in all (
make plugins), each with a golden pair and a drop pair of real versions, a provider page with Why this source, and its testdata listed intestdata/README.md. Details, acceptance criteria and the calls made are in each stacked PR.Release bump needed: minor (a new ecosystem and reader in
apisurface, new fields in its snapshot, a renamed source id).Checklist
testdata/README.mdrowsenv.Get/ the adapter layermake checkpasses locallyRelated PRs
convexorg, consistent with this PR'sconvex/js-surface).🤖 Generated with Claude Code