Repository navigation
feat(tooling): add SDK coverage tool and manifest - #110
Merged
Merged
Conversation
Member
|
Thanks for this, the coverage numbers are useful. 116 of 216 SDK methods have a command and 71 are still open, which is a gap we should close. I'd like to split the PR and make the coverage part smaller before we merge it. Happy to merge now, as a separate PR
Concerns with the coverage tool as it is
Suggestion
Is the sdk-watch scaffold planned work? If it is, more of this design makes sense, but I'd still want the test to check "the method is called" rather than "the command exists". |
LanusseMorais
force-pushed
the
LSH-3445-sdk-coverage-tool
branch
from
November 25, 2026 19:51
6602da0 to
5789479
Compare
greptile-apps
Bot
dismissed
their stale review
November 25, 2026 19:51
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
leandroh
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #111 (CI workflow and
cmd.Root()), split out of this PR at review; merge #111 first.Summary
cmd/sdkcoverageandinternal/sdkcoverage, an offline tool that reads the pinnedlatitudesh-go-sdksurface from the module cache, walks the cobra command tree built bycmd.Root()and reconciles both againstsdk-coverage.yaml. Subcommands:report(markdown, text, json),check,groups,commands. No API token involved.sdk-coverage.yaml, which maps SDK methods to the commands that call them: 116 of 216 methods covered at v1.21.4, 29 excluded with a reason, 71 pending. Besidescommandsandexcluded, a group can name a pending command (suggested) or record that an existing command is to call a pending method (extends, e.g. BGP sessions inelastic-ips get)."extends": truewhen the scaffold should grow an existing command instead of adding one.TestCLISDKCoverageruns withgo test ./...and fails only on contradictions: a mapped path the CLI does not register, a method or group the SDK no longer exposes, a command no method claims, an exclusion without a reason, or a pending method whose automatic name is a command that already exists (it must go underextendsor get a new name undersuggested). New SDK methods show up as pending, not as failures.make coverage-reportandmake coverage-check, and a CONTRIBUTING guide.Known limitations
extendsand only moves tocommandsonce the command calls the method.plans list/stock,s3 access-keys list/get/import); they are mapped to the SDK method for the same endpoint, with a comment.ObjectStorage.GetStorageBucket) runs before almost everys3command; it is mapped only where it is the command's only API call.KubernetesClusters.UpdateKubernetesClusterare excluded asdeprecated, so they are not scaffolded.main(theservers actions reboot --waittransition check and thessh_keysalias); they are out of scope here.Testing
No credentials are needed: everything runs offline against the module cache, except the last block, which downloads the latest SDK.
Clone & checkout
git clone https://github.com/latitudesh/cli.git lsh-cli cd lsh-cli git checkout LSH-3445-sdk-coverage-toolBuild & unit tests
Try the commands
Gate and reports.
make coverage-checkshould printok: v1.21.4 — 116/216 methods covered, 29 excluded, 71 pending; 5 new top-level command groups; theextendsquery returns theelastic-ips getextension, ands3 configureshows up as a command next to itsexportchild:The gate must reject each broken manifest below with exactly one violation: an
extendsto a command that does not exist, anextendsfor a method already mapped, asuggestedname that already exists, and a command no method claims:Check the manifest against the latest SDK release without touching
go.mod(v1.21.5 today, same counts):🤖 Generated with Claude Code