Skip to content

remove the top-level forwarding packages - #220

Merged
adssib merged 9 commits into
mainfrom
pl2-toplevel
Nov 21, 2026
Merged

adssib merged 9 commits into
mainfrom
pl2-toplevel

Conversation

@adssib

@adssib adssib commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #219

Part of #171

What this changes

Deletes the top-level forwarding packages: plugin/, event/, fetch/, migrate/, kit/ (with kit/kittest/), retire/, sdkguide/. Nothing in the repo imports them. The top level is now core/ plugins/ cmd/ internal/ docs/ providers/ contract/ scripts/ .github (internal/pluginlist is real code: the list's builder for cmd/list-plugins). AGENTS.md and the docs no longer mention them; the PR template's metadata box names kind and packages.

Last in the stack on purpose: code pinned to v0.3.0 is unaffected (it pins a tag); the hosted ingestion service already imports core/* on its bump branch, so the next release breaks nothing it uses. The merged kinds' old paths (plugins/removedmembers, apichangelog, retirements, retirements/retire, feed, eol) stay as forwarders: its tests import them.

Checks

  • make check passes (tidy, build, gofmt, vet, import allowlist, net/http guard, go test -race, no TODO(new-plugin), leak guard); make contract against patch-it's main fixtures passes (11 files).
  • Goldens: no golden changed

Related PRs

🤖 Generated with Claude Code

plugin/, event/, fetch/, migrate/, kit/ (and kit/kittest/), retire/ and
sdkguide/ only forwarded to core/ and plugins/. Code importing them moves
to core/plugin, core/event, core/fetch, core/migrate, core/kit,
plugins/notices/retire and plugins/migrationguide/sdkguide.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adssib <[email protected]>
@claude

claude Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Claude finished @adssib's task in 48s —— View job


✅ Ready to merge. This PR only deletes code that nothing imports and updates the docs to match. Build, vet, gofmt, tests and the leak guard all pass.

Rules

Rule Status Evidence
Plugin list / metadata (Rule 1) ✅ N/A No source was added or changed, and no hand-kept list came back. The PR template's metadata box now names kind and packages. Both are real fields (core/plugin/provider.go:100, :117).
Provider page ✅ N/A No provider was added or changed.
Golden test and quote ✅ N/A No golden file changed.
Drop test ✅ N/A No plugin changed.
Fetch only via env ✅ No plugin code changed.
Nothing private (Rule 2) ✅ The diff, commit message and PR body have no secrets, internal names or private links. The PR body says "the hosted ingestion service", as AGENTS.md asks.

Bugs

None found. Nothing in the repo still imports the deleted packages:

  • No Go import of github.com/patch-it-dev/patch-it-plugins/{plugin,event,fetch,migrate,kit,retire,sdkguide} is left.
  • The Makefile, scripts/ and the workflows don't reference the deleted directories.
  • The forwarders this PR keeps (plugins/removedmembers, apichangelog, retirements, feed, eol) still build and pass their tests.

Verified

  • go build ./...: OK
  • go vet ./...: OK
  • gofmt -l .: printed nothing
  • go test -race ./...: every package passed, including internal/pluginlist, cmd/new-plugin and the remaining forwarders
  • python3 scripts/leak_guard.py --all: "no banned terms (8 hashed terms checked)"
  • I did not run make contract; this checkout has no patch-it repo next to it.

Non-blocking

  • Two docs still name the removed directories:
    • contract/README.md:3 says "event/ is its Go binding. event/ and migrate/ test against these files". These should now be core/event/ and core/migrate/.
    • docs/README.md:8 says "fetching through env.Get and kit/". Consider core/kit/.
  • The review workflow's prompt (.github/workflows/claude-code-review.yml:112) also says kit/. It's harmless, and a bot can't edit workflow files anyway; a maintainer could change it to core/kit/ some time.

adssib and others added 8 commits November 20, 2026 18:27
- core/event: the v1 ChangeEvent, its fingerprint and core/migrate are gone;
  every reader builds event.Event (was EventV2) directly. api_operation's
  kind type is event.Kind.
- A source's plugin is named by its id, provider/source, and its events
  carry that id in api. The old slugs, Alias/Aliases/first_name, Register
  by slug and Lookup by slug are gone; RegisterProvider refuses a plugin
  whose Name isn't its source's id. plugins.json drops alias, first_name
  and aliases.
- Replay, Replayer and Spec.Replay are gone: a version pair is ReadAt
  twice and Extract (kittest.Pair in tests). catalog gains ListVersions,
  ReadAt and Extract, so every kind is read version by version.
- new-plugin: --format, --api and the old meanings of --provider and
  --source are gone; files are named <provider>-<source>.

Goldens regenerated on purpose: api is now the source id, and since the
fingerprint hashes api, every fingerprint changed with it. Checked with a
script: old and new goldens are identical once api and fingerprint are
set aside (three normalize goldens also move from v1's affected to
subject). Two notices goldens are renamed to their id
(cloudflare-api.json, google-vertex-ai-models.json).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adssib <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adssib <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adssib <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adssib <[email protected]>
Base automatically changed from pl2-scaffold to main November 21, 2026 00:57
@adssib
adssib merged commit 8cfe96f into main Nov 21, 2026
8 checks passed
@adssib
adssib deleted the pl2-toplevel branch November 21, 2026 00:57
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