Skip to content

fix(releases): v2 kit provenance review follow-ups - #126

Merged
mrgoonie merged 2 commits into
mainfrom
claude/modest-wozniak-20nxz8
Oct 25, 2026
Merged

mrgoonie merged 2 commits into
mainfrom
claude/modest-wozniak-20nxz8

Conversation

@mrgoonie

Copy link
Copy Markdown
Contributor

Closes #123. Follow-ups to #121 / #100.

Changes, by item in #123

Item Change
M1 Adds a trust array to the v2 golden vectors (release-manifest-v2.json). It covers the one positive signed-kit case, a remote-signed kit whose kit signature was verified over its own tree. The negatives are a mismatched digest, no verification, local-dev and skillx. The fixture is regenerated.
M2 Adds kit publish tests with a GitHub OIDC sxo_ token (plus a wrong-handle 403). Also adds a race of two publishes of one version with different origins. The race is deterministic: the first insert waits until both publishes have looked up the version, so the loser always takes the insertRelease conflict path and gets a 409.
M3 docs/deployment-guide.md: set SKILLX_SHARED_SKILL_ALIASES before the first production @agentkit release, with a smoke check.
L1 assertSameKitProvenance reuses the bounded, validating readManifest from release-read.ts. A missing, oversized or corrupt stored manifest now returns 500 release.storage_inconsistent instead of a 409 claiming origin "none". The log is labelled release publish replay.
L2 The API, CLI and publisher docs, the deployment guide and CLAUDE.md now say skillx-sh 0.6.0 and earlier report v2 manifests as failed verification, and that skillx-sh 0.7.0 or later is required (#122).
L3 A slug starting with ak- is refused for kit releases (400 identity.invalid, before auth). This matches kitIdentity (ak-plan → @agentkit/plan). The same rule is in the v2 manifest contract, with a rejected golden vector and an invalid-manifest fixture, and skillx publish --kit-origin now fails before packing.

Verification

  • pnpm typecheck: clean.
  • pnpm test: 124 files, 2427 passed, 3 skipped.
  • pnpm build: OK.
  • The new L1 and L3 tests fail on the old code: the corrupt manifest gave 409 and @agentkit/ak-review gave 200. They pass now.
  • The race test passed in 6 consecutive runs after it was made deterministic.
  • An isolated code-review subagent found no critical or high issues. I fixed its low findings in 27ce993: the contract gap, the race determinism, the log label and the CLI fail-fast.

Follow-up

Impact


Generated by Claude Code

…rust vectors

The kit replay check reads the stored manifest with the bounded, validating
reader of the read API, so a missing, oversized or corrupt manifest is 500
release.storage_inconsistent instead of a 409 claiming origin "none".

Kit release slugs must not start with ak-: AgentKit maps the kit skill
directory ak-<x> to @agentkit/<x>, so @agentkit/ak-<x> was a second identity
for no composed directory. It is now 400 identity.invalid.

The v2 golden vectors gain a trust array with the one positive signed-kit
case (remote-signed, kit signature verified over its own tree) and the
mismatched-digest, unverified, local-dev and skillx negatives.

Kit publish tests cover an OIDC sxo_ token and two racing publishes of one
version with different origins (the insert conflict path answers 409).

Docs: the deployment guide requires SKILLX_SHARED_SKILL_ALIASES before the
first production @agentkit release, and the API, CLI and publisher docs
state that verifying v2 manifests needs skillx-sh 0.7.0 or later.

Closes #123

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PQVEqCxVprDuAk9suEGeh
The v2 manifest rules now reject a provider kit identity whose slug starts
with ak- (identity.invalid), with a rejected golden vector, so other
verifiers enforce what the registry refuses. skillx publish --kit-origin
fails before packing on such a name. The kit replay check logs storage
errors as "release publish replay" instead of "release read", and the
racing-publish test gates the first insert until both publishes looked the
version up, so it always exercises the insert conflict path.

Refs #123

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PQVEqCxVprDuAk9suEGeh
@mrgoonie
mrgoonie merged commit 433a3da into main Oct 25, 2026
1 check passed

Copy link
Copy Markdown
Contributor Author

Heads-up from #125 / #128: once #128 lands, the shared-skill guard fails closed while SKILLX_SHARED_SKILL_ALIASES holds no valid identity. Every in-place overlay of an @agentkit/* skill is then 422 overlay.shared_alias. The new deployment-guide paragraph here says that while the variable is unset, a public kit "may overlay any other @agentkit/<name> skill in place". That sentence becomes false and should say that such overlays are refused until the list is set. The operator step itself is still needed, because it is what unblocks overlays of single-kit skills.


Generated by Claude Code

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.

Release v2 kit provenance: review follow-ups

2 participants