Skip to content

remove/cli: drop unused validate commands - #1310

Merged
burmudar merged 1 commit into
mainfrom
wb/remove-validate-cmd
May 4, 2026
Merged

burmudar merged 1 commit into
mainfrom
wb/remove-validate-cmd

Conversation

@burmudar

@burmudar burmudar commented May 4, 2026

Copy link
Copy Markdown
Contributor

The legacy src validate entrypoint is unused, so keeping it around adds dead code and extra maintenance surface in the CLI. This removes the top-level src validate command and its install and kube subcommands, which were still wired through the older command registration path. For more context, see https://sourcegraph.slack.com/archives/C022SPMNR0W/p1777905299691889

Test Plan

  • go test ./cmd/src/...

The legacy `src validate` entrypoint is unused, so keeping it around adds dead code and extra maintenance surface in the CLI. This removes the top-level `src validate` command and its `install` and `kube` subcommands, which were still wired through the older command registration path. For more context, see https://sourcegraph.slack.com/archives/C022SPMNR0W/p1777905299691889

## Test Plan

- go test ./cmd/src/...
@burmudar burmudar self-assigned this May 4, 2026
@burmudar
burmudar requested a review from a team May 4, 2026 15:22
@burmudar
burmudar enabled auto-merge (squash) May 4, 2026 15:23
@burmudar
burmudar merged commit 284f08b into main May 4, 2026
9 checks passed
@burmudar
burmudar deleted the wb/remove-validate-cmd branch May 4, 2026 15:28
marcleblanc2 added a commit to sourcegraph/docs that referenced this pull request Sep 11, 2026
## Why

The docs sync from `sourcegraph/sourcegraph`
([`doc/_generated.push.sh`](https://github.com/sourcegraph/sourcegraph/blob/main/doc/_generated.push.sh))
does `cp -R -L doc/cli/** _clone/docs/cli/` — it only adds and updates
pages, never deletes. So when a command is removed from src-cli, its
reference page lingers here forever. Replaying the sync against `main`
shows zero drift in the 62 generated pages, but 36 files under
`docs/cli/references/` are never written by it.

This PR deletes the 28 that are stale. No redirects are added; none of
these pages are linked from anywhere in the site.

## Removed (28 files)

**Command removed from src-cli**

| Pages | Removal |
|---|---|
| `extensions/{index,copy,delete,get,list,publish}` |
sourcegraph/src-cli#1173 (extensions platform sunset) |
| `lsif` | sourcegraph/src-cli#1147 (→ `src code-intel upload`) |
| `scout` | sourcegraph/src-cli#1196 |
| `sbom`, `signature` | sourcegraph/src-cli#1273 (SBOMs/signatures no
longer published as of 7.0.2852; the how-tos already carry deprecation
notices) |
| `admin` | sourcegraph/src-cli#1309 (built for the appliance, which
never launched) |
| `validate` | sourcegraph/src-cli#1310 |

**Command never shipped**

`prompts` + 13 subcommand pages (#1155) documented
sourcegraph/src-cli#1168, which was closed unmerged.

**Stale duplicates shadowing generated pages**

`auth.mdx` and `codeowners.mdx` collide with `auth/index.mdx` /
`codeowners/index.mdx`: contentlayer flattens both to
`cli/references/auth`, and `allPosts.find` returned the stale flat file.
After this change `/cli/references/auth` and
`/cli/references/codeowners` render the generated group pages (verified
with `contentlayer build`).

## Kept

`search-jobs/{cancel,create,delete,get,list,logs,restart,results}` — the
subcommands exist, but `src doc` only emits a single `search-jobs.md`
because `searchJobsCommands` isn't in the `commanders` map in
[`cmd/src/doc.go`](https://github.com/sourcegraph/src-cli/blob/main/cmd/src/doc.go#L59-L66).
Fix belongs upstream.

## Verification

- `npx tsc --noEmit` passes
- `npx contentlayer build` generates 493 docs; `cli/references/auth` and
`cli/references/codeowners` now resolve to the `index.mdx` files
- No remaining links to the deleted slugs anywhere in `docs/` or `src/`

## Follow-up (upstream)

To stop this recurring, `_generated.push.sh` should mirror
`docs/cli/references/` (delete-then-copy) instead of copying over it.
Done in sourcegraph/sourcegraph#15529 (merge after
sourcegraph/sourcegraph#15528 and #1889).

## Amp threads

- [Stale command
docs](https://ampcode.com/threads/T-01a08410-86ca-72be-9928-2810e837fae1)

Co-authored-by: Amp <amp@ampcode.com>
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.

2 participants