Skip to content

Migrate workflow-plugin-template to strict gRPC proto contracts#2

Merged
intel352 merged 3 commits intomainfrom
copilot/migrate-workflow-plugin-template
May 2, 2026
Merged

Migrate workflow-plugin-template to strict gRPC proto contracts#2
intel352 merged 3 commits intomainfrom
copilot/migrate-workflow-plugin-template

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

Migrates the plugin template to Workflow strict gRPC proto contracts so contract shape issues are caught during wfctl validation rather than at runtime.

Changes Made

  • SDK upgrade: Updated github.com/GoCodeAlone/workflow from v0.3.55 to v0.20.1, which adds strict contract interfaces (ContractProvider, TypedStepProvider, TypedModuleProvider, TypedServiceInvoker, etc.)
  • plugin.json: Added placeholder download entries for all supported platforms (required for type: external validation), updated minEngineVersion to 0.20.0, and added an inline "contracts": [] field in the canonical strict-contract format
  • plugin.contracts.json (new): Empty contract registry file in the format expected by wfctl plugin validate --strict-contracts and wfctl 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 a wfctl-strict-contracts job alongside the existing test job; both jobs now include permissions: contents: read for least-privilege security. The new job runs:
    go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.20.1 plugin validate --file plugin.json --strict-contracts
    

Validation

  • go build ./... — passes
  • go test ./... -v -race -count=1 — passes (TestNewPlugin_ImplementsPluginProvider, TestManifest_HasRequiredFields)
  • go vet ./... — passes
  • go mod tidy — no unintended diff
  • ✅ Plugin binary build (GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/workflow-plugin-TEMPLATE/) — passes
  • wfctl plugin validate --file plugin.json --strict-contractsOK workflow-plugin-TEMPLATE v0.1.0 (plugin.json)

Note: This repo advertises 0 module/step/trigger types (all empty arrays), so strict contract coverage is 0/0 for each kind — a clean pass. plugin.contracts.json is provided as the authoritative contract file for future maintainers to populate when types are added.

@intel352 intel352 marked this pull request as ready for review May 1, 2026 06:25
@intel352 intel352 requested a review from Copilot May 1, 2026 06:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@intel352
Copy link
Copy Markdown
Contributor

intel352 commented May 1, 2026

@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.

@intel352
Copy link
Copy Markdown
Contributor

intel352 commented May 1, 2026

@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 plugin.json is missing and should run the current Workflow CLI strict validation, for example:

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-contracts

Adjust 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.

@intel352
Copy link
Copy Markdown
Contributor

intel352 commented May 1, 2026

@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 wfctl strict validation, run the repository tests, and keep this PR ready for review with Copilot assigned as reviewer.

- 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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 1, 2026

@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 c...

Done in commit 5e5e21b. The PR now includes:

  • SDK upgraded to github.com/GoCodeAlone/workflow v0.20.1 (adds ContractProvider, TypedStepProvider, TypedModuleProvider, and other strict-contract interfaces)
  • plugin.json fixed: added placeholder download entries (required for type: external validation), updated minEngineVersion to 0.20.0, added inline contracts field
  • plugin.contracts.json added: empty contract registry in the format expected by wfctl strict validation
  • CI job wfctl-strict-contracts added: runs go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.20.1 plugin validate --file plugin.json --strict-contracts

Validation results:

  • go test ./... -v -race -count=1PASS
  • go vet ./...PASS
  • go mod tidy — no unintended diff
  • go build ./... (linux/amd64) — PASS
  • wfctl plugin validate --file plugin.json --strict-contractsOK workflow-plugin-TEMPLATE v0.1.0

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:

  • https://api.github.com/repos/GoCodeAlone/workflow/releases/latest
    • Triggering command: /home/REDACTED/.cache/go-build/ef/efb54074651a00807ca6acae5b13cc1cbbd98ba77bb72920edb41cd4ba80d1a2-d/wfctl /home/REDACTED/.cache/go-build/ef/efb54074651a00807ca6acae5b13cc1cbbd98ba77bb72920edb41cd4ba80d1a2-d/wfctl plugin validate --file plugin.json --strict-contracts t ux-amd64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert t ux-amd64/pkg/tool/linux_amd64/vet -ato�� .cfg t ux-amd64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert t ux-amd64/pkg/tool/linux_amd64/vet (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Migrate workflow-plugin-template to strict gRPC proto contracts Migrate workflow-plugin-template to strict gRPC proto contracts May 1, 2026
@intel352 intel352 requested a review from Copilot May 2, 2026 03:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@intel352 intel352 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for strict gRPC contract rollout: CI is green, wfctl strict validation is present and passing, and there are no unresolved review threads.

@intel352 intel352 merged commit 8a2b75e into main May 2, 2026
10 checks passed
@intel352 intel352 deleted the copilot/migrate-workflow-plugin-template branch May 2, 2026 13:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread plugin.json
Comment on lines +25 to +45
"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"
Comment thread plugin.json
{
"os": "windows",
"arch": "amd64",
"url": "https://github.com/GoCodeAlone/workflow-plugin-TEMPLATE/releases/download/v0.1.0/workflow-plugin-TEMPLATE-windows-amd64.tar.gz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate workflow-plugin-template to strict gRPC proto contracts

3 participants