feat(wfctl): plugin verify-capabilities IMPLEMENTATION (recovery for #766) (workflow#765)#769
Merged
Conversation
…ff (workflow#765)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
intel352
added a commit
that referenced
this pull request
May 24, 2026
…nline-spawn pattern) #765 PR #769 + v0.63.2 landed since cycle 3 paused. Worktree rebased onto current main with verify-capabilities.go present. Replan: direct pbClient.GetContractRegistry(ctx, Empty) after existing GetManifest call (line 137); explicit codes.Unimplemented branch maps to empty registry. Drops cycle-3's adapter-based hypothesis (#765 ships inline-spawn, NOT adapter).
7 tasks
intel352
added a commit
that referenced
this pull request
May 24, 2026
…kflow#767) (#773) * docs(plan): verify-capabilities contract-diff extension design (workflow#767) Adds capabilities.iacServices schema to PluginManifest + BuildContractRegistryForPlugin SDK helper + extends verify-capabilities subcommand to walk GetContractRegistry. Sweeps 4 IaC plugins. Closes deferred contract-diff from #765 cycle-3 review. * docs(plan): #767 design cycle 2 (fix wrong namespace + cite existing helpers) Cycle 1 FAIL: 2 Critical (workflow.iac.v1 namespace never existed on wire — actual workflow.plugin.external.iac per proto pkg decl; duplicated existing registeredIaCServices + iacServiceRequired helpers without citing). + 5 Important. Cycle 2: - Derive namespace prefix programmatically from pb.IaCProviderRequired_ServiceDesc.ServiceName (single source of truth keyed to .proto pkg). - Cite + reuse registeredIaCServices (deploy_providers.go:344) + iacServiceRequired const (iac_typed_adapter.go:52). - Directional diff (FAIL missing-from-binary; WARN extra-in-binary) per IMPORTANT-1. - Use cached adapter.ContractRegistry() — no redundant RPC (IMPORTANT-2). - Sweep-target SDK pin assumption explicit (IMPORTANT-4). - IaCStateBackend orthogonality documented (IMPORTANT-5). - Non-goal: embedded plugin.json verify (IMPORTANT-3). * docs(plan): #767 design cycle 3 (fold cycle-2 IMPORTANT amendments) Cycle 2 PASS with 4 Important to fold. Cycle 3: - ContractRegistryError() check ahead of diff (surface RPC errors verbatim, no synthetic FAILs). - iacserver.go:302 added to §Files so bridge calls BuildContractRegistryForPlugin (SDK helper not dead code for sweep targets). - Fixture construction recipes spelled out (iac-good/iac-missing-service/iac-extra-service stub providers). - Hard-cite #765 as sequencing prerequisite in §Assumptions. * docs(plan): #767 contract-diff implementation plan 6 tasks, 1 PR. Pairs with cycle-3-PASS design. Task 5 is no-op acknowledgement of cycle-3 reviewer Option B (don't factor existing registeredIaCServices helper this PR). * docs(plan): #767 design cycle 4 (replan against actual shipped #765 inline-spawn pattern) #765 PR #769 + v0.63.2 landed since cycle 3 paused. Worktree rebased onto current main with verify-capabilities.go present. Replan: direct pbClient.GetContractRegistry(ctx, Empty) after existing GetManifest call (line 137); explicit codes.Unimplemented branch maps to empty registry. Drops cycle-3's adapter-based hypothesis (#765 ships inline-spawn, NOT adapter). * docs(plan): #767 design cycle 4 inline amendments (Option A per reviewer) Cycle 4 PASS with 3 Important. Apply inline: - I-2: drop iac_contract_filter.go NEW proposal; reuse registeredIaCServices in-place (both package main) - I-1: add git-grep audit confirming iacserver.go:302 rebinding is safe (4 existing consumers all already filter) - I-3: reword Unimplemented branch to distinguish empty-LHS (skip) vs non-empty-LHS (FAIL on every declared) cases * docs(plan): #767 implementation plan (post-#765-shipped, direct pbClient pattern) 5 tasks, 1 PR. Mirrors design cycle 4 PASS. Direct pbClient.GetContractRegistry after existing GetManifest call (line 131 inline-spawn pattern). Explicit codes.Unimplemented branch. Reuses #765 fixture pattern + IaCStateBackends UnmarshalJSON precedent. * docs(plan): #767 plan cycle 2 — fix 2 critical + 2 important + 3 minor from adversarial cycle 1 Critical: registeredIaCServices→serviceNamesFromRegistry unconditional rename; commit go.sum in Task 5 fixtures. Important: client-side namespace filter (defense-in-depth); dedup test for both-top-and-nested. Minors: dead Finalize methods removed; per-task rollback notes → PR-level revert. * docs(plan): #767 plan cycle 3 — fix 2 critical from adversarial cycle 2 C1: iac-missing-service fixture must NOT embed UnimplementedIaCProviderFinalizerServer (Unimplemented satisfies the interface via mustEmbed sentinel → SDK registers it → false PASS). C2: bash pipeline $? reads tee exit not wfctl exit — capture WFCTL_EXIT=$? before any pipe in Final verification 3b. * docs(adr): 0042 — verify-capabilities IaC namespace derivation; cite from design + plan Resolves alignment-check MISSING finding: design cited decisions/NNNN-verify-capabilities-iac-namespace.md but no ADR existed. ADR documents the proto-descriptor TrimSuffix single-source-of-truth pattern that Tasks 2/3/4 derive from. Design + plan both updated to cite 0042 in place of NNNN. * chore: lock scope for #767 contract-diff (alignment passed) * feat(plugin): add IaCServices manifest field with nested-promotion (workflow#767 Task 1) * feat(sdk): BuildContractRegistryForPlugin namespace-filtering helper (workflow#767 Task 2) * feat(sdk): IaC bridge GetContractRegistry filters infra services (workflow#767 Task 3) * feat(wfctl): verify-capabilities contract-diff (directional FAIL/WARN) (workflow#767 Task 4) * test(wfctl): 3 IaC integration fixture scenarios (workflow#767 Task 5)
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.
Fix — earlier PR #766 was opened against stale remote ref
PR #766 was opened with
gh pr create --head feat/765-verify-capabilitiesAFTER the implementer agent reported 8 commits done — but the agent's commits were LOCAL only (never pushed).gh pr createuses the existing remote ref; doesn't auto-push local changes. The remote was atff537bfc6(scope-lock commit, docs-only). Squash-merge faithfully collapsed the 3 docs commits that WERE on remote. The 8 implementation commits stayed local.Session-error: didn't verify
git ls-remote origin feat/765-verify-capabilitiesmatched local HEAD before opening + admin-merging PR #766.Impact: v0.63.1 release shipped wfctl WITHOUT the verify-capabilities subcommand. 66 release.yml wiring PRs (Layer 3b extension) reference
wfctl plugin verify-capabilities --binary ...which will fail on next tag-push for each plugin (subcommand doesn't exist in the v0.63.1 binary).What this PR ships
Cherry-picks the 8 implementation commits from local
feat/765-verify-capabilitiesonto currentmain:27ec94f78→7497d4a2f→d59fefbd8→47917e17b— subcommand skeleton + preflight + sentinel matrix + spawn+GetManifest+diff416c14b7c→862c3d295→0c51950d2— 5 fixture scenarios + integration tests59406b9a6— PLUGIN_RELEASE_GATES.md docsTest plan
GOWORK=off go build ./...— exit 0GOWORK=off go test -run TestVerifyCapabilities -count=1 -timeout 180s ./cmd/wfctl/...— all PASS (32.7s)Follow-up
Tag v0.63.2 carrying the implementation. v0.63.1 retained for archive but doesn't actually contain the subcommand binary.