Skip to content

add make check and docs/plugins.json - #121

Merged
adssib merged 6 commits into
mainfrom
make-check
Nov 19, 2026
Merged

adssib merged 6 commits into
mainfrom
make-check

Conversation

@adssib

@adssib adssib commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #118

What this changes

One command runs what CI runs, and the plugin list now exists as JSON too.

  • Makefile: make check runs tidy, build, fmt, vet, imports (the allowlist), nethttp (the fetch-layer guard), test (go test -race -count=1), leak-guard (scripts/leak_guard.py --all) and contract. Each is its own target.
  • CI_go calls those same targets, one per step, with the same step names and the same ::error annotations. Triggers, permissions and concurrency are unchanged; no new job or workflow. Local and CI can't drift because there's only one copy of each command.
  • cmd/list-plugins (logic in internal/pluginlist) joins the registry (plugin.Names(), and the format plugin from the package each plugin's type lives in) with the table in docs/plugins.md and writes docs/plugins.json: id, provider, layer, what it watches, format, source URL, status (+ note), provider page. It fails, naming the fix, when a registered plugin has no row, a row has no plugin (unless planned), the format is wrong, the layer or status is unknown, or providers/<id>.md is missing. make plugins-json runs it.
  • go test fails while docs/plugins.json is out of date (TestPluginsJSONIsUpToDate), so make check and CI_go both catch "added a plugin, forgot the docs", with the message "run make plugins-json".
  • docs/plugins.schema.json: a small JSON Schema for the file; a test validates plugins.json against it (a minimal validator for the keywords the schema uses, so no new dependency) and checks its enums match the generator and every format package.
  • docs/plugins.md gets a Layer column (API, SDK, package, runtime, CI, AI models), because the ticket asks for the layer in the JSON and the format plugin doesn't decide it (feed covers CI, AI models and an API). The docs site's sync copies the table whole, so the column shows up there too.
  • Docs: AGENTS.md ("Run make check before you say you're done", rule 1 now says what's checked and what isn't), CONTRIBUTING.md, README ("Run the tests"), docs/writing-a-plugin.md (steps 8 and 9), docs/plugins.md, docs/README.md, and the PR template's checklist line.

Acceptance criteria (#118)

  • make check passes on a clean main and fails when any CI check would fail: it is the CI_go steps, plus the leak guard. (Locally, the gofmt in my Go toolchain flags plugins/openapi/vercel_test.go, which CI's gofmt accepts; I didn't touch that file. CI is the reference.)
  • docs/plugins.json lists every registered plugin (20, after merging main: redis and the three algolia plugins) and validates against docs/plugins.schema.json.
  • Adding a plugin without updating the docs fails make check (and CI_go) with a message naming make plugins-json / the missing row.
  • README and CONTRIBUTING.md mention make check.
  • [~] "Contract fixture checks, same as CI": make contract runs scripts/check_contract.py when given a patch-it checkout (make check PATCH_IT=../patch-it) and is skipped with a note otherwise, as CI_contract skips while patch-it can't be read anonymously. It isn't part of CI_go.
  • [~] Status values: the ticket says "live / in testing / building". Plugins keep their existing statuses (live, paused, planned, defined in docs/plugins.md); "in testing / building" describes layers of patch-it, which belongs in the README, not per plugin.

Checklist

  • docs/plugins.md updated: a Layer column for every row; no plugin added or removed. I compared the 20 registered plugins with the 20 rows (the generator now does this too).
  • Every commit is signed off (DCO)
  • Golden test / testdata / drop test / provider page: not applicable, no plugin changes
  • Fetches only through env.Get / kit/ (no fetching added)
  • make check passes locally (except the known local-gofmt mismatch above)
  • Nothing private

Calls I made (please check)

  • CI_go calls make <target> per step instead of one make check step, so the Actions UI keeps a named step per check.

  • The freshness check is a Go test, not a separate CI step, so CI stays lean and go test ./... alone catches it.

  • Added the Layer column to the public table (visible on docs.patch-it.dev after the next docs build).

  • plugins.json is sorted by id; the table keeps its own order.

  • Layers I assigned: the OpenAPI/apichangelog/Cloudflare plugins API; model retirements and Vertex AI AI models; anthropic (SDK migration guide) SDK; numpy/textual/urllib3 package; github-actions CI; redis runtime (commands removed from the server: the closest layer, please check).

  • Provider pages are per provider, not per id: the three algolia plugins link providers/algolia.md, and the generator accepts any providers/<page>.md the row links to (it must exist).

  • The redis merge dropped apichangelog from the "Format plugin" column description in docs/plugins.md; I put it back next to catalog.

  • plugins list: every plugin in the code is live #122 (redis row → paused) will conflict with the Layer column here; whichever merges second keeps both (the row gets runtime and paused: ...).

  • plugins/all/all.go gofmt fix: since the redis merge, main fails CI_go's gofmt step (the catalog import sorts before apichangelog). This PR sorts it so its own CI can pass; plugins list: every plugin in the code is live #122 fails for the same reason until this or a fix lands.

Related PRs

🤖 Generated with Claude Code

adssib and others added 5 commits November 19, 2026 15:01
make check runs what CI_go runs (CI_go now calls the same Makefile
targets) plus the internal-names check. cmd/list-plugins writes
docs/plugins.json from the registry and docs/plugins.md and fails when
they disagree; go test fails while the json is out of date.

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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
main fails CI_go's gofmt step since the redis merge put catalog first.

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 bcb2506 into main Nov 19, 2026
4 checks passed
@adssib
adssib deleted the make-check branch November 19, 2026 20:28
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.

R1.5 · make check and docs/plugins.json

1 participant