Add plugins key to lock file schema - #6303
Merged
Merged
Conversation
Ratify the THV-0080 sibling plugins: key so project-scoped AI-plugin pins can live in the same version-1 lock file as skills, without stripping unknown fields or mixing graphs. Co-authored-by: Cursor <cursoragent@cursor.com>
26 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6303 +/- ##
==========================================
+ Coverage 72.82% 72.88% +0.05%
==========================================
Files 742 742
Lines 77762 77792 +30
==========================================
+ Hits 56632 56696 +64
+ Misses 17155 17104 -51
- Partials 3975 3992 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rdimitrov
approved these changes
Aug 13, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugins:key ontoolhive.lock.yamlbut only ownsversionandskills:. Track: AI-plugin lock file + Sigstore signing #6300 ratifies that contract so project-scoped AI-plugin installs can be pinned in the same version-1 lock file as skills, without bumping the schema (a v2 bump would hard-fail mixed-version teams) and without mixing the two graphs.Lockfile.Plugins []Entry, addsGetPlugin/UpsertPlugin/RemovePlugin(and file-lockedUpsertPluginEntry/RemovePluginEntry), and validatesplugins:as its own name/requiredBy graph. A skill and a plugin may share a name. Unknown top-level fields still round-trip viaExtra; a handwrittenplugins:key graduates out ofExtrainto the typed field.Part of #6300 (AI-plugin lock + Sigstore). Stack 1/5 — schema → lock-service → install-hooks → sync → upgrade. This PR has no consuming callers; wiring into
pluginsvc.Installlands in PR3.Type of change
Test plan
task test—./pkg/skills/lockfilewith race detector; fulltask testalso ran, with pre-existing failures onmaininpluginsvcSSRF/git-ref tests and a streamable-proxy port clash, none in this package)task lint-fix)Table-driven tests cover plugin round-trip load/save, shared names across keys, independent requiredBy graphs, Extra round-trip of unknown top-level fields, and
plugins:graduating from the inline Extra map.Does this introduce a user-facing change?
No — this schema has no callers yet. Plugin lock recording stays behind
TOOLHIVE_PLUGINS_LOCK_ENABLEDin later PRs of the stack.Implementation plan
Approved implementation plan (PR1 slice)
Same
toolhive.lock.yaml, additiveplugins:key, schema version stays 1. Reuselockfile.Entry(including provenance/unsigned). Validate skills and plugins as separate graphs. Keep the package atpkg/skills/lockfile; do not extract. No feature-gate or install hooks in this PR.Special notes for reviewers
Get/Upsert/Removeremain skills-only; the plugin variants are explicitly named so a later caller cannot accidentally pin a plugin intoskills:.requiredByon plugin entries is validated but unused in v1 — pluginrequiresare not materialized yet (Track: AI-plugin lock file + Sigstore signing #6300 follow-up).TOOLHIVE_PLUGINS_LOCK_ENABLED.