Skip to content

chore: remove live-docs generation from CLI doc command#862

Merged
JonJagger merged 1 commit into
mainfrom
delete-dead-live-docs
May 7, 2026
Merged

chore: remove live-docs generation from CLI doc command#862
JonJagger merged 1 commit into
mainfrom
delete-dead-live-docs

Conversation

@JonJagger
Copy link
Copy Markdown
Contributor

The docs repo now resolves and embeds live-docs links (yamlURLs, eventURLs, CLI examples) at deployment time via add_livedocs.py. The CLI no longer needs to call the live-docs API or generate those sections - it produces a static skeleton that the docs pipeline fills in.

The docs repo now resolves and embeds live-docs links (yamlURLs,
eventURLs, CLI examples) at deployment time via add_livedocs.py.
The CLI no longer needs to call the live-docs API or generate those
sections - it produces a static skeleton that the docs pipeline fills in.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 7, 2026

Claude finished @JonJagger's task in 2m 4s —— View job


PR Review: Remove live-docs generation from CLI doc command

  • Run static analysis checks (build, vet, mod tidy)
  • Review code changes
  • Post review feedback

Static Analysis

All checks pass:

  • go build ./... — compiles cleanly
  • go vet ./... — no issues
  • go mod tidy — no drift in go.mod / go.sum

Code Review

Summary: Clean removal of dead code. The live-docs HTTP provider (kosliLiveDocProvider), its API calls to app.kosli.com/api/v2/livedocs/cyber-dojo, the LiveDocProvider interface, NullLiveDocProvider, CIExample/LiveExampleData types, and the corresponding Formatter methods (LiveCIExamples, LiveCLIExample) are all removed consistently. No dangling references remain — grep confirms zero mentions of any removed symbol across the codebase.

Observations:

  1. No leftover references — all call sites in generate.go, docs.go, and tests are updated to drop the LiveDocProvider parameter. The Formatter interface is trimmed and MintlifyFormatter still satisfies it (confirmed by the compile-time check in formatter_test.go:4).

  2. Tests updated correctly — all four GenMarkdownTree call sites in generate_test.go drop the NullLiveDocProvider{} argument. Tests for the removed formatter methods (TestMintlifyLiveCIExamples, TestMintlifyLiveCLIExample) and the NullLiveDocProvider are deleted. The remaining tests cover the surviving functionality.

  3. formatter_test.go is now minimal — just a compile-time interface check with no testing import. This is fine; the file still serves a purpose by catching interface drift at compile time.

  4. Security improvement — removes the hardcoded read-only API token (Pj_XT2deaVA6V1qrTlthuaWsmjVt4eaHQwqnwqjRO3A) that was embedded in the LiveCLIExample output, and eliminates outbound HTTP calls (http.Get) with a //nolint:gosec suppression. Both are good to clean up.

  5. No functional gaps — the PR description confirms the docs pipeline (add_livedocs.py) now handles live-docs resolution at deployment time, so this CLI-side code is genuinely dead.

No issues found. This is a straightforward, well-scoped deletion with no loose ends. LGTM.

@JonJagger JonJagger enabled auto-merge (squash) May 7, 2026 06:04
@JonJagger JonJagger merged commit d15f2ef into main May 7, 2026
20 checks passed
@JonJagger JonJagger deleted the delete-dead-live-docs branch May 7, 2026 07:54
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