revert: bump speakeasy-core/client-sdk-go (#2117) — restores registry auth - #2120
Merged
Conversation
…oken (#2117)" This reverts commit 5c2f293. speakeasy-client-sdk-go v3.27.0 was the first regeneration of that SDK since 2025-05-06. It picked up a registry spec defect live since 2026-03-12: openapi_artifacts.yaml and openapi_subscriptions.yaml declare no top-level `security`, so once `speakeasy merge` began pushing global security down onto individual operations (registry#4559), their 13 operations composed as `security: []`. The generated SDK consequently stopped calling utils.PopulateSecurity on every Artifacts and Subscriptions operation. Verified against a test server: v3.26.7 sends X-Api-Key on Artifacts.PostTags; v3.27.0 sends no auth header at all, from identical calling code. That breaks `speakeasy tag promote` (registry/tagging.go -> Artifacts.PostTags) with `err_unauthorized: bearer token missing` for anyone on v1.795.2, including every customer tracking `speakeasyVersion: latest`. Reverting restores SDK v3.26.7 and known-good auth. Nothing consumes the license_jwt capture yet -- openapi-generation#55 is still open -- so this gives up no live functionality. Re-land on a fixed v3.27.1 once the registry fragments declare their security requirement. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ThomasRooney
approved these changes
Aug 24, 2026
This was referenced Aug 24, 2026
ThomasRooney
added a commit
that referenced
this pull request
Aug 25, 2026
…and regression coverage Re-does #2117 (reverted in #2120): speakeasy-core v0.23.0 to capture the registry license token, and speakeasy-client-sdk-go v3.27.1 which restores auth on the artifacts/subscriptions operations that v3.27.0 silently dropped (generated from a composed spec that marked them 'security: []'; fixed at the source in speakeasy-registry#4707 and regenerated in speakeasy-client-sdk-go#51). Pinned to a v3.27.1 pseudo-version until the tag exists. Why nothing caught it last time: the SDK regression left every method signature unchanged — utils.PopulateSecurity simply vanished from those operations, so builds stayed green and the requests went out with no x-api-key. Registry e2e tests push/pull via oras/ocicommon credentials and never touch the generated SDK, and the only SDK callsites (registry/tagging.go PostTags, internal/remote/sources.go GetRevisions — which swallows errors) had no coverage. Two new guards: - internal/sdk/sdk_test.go: hermetic contract test asserting the x-api-key header is sent on Artifacts.PostTags and Artifacts.GetRevisions (verified to fail against v3.27.0). - integration/workflow_registry_test.go: TestRegistryFlow now finishes with 'speakeasy tag promote', exercising the platform-API auth path end-to-end (passes in 30s against prod).
ThomasRooney
added a commit
that referenced
this pull request
Aug 26, 2026
…+ regression coverage (#2121) ## Summary Re-does #2117 (reverted in #2120 after it broke registry auth for customers as v1.795.2): - `speakeasy-core` v0.22.2 → **v0.23.0** — captures the registry license token (the original point of #2117). - `speakeasy-client-sdk-go/v3` v3.26.7 → **v3.28.0** — v3.27.0 was generated from a composed spec that marked all 13 artifacts/subscriptions operations `security: []`, so `utils.PopulateSecurity` vanished from them and every `tag promote`/`tag apply`/`ci tag` went out without `x-api-key` → 403s. Fixed at the source (speakeasy-registry#4707: fragments now all declare the same top-level security, so merge keeps the global block; #4705 typed the `target_resource` enum) and regenerated from the registry-published spec (speakeasy-client-sdk-go#52, tagged v3.28.0). `PopulateSecurity` is back on all 11 Artifacts + 2 Subscriptions operations; the only operations without auth are the three that are public by design (`getAccessToken`, `handleCheckoutCallback`, `handleStripeWebhook`). No SDK signature changes vs v3.26.7. ## Why no test caught it last time The regression changed no method signatures — auth just silently disappeared from the requests, so builds and CI stayed green. Registry e2e tests (`TestRegistryFlow` etc.) push/pull via **oras/ocicommon** credentials and never touch the generated SDK; the only SDK-auth callsites are `registry/tagging.go` (`Artifacts.PostTags`) and `internal/remote/sources.go` (`Artifacts.GetRevisions`, which swallows errors entirely) — neither had coverage, and there wasn't a single `httptest` server in the repo to assert outbound headers. `release.yml` runs no tests at all. ## New regression guards 1. **`internal/sdk/sdk_test.go`** — hermetic contract test: `httptest` server + `InitSDKWithKey`, asserts the `x-api-key` header is present on `Artifacts.PostTags` and `Artifacts.GetRevisions` requests. **Verified to fail against v3.27.0** (header absent) and pass against v3.26.7 / v3.28.0. Catches any future SDK bump that drops auth, at unit-test speed with no credentials needed. 2. **`integration/workflow_registry_test.go`** — `TestRegistryFlow` now ends with `speakeasy tag promote -s test-source -t e2e-test`, exercising the platform-API (SDK) auth path end-to-end alongside the existing oras push/pull. Runs on every PR via `validate.yml` (`SPEAKEASY_API_KEY`). With v3.27.0 this step 403s. Possible follow-up (out of scope here): a `pkg/merge` warning when `setExplicitNoSecurity` stamps `security: []` onto operations, so composed-spec consumers notice before an SDK regen does. ## Verification (at v3.28.0) - `go build ./...`, `go test ./internal/sdk/` pass. - `go test ./integration/ -run 'TestRegistryFlow$'` passes (49s, real platform).
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.
Why
CLI v1.795.2 breaks
speakeasy tag promotefor customers using registry tagging in CI:This is not a security exposure — the server still enforces auth (
MustHaveConsistentWorkspaceIDClaimHTTP). It's a spec/codegen defect: the client stopped sending credentials.v1.795.1..v1.795.2changes onlygo.mod/go.sum, and the operative line isspeakeasy-client-sdk-go/v3 v3.26.7 -> v3.27.0.What broke
v3.27.0 was the first regeneration of that SDK since 2025-05-06. It picked up a registry spec defect live since March:
openapi_artifacts.yamlandopenapi_subscriptions.yamldeclare no top-levelsecurity, so oncespeakeasy mergebegan pushing global security down onto individual operations (#1952, registry#4559), their 13 operations composed assecurity: [].The generated SDK therefore dropped
utils.PopulateSecurityfrom all 11 Artifacts and both Subscriptions operations.Verified against a local test server, identical calling code:
Artifacts.PostTagsX-Api-KeysentArtifacts.GetRevisionsX-Api-KeysentWorkspaces.Get(control)X-Api-KeysentX-Api-KeysentAffected CLI paths:
registry/tagging.go->Artifacts.PostTags(powerstag promote,tag apply,ci tag) andinternal/remote/sources.go:153->Artifacts.GetRevisions.This went unnoticed for five months because the other consumers (webapp, admin SDK) authenticate via
credentials: 'include'cookies, so a missing security parameter is invisible to them. The header-authenticated public Go SDK was frozen by a broken regen since May 2025 — so it kept shipping correct pre-March code until now.Why revert rather than fix forward
speakeasyVersion: latestpick this up automatically; the breakage is spreading.Verification
go build ./...— cleango test ./registry/... ./pkg/merge/...— passclient-sdk-go v3.26.7/speakeasy-core v0.22.2; all 11PopulateSecuritycalls restoredFollow-up
securitytoopenapi_artifacts.yaml+openapi_subscriptions.yamlin speakeasy-registry.openapi_admin.yamlhas the same defect (36 ops, no impact today).pkg/mergewhensetExplicitNoSecuritymarks operations unsecured — it silently performs a security-downgrading transform, which is what let this ship.🤖 Generated with Claude Code
Summary by cubic
Reverts the bump to
speakeasy-client-sdk-goandspeakeasy-coreto restore registry auth. v3.27.0 stopped sending theX-Api-Keyon registry operations, breakingspeakeasy tag promote; reverting tov3.26.7reinstates auth headers and fixes CI tagging.speakeasy-client-sdk-go/v3tov3.26.7andspeakeasy-coretov0.22.2, restoring PopulateSecurity on Artifacts/Subscriptions operations.speakeasy tag promote,tag apply,ci tag) sendX-Api-Keyagain; no other behavior changes. Release this as v1.795.3 so customers onspeakeasyVersion: latestregain working registry tagging.Written for commit ffc8e4c. Summary will update on new commits.