Repository navigation
chore(deps): update verdacloud-sdk-go to v1.7.0 and add go fix check - #65
Merged
Merged
Conversation
Raises the go directive to 1.26.10 (the SDK's floor) and pulls
ozzo-validation v4.4.1.
Adapt to the SDK:
- NewTestClient now takes testing.TB.
- Instances.Get is deprecated: call Instances.List (nil for all,
ListInstancesOptions{Status} otherwise), which is what Get wraps.
- Hibernate is deprecated upstream but the CLI still supports it, so its
uses get a staticcheck SA1019 nolint.
- Instance/Volume/VolumeInTrash views carry the new SDK fields (tags,
private_ip, private_network_id, subnet_id); the views coverage test
requires it. JSON/YAML output gains these keys (additive).
- Two volume loops index instead of copying the larger SDK struct.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Output of `go fix -tags=integration ./...` (Go 1.26.10, two passes): new(expr), min/max clamps, strings.Cut/CutPrefix/CutSuffix/SplitSeq, slices.Contains, wg.Go, range over int. No behavior changes. Manual edits: - skills/uninstall.go: the stringscut fixer emitted `before, _, ok := ...; _, after, ok := ...; if !ok || !ok`, which does not compile and would drop the start-marker check. Use okStart/okEnd. - Delete strPtr/stringPtr/ptrOf, unused once their call sites were inlined as new(...). - Preallocate two test slices that prealloc flags after range-over-int. - Reflow three min/max/Cut rewrites that go fix left awkwardly formatted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors verdacloud-sdk-go#65. - Makefile derives GO_VERSION from the go directive in go.mod, which CI already reads via go-version-file, so go.mod is the single source. - golangci-lint is pinned once (GOLANGCI_LINT_VERSION, still v2.5.0) and run via `go run` on that toolchain. lint, lint.fix and security use it; the lint and gosec jobs drop their own `go install` of the same version. `make security` gains --default=none so it matches CI exactly. - New `make fix` (two passes) and `make fix.check` (go fix -diff, which exits non-zero on a pending fix), with -tags=integration and the toolchain pinned because the fixer set changes between Go releases. - New "Go Fix Check" CI job, required by ci-success; a pre-commit hook runs `make fix`. CLAUDE.md and AGENTS.md document both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SDK v1.7.0 validates JobScalingOptions before sending and rejects deadline_seconds outside 600..604800. The CLI only checked > 0 and the wizard defaulted to 5m, so accepting the default failed after the whole wizard. validateBatchjobDeadline now backs both request() and the wizard step, and the wizard defaults to 30m (the value the help example uses). New tests run the SDK's own Validate() on the wizard default, the range edges and the default container request, so a future SDK limit change fails here instead of in front of a user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pre-commit hook used whatever golangci-lint was on PATH (and skipped lint when there was none) and never ran go fix, so a commit could pass locally and fail the required Go Fix Check job. It now runs `make fix.check` and `make lint`, the same pinned targets as CI. The file was also stored as 100644. Git ignores a hook that is not executable, so `make hooks.install` never ran it. Mark it 100755. This also activates the hook's existing doc-update step (skip it with SKIP_DOC_UPDATE=1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicksemin
previously approved these changes
Oct 28, 2026
The hook's last step starts a headless claude session with --dangerously-skip-permissions (up to $0.50 per commit) and stages any unstaged cmd/*/README.md and CLAUDE.md changes. It never ran while the hook was non-executable. Now that it is executable, run that step only when VERDA_DOC_UPDATE=1, so a commit does not start paid AI edits by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SDK v1.7.0 validates create requests before sending them. Several wizard steps accepted wider ranges, so the user finished the whole wizard and only then got a validation error, with no way to correct the value. The CPU/GPU prompts and flag help also advertised 1..100 while an enabled threshold now needs at least 5. The limits now live once in shared.go and back the wizard validators, the validate()/request() flag checks and the flag help: compute size 1..128, min replicas 0..1000, max replicas 1..1000, concurrency 1..5000, CPU/GPU util 0 (off) or 5..100, scale delays 0s..1h, request TTL 0s..24h (container) and 0s..168h (batch job), healthcheck port 0..65535. Container and job TTL keep separate steps because their ceilings differ. Disabled triggers, zero durations and all defaults behave as before. Flag-only and agent runs were already rejected by the SDK; they now get an error that names the flag. The request payload is unchanged. sdk_limits_test.go runs the SDK's Validate() at each boundary for both command families. We did not establish that these out-of-range values ever succeeded against the live API; they match the current public API schema. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore the original help text, wizard descriptions and error messages, and the serverless README. Only the new upper-bound checks and the two ranges that changed (CPU/GPU util, batch job deadline) produce new text, and that text is built from the constants in shared.go and batchjob_create.go, so a limit changes in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yutkin
force-pushed
the
chore/sdk-v1.7.0-go-fix
branch
from
October 28, 2026 15:54
f289705 to
dc629f1
Compare
TestResumableDownload_BreakThenResume was flaky on main and on this branch (about 1 in 75 runs with -cpu 1,2,4). After a chunk failed, the worker could pull the next chunk before the consumer called cancel(), so a "concurrency 1" download kept going past the failed chunk. The worker now returns after it reports an error. Other workers still stop on the first error's cancel(), as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicksemin
approved these changes
Oct 28, 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.
Summary
Update
verdacloud-sdk-gofrom v1.4.2 to v1.7.0. Copy the CI changes from verda-cloud/verdacloud-sdk-go#65.Commits:
chore(deps): Update the SDK. ReplaceInstances.GetwithInstances.List. Add the new SDK fields to the output views.refactor: Applygo fix. One rewrite inskills/uninstall.godid not compile. We changed it manually.ci: Add the go fix check. Pin golangci-lint in the Makefile.fix(batchjob): The SDK rejects a job deadline under 10 minutes or over 7 days. The CLI now uses the same range, and the wizard default changes from5mto30m.fix(githooks): The pre-commit hook runsmake fix.checkandmake lint. The hook file is now executable. Before, git did not run it.fix(githooks): The hook step that startsclaudeto update docs runs only when you setVERDA_DOC_UPDATE=1.fix(serverless): The wizard steps and flag checks use the SDK limits from constants inshared.go. The wizard now rejects an out-of-range value at the prompt. Before, the error came after the last step.SDK changes that break compatibility
NewTestClienthas a new first parameter,testing.TBboolparameter ofDeleteVolumechanged from "force" to "permanent delete"falsego.modchangedbatchjob createuses the same rangeServerless limits that the SDK now checks:
We did not test these values against the live API. The limits agree with the current public API schema.
Proposed CLI version: v1.9.1. Changes that users can see:
batchjob createrejects a--deadlineunder10mor over168h. The wizard default is now30m.container createandbatchjob createreject out-of-range values at the wizard prompt or with a flag error. The--cpu-utiland--gpu-utilhelp shows the new range.Evidence
go vetfailed onNewTestClient.views_testfound 5 missing SDK keys. Lint found 17 issues.make build,make test,make lint,make fix.checkandmake securitypass.Validate()on the wizard default deadline and on the default container request. With the old5mdefault, the deadline test fails.Merge Danger
Door: two-way
Blast Radius: small
JSON, YAML and MCP output for instances and volumes has new keys. Out-of-range serverless values now fail in the CLI, before the CLI sends the request. The request payload for valid values does not change. After each change to the
goline ingo.mod, runmake fix. The pre-commit hook now runs. Its doc-update step is off unless you setVERDA_DOC_UPDATE=1.🤖 Generated with Claude Code