skillhub/docs
Thiago Nascimento Nogueira 2014716904 feat(skills): let skill owners yank a published version
Yanking a published version is only available through
POST /api/v1/admin/skills/versions/{versionId}/yank, which is
session-only (SESSION_ONLY_ROUTES covers /api/v1/admin/**) and requires
SKILL_ADMIN or SUPER_ADMIN. A skill owner therefore cannot pull a
broken release themselves, neither from the web surface nor from a
script holding an API token.

In package registries yank is an act of the publisher: `cargo yank`
and PyPI's "yank release" are performed by the package owner, not by a
registry admin, because the goal is to stop new installs of a bad
release while keeping the artifact available for lock files. SkillHub
already lets owners archive, unarchive, rerelease and delete draft
versions through SkillLifecycleController under the
assertCanManageLifecycle rule (owner, or namespace ADMIN/OWNER); yank
belongs on the same surface with the same rule.

Changes:

- SkillGovernanceService: add an owner-checked yankVersion(skill,
  version, actor, roles, ip, ua, reason) that runs
  assertCanManageLifecycle and then the same yank logic as the admin
  variant, now shared in yankVersionInternal. The admin entry point is
  unchanged for AdminSkillController.
- SkillLifecycleAppService / GovernanceWorkflowAppService: resolve
  skill and version by namespace/slug/version, delegate to the new
  domain method, and return SkillLifecycleMutationResponse with action
  YANK and the resulting version status. The YANK_SKILL_VERSION audit
  record and SkillVersionYankedEvent are emitted by the domain service
  exactly as for the admin path.
- SkillLifecycleController: POST /{namespace}/{slug}/versions/{version}/yank
  on both /api/v1/skills and /api/web/skills, optional body
  AdminSkillActionRequest (reason).
- RouteSecurityPolicyRegistry: require skill:yank for the new route on
  both prefixes, so tokens can reach it as the SESSION_ONLY_ROUTES
  comment promises for every route the authorization list opens. The
  admin yank stays session-only. No allow-list of scopes exists outside
  the registry; the docs' scope enumeration is updated to include
  skill:yank.
- Tests: RouteSecurityPolicyRegistryTest (scope required on both
  prefixes, admin route still closed), SkillGovernanceServiceTest
  (owner and namespace ADMIN allowed, MEMBER forbidden, unpublished
  rejected), SkillLifecycleControllerTest (envelope with and without
  body).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DdnYX4jTS3JwMMP9JCGxzU
2026-09-11 19:52:37 +00:00
..
api test(auth): cover CLI session fallback (#605) 2026-07-28 15:22:11 +08:00
prds feat: File Browser Sidebar with Preview, Security Audit UI, and Syntax Highlighting (#145) 2026-03-23 14:38:47 +08:00
research feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
skillhub Merge pull request #807 from iflytek/codex/refactor/issue-622-notification-polling 2026-09-03 13:48:57 +08:00
superpowers refactor(notification): replace SSE with HTTP polling 2026-09-03 11:38:02 +08:00
00-product-direction.md docs(protocol): adopt .agents/skills (plural) as canonical universal fallback 2026-05-19 10:49:31 +08:00
01-system-architecture.md feat: add initial RISC-V image support (#725) 2026-08-24 16:37:34 +08:00
02-domain-model.md feat(review): add skill comments and user feedback (#793) 2026-09-02 11:15:52 +08:00
03-authentication-design.md feat(skills): let skill owners yank a published version 2026-09-11 19:52:37 +00:00
04-search-architecture.md feat: add search index rebuild workflow 2026-03-19 15:20:08 +08:00
05-business-flows.md feat(review): add skill comments and user feedback (#793) 2026-09-02 11:15:52 +08:00
06-api-design.md feat(skills): let skill owners yank a published version 2026-09-11 19:52:37 +00:00
07-skill-protocol.md docs(compliance): document runtime integration contract (#704) 2026-08-11 13:43:42 +08:00
08-frontend-architecture.md refactor: skill lifecycle projection and docs (#78) 2026-03-18 13:39:22 +08:00
09-deployment.md feat(ratelimit): make thresholds runtime-configurable 2026-08-27 15:07:31 +08:00
10-delivery-roadmap.md refactor: skill lifecycle projection and docs (#78) 2026-03-18 13:39:22 +08:00
11-auth-extensibility-and-private-sso.md feat(auth): improve extensible login method metadata 2026-03-14 18:52:35 +08:00
12-private-sso-integration-playbook.md feat(auth): improve extensible login method metadata 2026-03-14 18:52:35 +08:00
13-parallel-workflow.md refactor(dev): replace agent-* commands with parallel-* workflow 2026-03-14 20:49:17 +08:00
14-skill-lifecycle.md refactor: skill lifecycle projection and docs (#78) 2026-03-18 13:39:22 +08:00
15-backend-time-governance-plan.md fix(audit): resolve 8-hour timezone offset in audit log timestamps (#472) 2026-06-05 15:28:12 +08:00
16-backend-time-inventory.md fix(audit): resolve 8-hour timezone offset in audit log timestamps (#472) 2026-06-05 15:28:12 +08:00
17-backend-annotation-findings.md refactor(app): clarify query boundaries and workflow owners 2026-03-20 11:33:32 +08:00
18-frontend-annotation-findings.md docs: enrich frontend code documentation 2026-03-19 13:37:21 +08:00
19-smtp-password-reset-email-setup.md feat(auth): 邮箱验证码重置密码与 SMTP 配置支持 (#273) 2026-04-13 20:27:00 +08:00
20-cloud-url-builtin-skills-setup.md feat(builtin-skills): add reviewed starter collection 2026-07-31 14:22:23 +08:00
21-official-starter-skills-plan.md feat(bootstrap): publish starter skills in runtime manifest 2026-07-31 18:27:25 +08:00
22-builtin-skills-candidate-pool.md feat(bootstrap): publish starter skills in runtime manifest 2026-07-31 18:27:25 +08:00
23-builtin-skills-first-round-test-report.md feat(builtin-skills): add reviewed starter collection 2026-07-31 14:22:23 +08:00
24-compliance-metadata-design.md feat(search): refine compliance discovery interactions 2026-08-10 10:42:19 +08:00
2026-03-20-skill-label-system-design.md docs(labels): document detail chip navigation and filter wrap 2026-07-29 22:57:51 +03:00
2026-04-08-issue-automation-design.md [codex] add issue triage automation mvp (#268) 2026-04-09 15:04:33 +08:00
2026-07-31-observability-construction-plan.md feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
2026-08-13-personal-namespace-provisioning.md fix(namespace): enable personal provisioning by default 2026-08-28 16:42:26 +08:00
CONTENT_SAFETY.md docs(governance): add DPGA policy evidence 2026-08-27 15:07:42 +08:00
dev-workflow.md test(smoke): decouple admin checks from bootstrap credentials (#686) 2026-08-04 19:20:34 +08:00
e2e.md test(e2e,ci): migrate web e2e to real API and add PR e2e workflow (#198) 2026-04-01 14:41:23 +08:00
hermes-integration-en.md docs(integrations): add Hermes Agent skill guide (#584) 2026-07-22 15:01:50 +08:00
hermes-integration.md docs(integrations): add Hermes Agent skill guide (#584) 2026-07-22 15:01:50 +08:00
observability-decision-map.md feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
observability-developer-guide.md feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
openclaw-integration-en.md docs(compat): clarify canonical slug validation 2026-09-03 11:24:56 +08:00
openclaw-integration.md docs(compat): align slug validation guidance 2026-09-03 11:27:54 +08:00
oss-01-core-contract-freeze.md feat(skill): add UPLOADED status for PRIVATE skill lifecycle (#290) 2026-04-13 11:39:45 +08:00
oss-02-core-semantic-rules.md fix(i18n): update version delete error message to include UPLOADED and SCAN_FAILED 2026-04-14 15:49:25 +08:00
pr-batch-test-runtime.md feat(ci): add PR batch test deployment workflow (#275) 2026-04-09 18:45:14 +08:00
PRIVACY_AND_DATA_GOVERNANCE.md docs(governance): add DPGA policy evidence 2026-08-27 15:07:42 +08:00
RISCV64.md feat: add initial RISC-V image support (#725) 2026-08-24 16:37:34 +08:00
security-scanning.md fix(scanner): keep failure details private 2026-09-03 19:32:37 +08:00