Migrate workflow-plugin-template to strict gRPC proto contracts#2
Migrate workflow-plugin-template to strict gRPC proto contracts#2
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot This PR currently has 0 changed files, so the assigned task is not implemented yet. Please continue the original issue task using Claude Sonnet 4.6: make the required Workflow strict-contract or downstream dependency updates, push actual code/config/doc changes to this PR branch, run the requested validation, and update the PR body with the validation results. Do not leave this as an empty PR. |
|
@copilot Add this as part of the PR scope: include or update a GitHub Actions PR check that validates strict Workflow plugin contracts. The check should fail when name: wfctl strict contracts
on:
pull_request:
push:
branches: [main, master]
jobs:
wfctl-strict-contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Validate strict plugin contracts
run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.20.1 plugin validate --file plugin.json --strict-contractsAdjust branch filters and Go setup to match this repository. If the repo uses an existing CI workflow, add this as a job there instead of creating duplicate workflow clutter. Include the check result in the PR validation notes. |
Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-template/sessions/15643b71-be44-4570-8598-40476c518eeb Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
|
@copilot please try again using Claude Sonnet 4.6. Continue the original task for this PR. Make sure the PR is not left empty, add or update strict gRPC contract descriptors as applicable, add a PR check that runs |
- Upgrade github.com/GoCodeAlone/workflow to v0.20.1 (strict contract support) - Fix plugin.json: add placeholder downloads, update minEngineVersion, add contracts field - Add plugin.contracts.json with correct format for wfctl strict validation - Add wfctl-strict-contracts CI job with least-privilege permissions Validation results: go build ./... PASS go test ./... -race PASS (TestNewPlugin_ImplementsPluginProvider, TestManifest_HasRequiredFields) go vet ./... PASS go mod tidy PASS (no unintended diff) wfctl plugin validate --file plugin.json --strict-contracts OK workflow-plugin-TEMPLATE v0.1.0 Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-template/sessions/8dc1308e-8d6e-4086-bded-305f951090c2 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Done in commit
Validation results:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
intel352
left a comment
There was a problem hiding this comment.
Approved for strict gRPC contract rollout: CI is green, wfctl strict validation is present and passing, and there are no unresolved review threads.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-linux-amd64.tar.gz" | ||
| }, | ||
| { | ||
| "os": "linux", | ||
| "arch": "arm64", | ||
| "url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-linux-arm64.tar.gz" | ||
| }, | ||
| { | ||
| "os": "darwin", | ||
| "arch": "amd64", | ||
| "url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-darwin-amd64.tar.gz" | ||
| }, | ||
| { | ||
| "os": "darwin", | ||
| "arch": "arm64", | ||
| "url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-darwin-arm64.tar.gz" | ||
| }, | ||
| { | ||
| "os": "windows", | ||
| "arch": "amd64", | ||
| "url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-windows-amd64.tar.gz" |
| { | ||
| "os": "windows", | ||
| "arch": "amd64", | ||
| "url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-windows-amd64.tar.gz" |
Migrates the plugin template to Workflow strict gRPC proto contracts so contract shape issues are caught during
wfctlvalidation rather than at runtime.Changes Made
github.com/GoCodeAlone/workflowfromv0.3.55tov0.20.1, which adds strict contract interfaces (ContractProvider,TypedStepProvider,TypedModuleProvider,TypedServiceInvoker, etc.)plugin.json: Added placeholder download entries for all supported platforms (required fortype: externalvalidation), updatedminEngineVersionto0.20.0, and added an inline"contracts": []field in the canonical strict-contract formatplugin.contracts.json(new): Empty contract registry file in the format expected bywfctl plugin validate --strict-contractsandwfctl audit plugins --strict-contracts; provides the scaffolding for future maintainers to add strict descriptors when module/step/trigger types are advertised.github/workflows/ci.yml: Added awfctl-strict-contractsjob alongside the existingtestjob; both jobs now includepermissions: contents: readfor least-privilege security. The new job runs:Validation
go build ./...— passesgo test ./... -v -race -count=1— passes (TestNewPlugin_ImplementsPluginProvider,TestManifest_HasRequiredFields)go vet ./...— passesgo mod tidy— no unintended diffGOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/workflow-plugin-TEMPLATE/) — passeswfctl plugin validate --file plugin.json --strict-contracts—OK workflow-plugin-TEMPLATE v0.1.0 (plugin.json)