fix(actions): unshadow the per-run artifact listing as run-artifacts; guard sibling name collisions #302

Merged
hexajon merged 1 commit from issue-291-duplicate-artifacts-command into main 2026-07-20 15:50:38 +00:00
hexajon commented 2026-07-20 15:50:26 +00:00 (Migrated from codeberg.org)

Summary

Fixes #291: two cobra commands named artifacts were registered on the actions parent - the repository-wide group (list/get/delete/download) and the per-run listing. Cobra's Find returns the first match, so the per-run listing was unreachable and actions --help listed artifacts twice.

  • The per-run listing becomes actions run-artifacts <run-id> - which is where the naming was always headed: the MCP action is already run_artifacts, and a parity alias (actions/artifacts -> actions/run-artifacts) had been papering over the CLI's colliding name. The rename lets CLI and MCP meet on one canonical key, and the now-dead alias is removed. The repo-wide actions artifacts group is unchanged (it was only ever shadowing, not shadowed).
  • New repo-wide structural guard TestNoSiblingCommandNameCollisions (internal/parity): walks the whole cobra tree and fails if any parent's direct children collide on Name() or Aliases - proven RED on the pre-fix tree (caught exactly the two artifacts children) and GREEN after. The class can't ship silently again.
  • Reachability verified by driving the built binary: artifacts listed exactly once, run-artifacts invocable, both operations live. COMPARISON.md row distinguishes repo-scope from run-scope; reference docs regenerated as-emitted.
  • Service layer, MCP schemas, suggestions, COMPAT untouched.

Full gate green in the worktree (all cheap checks + test-race, staticcheck, govulncheck, gosec, modernize, docs-verify, cross-compile, mcp-conformance: PASS).

Closes #291

## Summary Fixes #291: two cobra commands named `artifacts` were registered on the `actions` parent - the repository-wide group (list/get/delete/download) and the per-run listing. Cobra's Find returns the first match, so the per-run listing was unreachable and `actions --help` listed `artifacts` twice. - The per-run listing becomes `actions run-artifacts <run-id>` - which is where the naming was always headed: the MCP action is already `run_artifacts`, and a parity alias (`actions/artifacts` -> `actions/run-artifacts`) had been papering over the CLI's colliding name. The rename lets CLI and MCP meet on one canonical key, and the now-dead alias is removed. The repo-wide `actions artifacts` group is unchanged (it was only ever shadowing, not shadowed). - New repo-wide structural guard `TestNoSiblingCommandNameCollisions` (internal/parity): walks the whole cobra tree and fails if any parent's direct children collide on Name() or Aliases - proven RED on the pre-fix tree (caught exactly the two `artifacts` children) and GREEN after. The class can't ship silently again. - Reachability verified by driving the built binary: `artifacts` listed exactly once, `run-artifacts` invocable, both operations live. COMPARISON.md row distinguishes repo-scope from run-scope; reference docs regenerated as-emitted. - Service layer, MCP schemas, suggestions, COMPAT untouched. Full gate green in the worktree (all cheap checks + test-race, staticcheck, govulncheck, gosec, modernize, docs-verify, cross-compile, mcp-conformance: PASS). Closes #291
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!302
No description provided.