Skip to content

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

Merged
intel352 merged 3 commits into
mainfrom
copilot/migrate-workflow-plugin-openlms
May 6, 2026
Merged

Migrate workflow-plugin-openlms to strict gRPC proto contracts#2
intel352 merged 3 commits into
mainfrom
copilot/migrate-workflow-plugin-openlms

Conversation

Copilot AI commented May 1, 2026

Copy link
Copy Markdown
Contributor

Migrates this plugin to Workflow strict gRPC proto contracts so contract shape issues are caught during wfctl validation instead of at runtime.

Changes Made

  • plugin.contracts.json (new): 126 strict contract descriptors — one for the openlms.provider module type and one for each of the 125 advertised step types, all with mode: "strict" and proto message type name references (config, input, output). Also included in release archives so consumers installing from the tarball have it available for strict validation.
  • plugin.json: Added a downloads array with platform-specific release URLs for linux/amd64, linux/arm64, darwin/amd64, and darwin/arm64 (required by wfctl plugin validate for external plugins). Bumped version to 0.1.2 to align with the latest git tag and download URLs.
  • .goreleaser.yml: Updated before.hooks sed command to use {{ .Tag }} (instead of {{ .Version }}) when rewriting download URLs, preserving the v prefix required by GitHub release paths. Also added plugin.contracts.json to the release archive files list.
  • .github/workflows/ci.yml: Added a wfctl-strict-contracts job (ubuntu-latest, permissions: contents: read) that runs go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.20.1 plugin validate --file plugin.json --strict-contracts on every push and pull request to main.

Validation Results

$ go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.20.1 plugin validate --file plugin.json --strict-contracts
OK  workflow-plugin-openlms v0.1.2 (plugin.json)
  • wfctl plugin validate --file plugin.json --strict-contracts passes
  • go build ./... passes
  • go vet ./... passes
  • go test ./... passes (all unit and integration tests)

@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

Copilot AI left a comment

Copy link
Copy Markdown

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

intel352 commented May 1, 2026

Copy link
Copy Markdown
Contributor

@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

intel352 commented May 1, 2026

Copy link
Copy Markdown
Contributor

@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

intel352 commented May 1, 2026

Copy link
Copy Markdown
Contributor

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

- plugin.contracts.json: 126 strict contract descriptors (1 module + 125 steps)
- plugin.json: add platform download entries (required for manifest validation)
- .goreleaser.yml: extend sed hook to update download URLs on release
- .github/workflows/ci.yml: add wfctl-strict-contracts job

Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-openlms/sessions/7efdbb04-23ce-4691-b8c8-06ec1c90f13f

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

Copilot AI commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

@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 e30fd9a. The PR now includes:

  • plugin.contracts.json: 126 strict contract descriptors (1 openlms.provider module + 125 step types, all mode: "strict")
  • plugin.json: added downloads array for linux/darwin × amd64/arm64 (required by wfctl manifest validation)
  • .goreleaser.yml: extended sed hook to update download URL versions alongside the plugin version on each release
  • .github/workflows/ci.yml: added wfctl-strict-contracts job (ubuntu-latest, permissions: contents: read) running wfctl@v0.20.1 plugin validate --file plugin.json --strict-contracts

Validation output: OK workflow-plugin-openlms v0.1.0 (plugin.json)
All existing tests pass (go test ./..., go vet ./..., go build ./...)

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 -go@v0.46.0/mcp/errors.go 0.1-go1.26.2.linux-amd64/pkg/tool/linux_amd64/compile -p es/events mpile 0.1-go1.26.2.linux-amd64/pkg/too-trimpath -o t\|mode.*map\|mode.*proto\|missing_module\|missing_step .1/cmd/wfctl/plugin_audit.go 0.1-go1.26.2.linux-amd64/pkg/tool/linux_amd64/compile -p pkg/k8s/imageloa--norc mpile 0.1-go1.26.2.linux-amd64/pkg/too-importcfg (http block)
    • 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 mpile ux-amd64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert t ux-amd64/pkg/tool/linux_amd64/vet -o .cfg t ux-amd64/pkg/tool/linux_amd64/vet -p github.com/toche-json -lang=go1.26 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-openlms to strict gRPC proto contracts Migrate workflow-plugin-openlms to strict gRPC proto contracts May 1, 2026
@intel352 intel352 requested a review from Copilot May 2, 2026 03:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

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 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugin.contracts.json
Comment thread plugin.json
Comment thread .goreleaser.yml Outdated
@intel352

intel352 commented May 2, 2026

Copy link
Copy Markdown
Contributor

@copilot please continue this PR using Claude Sonnet 4.6 and address the remaining merge gates.

Current gate state I see:

  • pending checks: 1
  • failing checks: 0
  • unresolved review threads: 3
  • passing wfctl strict check present: true

Please inspect and fix any failing checks if they appear, address all unresolved review comments with code changes where appropriate, and resolve review threads once addressed. Keep the PR ready for review with Copilot requested as reviewer.

Copilot AI left a comment

Copy link
Copy Markdown

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 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugin.json
Comment thread .goreleaser.yml Outdated
Comment thread .goreleaser.yml Outdated
…align plugin.json version

- .goreleaser.yml: use {{ .Tag }} in URL replacement (preserves v-prefix for GitHub release paths)
- .goreleaser.yml: include plugin.contracts.json in release archives
- plugin.json: bump version to 0.1.2 to match latest git tag and download URLs

Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-openlms/sessions/f3ad8519-59ae-4087-b5ea-e8e963595d9a

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

Copilot AI commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please continue this PR using Claude Sonnet 4.6 and address the remaining merge gates.

Current gate state I see:...

Addressed all three review threads in commit cc37c1e:

  1. plugin.contracts.json not in release archive → added to .goreleaser.yml archives.files
  2. version/URL mismatch → bumped plugin.json version to 0.1.2 to align with the latest git tag and download URLs
  3. {{ .Version }} drops the v prefix → changed to {{ .Tag }} in the URL sed replacement

wfctl plugin validate --file plugin.json --strict-contractsOK workflow-plugin-openlms v0.1.2 (plugin.json)

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: /tmp/go-build2447675777/b001/exe/wfctl /tmp/go-build2447675777/b001/exe/wfctl plugin validate --file plugin.json --strict-contracts -nolocalimports -importcfg /tmp/go-build2447675777/b1733/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/gobwas/glob@v0.2.3/compiler/compiler.go ux-amd64/pkg/too-m64 s-th�� e.go .go 0.1-go1.26.2.lin-I -p xds/clients/inte-o mpile 0.1-go1.26.2.lin-trimpath (http block)

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

Copilot AI left a comment

Copy link
Copy Markdown

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 4 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 intel352 requested a review from Copilot May 2, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown

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

intel352 commented May 2, 2026

Copy link
Copy Markdown
Contributor

Resolved stale review threads after verifying the PR branch already includes the requested fixes: plugin.contracts.json is in the GoReleaser archive files, plugin.json is aligned to v0.1.2 downloads, and the release URL rewrite uses {{ .Tag }}. Local validation passed: GOWORK=off go test ./..., GOWORK=off go vet ./..., and wfctl v0.20.1 strict plugin validation.

Copilot AI left a comment

Copy link
Copy Markdown

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 4 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 intel352 merged commit 858a0a6 into main May 6, 2026
15 of 16 checks passed
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-openlms to strict gRPC proto contracts

3 participants