fix: close 3 strict-proto config-field gaps surfaced by BMW local smoke (v0.2.2)#12
Merged
Merged
Conversation
BMW local smoke against workflow v0.51.5 surfaced three step types whose
typed config protos were rejecting BMW-supplied fields. v0.2.2 adds the
missing fields and a new config message:
- AuthMethodsPolicyConfig / AuthMethodsPolicyInput (step.auth_methods_policy,
step.auth_policy_audit): add jwt_secret, sms_auth_enabled, and 6 oauth
client_id/secret fields (facebook/instagram/x).
- AuthPolicyGateConfig (step.auth_policy_gate): add tenant_id.
- step.auth_challenge_verify: replace EmptyConfig with new
AuthChallengeVerifyConfig { signing_secret }. Handler now falls back to
the config value when input does not carry one.
Also adds .github/workflows/workflow-compat.yml — daily + per-PR job that
installs the LATEST published wfctl release, builds this plugin, and
validates a fixture pipeline exercising every step type. Catches drift
between this plugin's proto descriptors and the next workflow release
the day it ships, rather than the next time BMW smokes.
Deferred (BMW yaml bug — no plugin change):
step.auth_oauth_exchange currently receives `code` inside its config:
block, but the handler reads `code` from OAuthProviderInput. BMW must
move `code` to a runtime input.
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
BMW local smoke against workflow v0.51.5 surfaced three step types whose typed config protos were rejecting BMW-supplied fields under strict-contracts. v0.2.2 closes those gaps and ships a daily compat job that runs the latest published wfctl against this plugin's contracts.
Proto fields added
AuthMethodsPolicyConfig/AuthMethodsPolicyInputUsed by
step.auth_methods_policyandstep.auth_policy_audit. BMW supplies these via 18+ pipeline invocations inbuymywishlist/app.yaml:jwt_secretjwt_secret: '{{ config "jwt_secret" }}'sms_auth_enabledsms_auth_enabled: '{{ config "sms_auth_enabled" }}'facebook_oauth_client_idfacebook_oauth_client_id: '{{ config "facebook_oauth_client_id" }}'facebook_oauth_client_secretfacebook_oauth_client_secret: '{{ config "facebook_oauth_client_secret" }}'instagram_oauth_client_idinstagram_oauth_client_id: '{{ config "instagram_oauth_client_id" }}'instagram_oauth_client_secretinstagram_oauth_client_secret: '{{ config "instagram_oauth_client_secret" }}'x_oauth_client_idx_oauth_client_id: '{{ config "x_oauth_client_id" }}'x_oauth_client_secretx_oauth_client_secret: '{{ config "x_oauth_client_secret" }}'AuthPolicyGateConfigUsed by
step.auth_policy_gate. BMW yaml suppliestenant_iddirectly in the gate config block (tenant_id: '{{ config "bmw_tenant_id" }}').tenant_idtenant_id: '{{ config "bmw_tenant_id" }}'AuthChallengeVerifyConfig(new message)Replaces
EmptyConfigforstep.auth_challenge_verify. BMW suppliessigning_secretin the step's config block:Defined as:
The handler now reads
signing_secretfromreq.Configas a fallback when it is not present onreq.Input— preserving the existing input-based contract while accepting config supply.Deferred:
step.auth_oauth_exchangecodefield (BMW yaml bug)BMW passes
codeinside the step'sconfig:block:The plugin handler reads
codefromreq.Input(merged withreq.Current) viaoauthString(current, "code")—codeis defined inOAuthProviderInputat tag 3, not inOAuthProviderConfig. This is a BMW yaml bug, not a plugin gap. BMW should movecodeto a runtime input — e.g. via a precedingstep.setthat liftsparse_request.query.codeinto the current scope, or by populating the typed input directly. No plugin change in this PR.Workflow-compat CI
New
.github/workflows/workflow-compat.yml:GoCodeAlone/workflowrelease tag via the GitHub API.GoCodeAlone/setup-wfctl.wfctl plugin validate --strict-contractsagainstplugin.json.wfctl validate --plugin-dir ...against.github/fixtures/workflow-compat.yaml— a smoke pipeline exercising every plugin step type using the BMW-supplied config shapes.Catches drift between this plugin's proto descriptors and the next workflow release the day it ships, rather than the next time BMW smokes.
Test plan
go test -race ./...— all packages green (including 5 new tests ininternal/strict_proto_fields_test.go).go vet ./...— clean.wfctl plugin validate --file plugin.json --strict-contractsagainst v0.51.5 — OK.wfctl validate --plugin-dir ... .github/fixtures/workflow-compat.yamlagainst v0.51.5 — PASS.PLUGIN_MANIFEST_EXPECT_VERSION=0.2.2 go test -run TestIntegration_PluginManifestAndStepTypes— passes (goreleaser pre-hook).v0.2.2, verify GoReleaser asset upload.🤖 Generated with Claude Code