Add plugin lock-file upgrade - #6317
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## plugins-lock/04-sync #6317 +/- ##
========================================================
- Coverage 73.01% 72.92% -0.10%
========================================================
Files 747 748 +1
Lines 79256 79571 +315
========================================================
+ Hits 57870 58027 +157
- Misses 17278 17409 +131
- Partials 4108 4135 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JAORMX
left a comment
There was a problem hiding this comment.
Panel review found inconsistent plain-name resolution, ambiguous preview API status, and missing required CLI coverage/completion. Please address the inline findings before merge. The transaction fixes requested on the earlier stack PRs also apply to this upgrade path.
9459007 to
eb5e5b4
Compare
eb5e5b4 to
d071d5a
Compare
d071d5a to
f51bf78
Compare
JAORMX
left a comment
There was a problem hiding this comment.
Local-store resolution, E2E coverage, and completion were addressed. The local apply path still drops the artifact/reference needed by persisted state and later sync.
f51bf78 to
f5b5f83
Compare
JAORMX
left a comment
There was a problem hiding this comment.
One merge-blocking stale-plan race remains in the current head.
f5b5f83 to
ace63c0
Compare
JAORMX
left a comment
There was a problem hiding this comment.
Re-reviewed commit ace63c0 against plugins-lock/04-sync. No new line-level findings in this commit. Current failing checks are mostly GitHub action-download 429/503 failures; the stack also inherits blockers from earlier PRs.
ace63c0 to
6eaf5cb
Compare
UpdateRebased onto the sync locking fixes and added local-store restorability in
|
6eaf5cb to
90543bf
Compare
|
Rebased onto current |
90543bf to
60d1ea0
Compare
|
Rebased onto current main over the lower-stack fixes; no code changes needed here this round. |
Re-resolve plugins: lock entries and install newer content via thv ai-plugin upgrade and POST /plugins/upgrade.
Plain-name lock entries now resolve the same way Install does, so a local rebuild is visible to upgrade. Also complete upgrade args from lock entries and cover fail-on-changes in the plugin CLI e2e.
A bare local-store tag must not be rewritten as a Docker Hub digest reference; apply the resolved layer bytes instead.
The DB should keep the local tag while the lock file keeps the previous restorable pin instead of a Docker Hub rewrite.
A stale plan must not resurrect an uninstall or overwrite a newer install of the same plugin.
Sync loads plain-source empty-reference pins by digest, and local upgrades no longer keep a stale remote resolved reference.
60d1ea0 to
d97c97e
Compare
Summary
thv ai-plugin upgradeandPOST /plugins/upgradere-resolve eachplugins:lock entry'ssourceand install newer content when the digest moved (--preview/--allow-ref-change/--fail-on-changes).Sourceis never rewritten.--allow-ref-changeis passed. Signer-change guarding is Stack 2 / PR9 —--allow-signer-changeis not exposed yet.--fail-on-changesstill fetch OCI artifacts to compare digests (RFC: preview is not side-effect-free) but do not write the lock or install.TOOLHIVE_PLUGINS_LOCK_ENABLED(403 when off).Part of #6300. Stack 5/5 — schema → lock-service → install-hooks → sync → upgrade.
Type of change
Test plan
./pkg/plugins/pluginsvcupgrade tests and./pkg/api/v1upgrade endpoint tests, with the Taskfile race/ldflagsflags)task lint-fix)Does this introduce a user-facing change?
No by default — the feature is inert unless
TOOLHIVE_PLUGINS_LOCK_ENABLED=true. With the gate on,thv ai-plugin upgradere-resolvesplugins:lock entries.Special notes for reviewers
AllowSignerChangefrom skills; this PR does not enforce it and does not add the CLI flag.resolveLatestStatemirrors Install's dispatch (git → OCI → registry name) but stops short of extraction / DB / lock writes.