Skip to content

Rename the format plugin crates: forge-format-api and FormatSpec - #896

Merged
schmitch merged 1 commit into
mainfrom
claude/rename-format-spec
Nov 4, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/rename-format-spec

Conversation

@schmitch

@schmitch schmitch commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

No issue asks for this. It follows #884: formats are crates linked into the server, not plugins, so the names now say so.

Renamed

Before After
crates/plugin-api (forge-plugin-api) crates/format-api (forge-format-api)
trait FormatPlugin FormatSpec
crates/plugin (forge-plugin) gone: folded into forge-core
forge_plugin::PluginFormat, UploadFormat forge_core::format::SpecFormat, UploadFormat
forge_plugin::descriptor::check forge_core::format::descriptor::check
server module plugins (plugins.rs) formats (formats.rs)
registry plugin(), plugins(), with_plugin(s), images_plugin() spec(), specs(), with_spec(s), images_spec()
tests/plugin_contract.rs tests/format_contract.rs
"format plugin" in comments, docs and AGENTS.md "format" or "format crate"

Folding the adapter into forge-core is safe: core already depended on the contract crate. Core's tests also no longer need the dev-dependency cycle through forge-plugin.

AGENTS.md's rule "no crates/format-<id>" now says that crates/format-api is the contract, not a format. docs/format-plugins.md also drops its last "Contract 0.4.0".

Changes visible outside the code

  • A format's internal error answers format failed instead of format plugin failed. That text is not part of any client protocol, and no test asserts it.
  • One warning log line, about a manifest summary that isn't a JSON object, names the format under format instead of plugin.

Kept on purpose

  • The telemetry surfaces plugin_npm, plugin_raw and plugin_other, with plugin_surface and Surface::Plugin*. docs/deployment.md documents these metric values, and dashboards and alerts select on them; the doc comment now says why they keep the name.
  • The file name docs/format-plugins.md, now titled "Format crates". CHANGELOG.md links to it and to its #files-formats and #images-formats anchors, and changes never edit CHANGELOG.md.
  • Other projects' plugins: nuget-plugin-forge (NuGet's credential provider), the config test of the removed [plugins] section, Vite's and Verdaccio's plugins, and the CSP's "no plugins".

Checks

Rebased on main at 388fb93, after #881, #895, #897 and #890:

  • the names those added (summary_caps, FilePackage, the streamed index building) are renamed too;

  • Remove unused code and dependencies #890's dependency removals are kept.

  • cargo fmt --all --check passes.

  • cargo clippy --workspace --all-targets -- -D warnings passes; it builds every integration test too.

  • Unit tests pass with --locked:

    • forge-format-api, the five format crates and forge-telemetry: 317 passed;
    • forge-core --lib: 373 passed;
    • forge-server --lib: 291 passed;
    • format_contract::the_probe_is_a_valid_format: passed.
  • Web: tsc --noEmit passes, and Vitest passes (625 tests).

  • cargo xtask docs --check and cargo xtask changelog --check pass.

  • Not run locally: the server and core integration tests, which need Postgres and S3. CI runs them, and they were green on the previous head.

🤖 Generated with Claude Code

https://claude.ai/code/session_012e6DJXVot5LKkJJWpxY1bT

@schmitch
schmitch added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 4, 2026
@schmitch
schmitch force-pushed the claude/rename-format-spec branch 3 times, most recently from 2b9b05b to 4f7d2c6 Compare November 4, 2026 07:01
@schmitch
schmitch enabled auto-merge November 4, 2026 07:02
Formats are crates linked into the server, not plugins, so the names say
so:

- `crates/plugin-api` (`forge-plugin-api`) is `crates/format-api`
  (`forge-format-api`), and its trait `FormatPlugin` is `FormatSpec`.
- `crates/plugin` (`forge-plugin`) is gone: its adapter, `PluginFormat`,
  is `forge_core::format::SpecFormat`, and its descriptor checks are
  `forge_core::format::descriptor`. forge-core already depended on the
  contract crate, and its tests no longer need a dev-dependency cycle.
- The server's `plugins` module is `formats`, its registry's
  `plugin(s)`/`with_plugin(s)`/`images_plugin` are `spec(s)`,
  `with_spec(s)`, `images_spec`, and `tests/plugin_contract.rs` is
  `tests/format_contract.rs`.
- Comments, docs and AGENTS.md say "format" or "format crate". The
  internal-error text and one log line follow ("format failed", the field
  `format`).

Kept: the telemetry surfaces `plugin_npm`, `plugin_raw` and
`plugin_other`, which dashboards and alerts select on, and the file name
of docs/format-plugins.md (now titled "Format crates"), which CHANGELOG.md
links to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJXVot5LKkJJWpxY1bT
@schmitch
schmitch force-pushed the claude/rename-format-spec branch from 4f7d2c6 to 455ed56 Compare November 4, 2026 07:28
@schmitch
schmitch added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 630064e Nov 4, 2026
24 checks passed
@schmitch
schmitch deleted the claude/rename-format-spec branch November 4, 2026 07:53
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.

2 participants