Skip to content

Sign pushes by default and remove the lock feature gate - #6139

Draft
samuv wants to merge 2 commits into
skills-sig/13b-provenance-displayfrom
skills-sig/14-push-signing-ungate
Draft

Sign pushes by default and remove the lock feature gate#6139
samuv wants to merge 2 commits into
skills-sig/13b-provenance-displayfrom
skills-sig/14-push-signing-ungate

Conversation

@samuv

@samuv samuv commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Note

Stack 2 of RFC THV-0080 — final PR (stack #6128, on top of #6137). Closes #5899 when it lands.

Summary

The last piece: signing on publish, and the feature gate comes out.

  • thv skill push signs by default: --key signs the pushed artifact with a cosign private key (the signature manifest is attached at the .sig tag, so project-scoped installs verify it; the flow the signer/verifier PRs round-trip in tests). Pushing unsigned requires an explicit --no-sign, and a failed signing fails the push — an artifact is never silently published unsigned. Threaded through CLI, client, and API.
  • TOOLHIVE_SKILLS_LOCK_ENABLED is removed: with verification on consume (installs, sync, upgrade) and signing on publish both in place, the lock file graduates from experimental. The gate, its env var, the "(experimental)" command markers, and every gated test-server setup are gone; the lock file, toolhive.requires materialization, sync, upgrade, and signature verification are now standard behavior for project-scoped skills. This is THE user-facing change of the stack.
  • Trust-model docs rewritten (docs/arch/12-skills-system.md): the "drift detection over a repository-editable file" honesty note graduates to the verified model — TOFU semantics with the identity displayed, --allow-unsigned / --allow-signer-change escape hatches, the provisional: git marker, and an explicit list of what deliberately remains trusted on faith (unsigned exceptions, the lock file as reviewable policy, the first-use anchor).

Type of change

  • New feature (non-breaking change which adds functionality)

Test plan

  • Unit tests pass locally (task test, full suite with -race)
  • Linting passes (task lint-fix, 0 issues)
  • New unit tests: push requires an explicit signing decision (400 before anything is pushed); push signs with the provided key pinned to the pushed digest; signing failure fails the push. Gate-dependent tests updated: the gated-server E2E blocks merge into the standard suites; the legacy-unmanaged adopt fixture now constructs pre-lock state directly instead of toggling the gate.
  • task docs regenerated.

Does this introduce a user-facing change?

Yes. The skills lock file feature is no longer gated: project-scoped installs write toolhive.lock.yaml, verify signatures (unsigned installs need --allow-unsigned), and thv skill sync/upgrade work without TOOLHIVE_SKILLS_LOCK_ENABLED. thv skill push now requires --key or an explicit --no-sign.

Special notes for reviewers

  • The signed round-trip interop check (cosign verify --key accepts our attached signature) is covered by the signer package's unit tests plus toolhive-core's key-signed retrieval tests; a manual cosign-CLI check against a real registry is worth doing once before release.
  • Follow-ups tracked on Track: Skills lock file + Sigstore signing (RFC THV-0080) #5899 at close: Rekor proof validation for git (removes provisional:), keyless/OIDC signing, catalog-supplied expected identity, and moving pkg/skills/signer to toolhive-core.

Generated with Claude Code

@github-actions github-actions Bot added the size/M Medium PR: 300-599 lines changed label Jul 29, 2026
@samuv samuv self-assigned this Jul 29, 2026
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Jul 29, 2026
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (skills-sig/13b-provenance-display@c6569e6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/skills/skillsvc/build.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                          @@
##             skills-sig/13b-provenance-display    #6139   +/-   ##
====================================================================
  Coverage                                     ?   72.52%           
====================================================================
  Files                                        ?      735           
  Lines                                        ?    76655           
  Branches                                     ?        0           
====================================================================
  Hits                                         ?    55594           
  Misses                                       ?    17102           
  Partials                                     ?     3959           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Jul 29, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from 64ff0fa to 3afb9eb Compare August 3, 2026 08:28
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from 3afb9eb to 71a473b Compare August 3, 2026 09:07
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from 71a473b to 762881c Compare August 3, 2026 13:41
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from 762881c to caa6620 Compare August 3, 2026 14:11
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from caa6620 to d5fc7de Compare August 3, 2026 14:47
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from d5fc7de to 9e26d0e Compare August 3, 2026 15:15
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from 9e26d0e to dbf984a Compare August 3, 2026 15:16
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 3, 2026
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from dbf984a to 454442d Compare August 4, 2026 08:34
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 4, 2026
samuv and others added 2 commits August 4, 2026 10:35
The final RFC THV-0080 piece: thv skill push signs the pushed artifact
with the provided cosign key (attaching the signature manifest next to
it, so installs can verify), and pushing unsigned requires an explicit
--no-sign — a failed signing fails the push rather than silently
publishing unsigned.

With signing on publish and verification on consume both in place, the
TOOLHIVE_SKILLS_LOCK_ENABLED gate comes out: the lock file, sync,
upgrade, dependency materialization, and signature verification are
now standard behavior for project-scoped skills. The architecture
document's trust-model section graduates from the drift-detection
honesty note to the verified model — TOFU semantics, the explicit
allow_unsigned / allow_signer_change escape hatches, the provisional
git marker, and what deliberately remains trusted on faith.

Closes #5899.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-by-default pushes turned every E2E push into a 400: the suite
has no signing infrastructure, so its pushes carry the explicit
no_sign decision — matching the allow_unsigned exceptions its
project-scoped installs already record.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@samuv
samuv force-pushed the skills-sig/14-push-signing-ungate branch from 454442d to 1c3289a Compare August 4, 2026 08:35
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR: 300-599 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track: Skills lock file + Sigstore signing (RFC THV-0080)

1 participant