Skip to content

import the plugins - #2

Merged
adssib merged 5 commits into
mainfrom
import
Nov 18, 2026
Merged

adssib merged 5 commits into
mainfrom
import

Conversation

@adssib

@adssib adssib commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

The plugin code arrives: a fresh copy of the 12 source plugins and everything they build on, moved here from patch-it's hosted ingestion service. Module github.com/patch-it-dev/patch-it-plugins, Go 1.27.1, one dependency (gopkg.in/yaml.v3).

plugin/          Plugin, Replayer, Register/Lookup/Names, Env, BaselineReader, Spec, Result (was package "source")
plugins/{openapi,retirements,migrationguide,removedmembers,changelog,feed,all}/
kit/ kit/kittest/  fetch helpers, Wayback citing; the in-memory test sink (Mem) and golden helpers
event/ migrate/    the change-event contract's Go binding (v1 + v2) and the v1 -> v2 conversion
diff/ normalize/ hint/ adapter/   the OpenAPI diff engine and the per-provider spec adapters
retire/ sdkguide/ fetch/
contract/fixtures/ a copy of patch-it's change-event fixtures

Commits

  1. import the plugins from the hosted ingestion service: the copy, with import paths rewritten, source renamed to plugin, one test helper renamed (plugin() → newPlugin(), it clashed with the package), and the two ../../contract/fixtures/ paths in event/ and migrate/ tests now ../contract/fixtures/. Two things were done before this first commit so they never appear in public history: vendor documentation pages in testdata were trimmed (below), and the _comment fields of six contract fixtures were reworded (they described private tooling).
  2. point comments at this repo's paths: comments named the old package paths and private review threads.
  3. add a readme to every testdata dir: URL, date fetched, license, quote.
  4. check the contract fixtures against patch-it: CI_contract + scripts/check_contract.py.
  5. document GITHUB_TOKEN and drop the under-construction notes.

Goldens are byte-identical

All 23 golden files (plugins/*/testdata/golden/*.json, normalize/testdata/golden/*/*, and the change-events-v2*.json fixtures that migrate/event regenerate with -update) were compared with cmp against the source they were copied from: 23 identical, 0 different. No test runs with -update.

Testdata trimmed (vendor docs pages only)

File Before After Kept
hint/testdata/polymorphic-billing-cycle-anchor.md 13,177 1,391 title, "What's new", "Changes → REST API" table
hint/testdata/remove-payment-method-types-checkout-sessions.md 17,467 2,603 same
hint/testdata/removed-payto-fields.md 14,023 1,333 same
hint/testdata/removes-the-payment-method-types-parameter-from-payment-intents-and-setup-intents.md 18,901 2,711 same
hint/testdata/trial-offer-ga.md 26,484 4,564 same
retire/testdata/openai-deprecations.md 39,338 10,445 each retirement table naming a text model, with its heading
retire/testdata/anthropic-deprecations.md 14,238 3,512 same
plugins/feed/testdata/github-changelog-actions.rss.xml 43,596 11,825 channel header + the 3 items the reader acts on

Every kept line is copied unchanged. Each trim was checked by parsing the full and the trimmed copy with the real parser (hint.Parse, retire.Parse, Feed.Findings) and comparing the results with reflect.DeepEqual: identical, so no golden changed. Openly licensed files are kept whole (Textual, urllib3, anthropic-sdk-python, NumPy, the Vertex AI Atom feed, and the Datadog / GitHub / GitLab spec excerpts, which were already minimal). hint/testdata/endive.md was already a trimmed index.

CI_contract

Clones patch-it-dev/patch-it anonymously (no token, no credential helper) on PRs, merge queue and weekly (Mon 05:17 UTC), and fails when contract/fixtures/ holds different events from its fixtures/change-events*.json. Top-level _comment fields may differ (that's where this copy is worded for a public repo); everything else is compared as parsed JSON. patch-it isn't publicly readable yet, so until it is, the job sees a 404 and passes with a notice. Locally both copies match: contract/fixtures matches patch-it's fixtures/ (11 files).

Checklist

  • Added to / updated in docs/plugins.md. Not applicable: the 12 rows are already there and match the registry (plugins/all registers exactly anthropic, anthropic-models, datadog, github, github-actions, gitlab, numpy, openai-models, stripe, textual, urllib3, vertex-ai-models). The rows link to provider pages in the follow-up PR.
  • Every commit is signed off (git commit -s, DCO)
  • Golden test over a real saved copy of the source: every plugin's, unchanged
  • testdata/README.md in every testdata dir: URL, date fetched, license, quote
  • One pinned drop test: as before (e.g. TestUnsureEntriesAreDropped, TestOnlyTextModelsCodeSendsAreKept)
  • providers/<api>.md: in the follow-up PR (stacked on this one)
  • Fetches only through env.Get / kit/: the net/http guard passes locally (only fetch/, kit/, adapter/ import it)
  • go build ./... && go vet ./... && gofmt -l . && go test -race ./... pass locally; go mod tidy leaves no diff; the import allowlist passes (only this module + gopkg.in/yaml.v3)
  • Nothing private: python3 scripts/leak_guard.py --all and --diff origin/main HEAD: no banned terms. A pattern grep for common token formats found nothing. gitleaks wasn't available locally; CI_leak_guard runs it.

Notes for the reviewer

  • Contract fixtures' _comments differ from patch-it's (six files). patch-it's own copies still carry the original wording, which should be reworded there too before patch-it goes public.
  • GITHUB_TOKEN (optional) is the only environment variable read: the adapters send it to the GitHub API when looking up release tags. Documented in the README.
  • There is no saved Stripe OpenAPI spec in testdata: Stripe's tests use small inline specs.
  • After merge, a maintainer tags v0.1.0 from main.

Related PRs

🤖 Generated with Claude Code

adssib and others added 5 commits November 18, 2026 02:54
A fresh copy of the source plugins and everything they build on, laid
out as this module: plugin/ (the interface, registry and Env), the
format plugins under plugins/, kit/ and kit/kittest/, the OpenAPI diff
engine (diff/, normalize/, hint/, adapter/), retire/, sdkguide/,
event/, migrate/, fetch/ and the contract fixtures.

Import paths are rewritten for this module; the package that was
called source is now plugin. Vendor documentation pages in testdata are
trimmed to the parts the tests read, and the contract fixtures'
_comment fields are reworded for a public repo. No golden file changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Comments named the old package paths and the hosted service's private
review threads; they now name this repo's packages and "patch-it's
hosted ingestion service". The source package's file is plugin.go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Each saved source now lists its URL, the date it was fetched, its
license and a short quote. Vendor documentation pages say they are
excerpts for testing and what was left out of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
CI_contract clones patch-it anonymously (no token) on every PR and
weekly, and fails when contract/fixtures holds different events from
patch-it's fixtures/. Top-level _comment fields may differ. While
patch-it isn't publicly readable the check passes with a notice.

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>
@adssib
adssib merged commit 3f1aaaa into main Nov 18, 2026
4 checks passed
@adssib
adssib deleted the import branch November 18, 2026 08:04
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