Cloud-SDK extraction — PR 7 (Amendment A2): SDK serve hook + ListBackendNames RPC + manifest field#673
Merged
Merged
Conversation
Records the integration-gap investigation (post PR 1/2/3/6 merge) + the two operator decisions that unblock the rest of the cloud-SDK extraction: - Plugin-serve gap: ServeIaCPlugin has zero IaCStateBackend awareness; the plan's Task 11 assumed a seam that doesn't exist. - Backend-name advertisement: plugin.json capabilities.iacStateBackends as the authoring point, exposed at runtime via a new ListBackendNames RPC on the IaCStateBackend service; engine cross-checks ContractRegistry. - One type carries both concerns: azureIaCServer implements pb.IaCStateBackendServer alongside its provider interfaces. - Plan restructure: adds PR 7 (SDK serve hook + ListBackendNames RPC + manifest field) and PR 8 (engine host-wiring); PR 4 depends on PR 7, PR 5 depends on PR 4 + PR 8. The plan manifest amendment + re-alignment + re-lock is the next step and requires an operator unlock (the lock commit squash-merged into main, so the prior `git revert` unlock path is no longer cleanly available). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…R 8) Post-merge of PRs 1/2/3/6, the integration-surface investigation (decisions/0035) found the plugin-serve and host-resolve seams the design assumed did not exist. Amendment A2: - PR 7 (workflow): SDK serve hook auto-registering pb.IaCStateBackendServer (Task 17) + ListBackendNames RPC on the IaCStateBackend service (Task 16) + plugin.PluginManifest.IaCStateBackends field (Task 18). Must merge before PR 4. - PR 8 (workflow): engine host-wiring — exported RegisterIaCStateBackend + ExternalPluginAdapter.IaCStateBackendClients() + the loadPluginInternal optional-interface seam (Task 19). The expanded form of the original Task 14's engine half. - Task 14 trimmed to migration-doc-only. - PR 4 revised: depends on PR 7; azureIaCServer implements pb.IaCStateBackendServer directly (one type, both concerns per decisions/0035); the SDK serve hook auto-registers it. - Manifest: 6 PRs/15 tasks -> 8 PRs/19 tasks. PRs 1/2/3/6 marked MERGED. Execution order: PR 7 -> PR 4 -> PR 8 -> PR 5. Next: re-run alignment-check, then re-lock. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lets the engine ask a loaded plugin which iac.state backend NAMES it serves. Additive; honors the iac.proto no-structpb invariant. Part of Amendment A2 (decisions/0035).
registerIaCServicesOnly now type-asserts pb.IaCStateBackendServer and registers it, alongside the IaCProvider* optionals — so a plugin whose provider type also implements the state-backend interface serves it with no extra wiring. Amendment A2 (decisions/0035).
…vertisement A plugin declares the iac.state backend names it serves via plugin.json capabilities.iacStateBackends; this adds the matching Go field + ensures the decode path populates it. The engine (PR 8 / Task 19) reads it and cross-checks against the ListBackendNames RPC. Amendment A2 (decisions/0035).
Code-review Minors: the IaCStateBackends field has two authoring paths (top-level key + nested under capabilities); add a test for the top-level path and the absent case, and broaden the field doc comment to mention both paths.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the missing SDK + contract surface needed for IaC state-backend plugins to advertise and serve iac.state backends (per Amendment A2 / decisions/0035), so cross-repo plugins (e.g. workflow-plugin-azure serving azure_blob) can be wired end-to-end in the next PRs.
Changes:
- Extend
IaCStateBackendgRPC contract withListBackendNames(+ regenerated bindings + compile-guard test). - Update
plugin/external/sdkauto-registration to also registerpb.IaCStateBackendServerwhen implemented by the provider. - Add
PluginManifest.IaCStateBackendsand legacy-capabilities promotion + tests; update plan + scope lock + decision record.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/manifest.go | Adds IaCStateBackends manifest field and promotes it from legacy capabilities object during JSON unmarshal. |
| plugin/manifest_test.go | Adds tests covering legacy + top-level decode paths for iacStateBackends. |
| plugin/external/sdk/iacserver.go | Auto-registers pb.IaCStateBackendServer alongside existing IaC optional services. |
| plugin/external/sdk/iacserver_test.go | Verifies IaCStateBackend service gets registered when the provider satisfies the interface. |
| plugin/external/proto/iac.proto | Adds ListBackendNames RPC + request/response messages to IaCStateBackend. |
| plugin/external/proto/iac.pb.go | Regenerated protobuf message bindings for the new RPC/messages. |
| plugin/external/proto/iac_grpc.pb.go | Regenerated gRPC bindings (client/server/handlers/service desc) for ListBackendNames. |
| plugin/external/proto/iac_statebackend_test.go | Extends compile-level guards to assert the new RPC/messages exist in generated code. |
| docs/plans/2026-05-14-cloud-sdk-extraction.md.scope-lock | Updates scope-lock hash after plan amendment changes. |
| docs/plans/2026-05-14-cloud-sdk-extraction.md | Updates the plan for Amendment A2 (adds PR 7/8, tasks, ordering, dependency notes). |
| decisions/0035-iac-state-backend-plugin-integration-surface.md | New ADR documenting the integration-surface gap and the A2 plan restructure. |
Files not reviewed (2)
- plugin/external/proto/iac.pb.go: Language not supported
- plugin/external/proto/iac_grpc.pb.go: Language not supported
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The ListBackendNames RPC added to the IaCStateBackend service made the test-only fakeStateBackendClient stub no longer satisfy the pb.IaCStateBackendClient interface, breaking the module package typecheck (Lint) and the Test (Go 1.26) job. Add the no-op method. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Amendment A2 (
decisions/0035). Post-merge of PRs #668/#669/#670/#671, an integration-surface investigation found the plugin-serve seam the design assumed did not exist inplugin/external/sdk. This PR closes it — it is the prerequisite for the cross-repo PR 4 (workflow-plugin-azureservingazure_blob).ListBackendNamesRPC to theIaCStateBackendservice iniac.proto(regenerated viabuf). Lets the engine ask a loaded plugin which iac.state backend names it serves. Additive; honors theiac.protono-structpb invariant.registerIaCServicesOnlynow type-assertspb.IaCStateBackendServer, soServeIaCPluginauto-registers it alongside theIaCProvider*optionals — a plugin whose provider type also implements the state-backend interface serves it with no extra wiring.PluginManifest.IaCStateBackends []string+ decode wiring (top-level key and nestedcapabilities.iacStateBackends). The authoring point for which backend names a plugin serves.Also carries the Amendment A2 plan changes:
decisions/0035+ the manifest re-amendment (6 PRs/15 tasks → 8 PRs/19 tasks) + the re-lock (alignment re-passed, zero drift).Design / Plan / ADR
decisions/0035-iac-state-backend-plugin-integration-surface.mddocs/plans/2026-05-14-cloud-sdk-extraction.md(re-locked after A2)Scope Manifest
PR Count: 8 · Tasks: 19 · Status: Locked 2026-05-14T18:43:55Z
This is PR 7 —
Tasks 16, 17, 18— branchfeat/cloud-sdk-extraction-p7-serve. Basemain(PRs 1/2/3/6 already merged).Test status
go test ./plugin/... ./plugin/external/... ./wftest/bdd/green; fullgo build ./...clean. The two repo-wide pre-existing failures (TestFallbackRuns,TestInfraMultiEnv_E2E) are unrelated — see PR #668.🤖 Generated with Claude Code