← Back to Pull requests

fix: add missing DELETE endpoint for skills #286

Closed
unknown closed this pull request without merging on Mar 11, 2026 20:36 UTC
View on GitHub
unknown unknown commented on Mar 06, 2026 02:05 UTC
Author

Description

Adds the missing DELETE /v0/skills/{skillName}/versions/{version} endpoint to the registry API.

Motivation: The arctl skill delete CLI command and client were already implemented, but the server had no corresponding endpoint, causing 404 errors.

What changed:

  • Added DELETE handler in internal/registry/api/handlers/v0/skills.go with proper huma error codes (huma.Error404NotFound, huma.Error401Unauthorized, huma.Error403Forbidden)

  • Added DeleteSkill(ctx, tx, name, version) to the database layer — deletes the skill row and promotes the next latest version in a transaction

  • Added DeleteSkill to service interface and fake registry for testing

  • Regenerated OpenAPI spec and TypeScript client

  • Added e2e tests covering the full delete lifecycle
  • Fixes #223

    Change Type

    /kind fix

    Changelog

    ``release-note
    Add DELETE endpoint for removing skill versions from the registry
    `

    Additional Notes

    Test plan


  • go build ./... passes

  • go vet -tags e2e ./e2e/... passes

  • E2e tests added in e2e/skill_publish_test.go:

  • -
    TestSkillDelete: publish → verify exists → delete via CLI → confirm 404 → re-delete fails
    -
    TestSkillDeletePromotesLatest: publish v0.0.1 and v0.0.2 → verify latest is v0.0.2 → delete v0.0.2 → verify latest promoted to v0.0.1
    -
    TestSkillDeleteNotFound: HTTP DELETE on non-existent skill returns 404
  • Database deletion handles is_latest` promotion in a transaction

  • Uses proper huma error codes (404, 401, 403) instead of generic errors
  • Diff: 193 lines (+144 / -49) across 2 files Reviewer: inFocus7 Review duration: 8310m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 193 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.315
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #286"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.0% (MEDIUM) · Higher = larger blast radius
    36.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%