Skip to content

Commit d32980e

Browse files
committed
Describe both uses of sync --allow-unsigned
The flag now authorizes two distinct trust transitions: adopting an install whose signature state cannot be established, and repairing a lock entry that records no trust decision into an explicit unsigned exception. Only the first was documented, so an operator reading `sync --help` could approve a transition other than the one described, and the remedy `thv ai-plugin info` names for an unrecorded entry was undiscoverable from the command that performs it. Regenerating also refreshes the TrustUnrecorded schema description, which was left stale by the previous commit and was failing the Docs check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Samuele Verzi <samu@stacklok.com>
1 parent c4cba19 commit d32980e

6 files changed

Lines changed: 25 additions & 17 deletions

File tree

cmd/thv/app/ai_plugin_sync.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ func init() {
6060
aiPluginSyncCmd.Flags().BoolVar(&aiPluginSyncYes, "yes", false,
6161
"Skip the confirmation prompt (required when not running interactively)")
6262
aiPluginSyncCmd.Flags().BoolVar(&aiPluginSyncAllowUnsigned, "allow-unsigned", false,
63-
"Allow adopting plugins whose signature state cannot be established (recorded as unsigned)")
63+
"Record plugins as unsigned in the lock file: when adopting installs whose signature state "+
64+
"cannot be established (--adopt), and when repairing an entry that records no trust "+
65+
"decision and whose content is unsigned")
6466
AddFormatFlag(aiPluginSyncCmd, &aiPluginSyncFormat)
6567
}
6668

docs/cli/thv_ai-plugin_sync.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/server/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/server/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/server/swagger.yaml

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/api/v1/plugins_types.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ type syncPluginsRequest struct {
115115
Check bool `json:"check,omitempty"`
116116
// Adopt writes lock entries for existing unmanaged project-scope installs
117117
Adopt bool `json:"adopt,omitempty"`
118-
// AllowUnsigned permits adopting plugins whose signature state cannot be
119-
// established, recording them as unsigned
118+
// AllowUnsigned permits recording a plugin as unsigned in the lock file,
119+
// in two cases: adopting an install whose signature state cannot be
120+
// established (see Adopt), and repairing an entry that records no trust
121+
// decision at all, whose reinstall otherwise fails closed on unsigned
122+
// content.
120123
AllowUnsigned bool `json:"allow_unsigned,omitempty"`
121124
}
122125

0 commit comments

Comments
 (0)