Add plugin.json manifest and strict gRPC contract validation CI check#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-websocket/sessions/54418473-7078-4656-a1d5-b478ad9d041f Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/6a6358da-8e80-458f-986e-12e619403044 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
The
Added a |
|
@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 |
…dation Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/dbd4d82c-0194-4c77-89a6-de5b954059d1 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
The PR has all changes in place (commits
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "key": "sent", | ||
| "type": "boolean", | ||
| "description": "Whether the message was successfully sent to the connection." |
| { | ||
| "key": "closed", | ||
| "type": "boolean", | ||
| "description": "Whether the connection was found and closed." |
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: Configure Git for private repos |
| - name: Validate strict plugin contracts | ||
| run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json --strict-contracts |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "key": "sent", | ||
| "type": "boolean", | ||
| "description": "Whether the message was successfully sent to the connection." |
| { | ||
| "key": "closed", | ||
| "type": "boolean", | ||
| "description": "Whether the connection was found and closed." |
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: Configure Git for private repos |
| - name: Configure Git for private repos | ||
| run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
| - name: Validate strict plugin contracts |
|
@copilot please continue this PR using Claude Sonnet 4.6 and address the remaining merge gates. Current gate state I see:
Please inspect and fix any failing checks, address all unresolved review comments with code changes where appropriate, add or repair the PR check that runs |
Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/15434d8d-a430-4a86-bc42-0a7c00fdc4c2 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
All review threads addressed in commit
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.26' | ||
| go-version-file: go.mod |
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.26' | ||
| go-version-file: go.mod | ||
| - name: Configure Git for private repos | ||
| if: ${{ secrets.RELEASES_TOKEN != '' }} | ||
| run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
| - run: go test -race ./... | ||
| - run: go vet ./... |
| if: ${{ secrets.RELEASES_TOKEN != '' }} | ||
| run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/" | ||
| - name: Validate strict plugin contracts | ||
| run: go run github.com/GoCodeAlone/workflow/cmd/wfctl@v0.3.56 plugin validate --file plugin.json --strict-contracts |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 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.
|
@copilot apply changes based on the comments in this thread |
…e wfctl version from go.mod Agent-Logs-Url: https://github.com/GoCodeAlone/workflow-plugin-websocket/sessions/f5e44b3b-5f6c-44f1-8056-85fb8e28dc21 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Applied all three changes from the review thread in commit
|
The plugin was missing a
plugin.jsonmanifest entirely, causingwfctl audit pluginsto reportmissing_plugin_manifestwith all contract counts at0/0.Changes
plugin.json— adds the canonical Workflow plugin manifest with:name,version,author,description,type: external,tier: community,license: MITws.server(module),step.ws_send/step.ws_close(steps),websocket(trigger)stepSchemaswith typedconfigFieldsandoutputsfor both step typeserror: stringoutput declared for bothstep.ws_sendandstep.ws_closeto match actual runtime outputs emitted on failure (e.g. whenws.serveris not initialized orconnectionIdis missing).github/workflows/ci.yml— adds astrict-contractsjob to the existing CI workflow that:maingo-version-file: go.modto match the repository Go version (both jobs)wfctl plugin validate --file plugin.json --strict-contractsto validate typed contracts, with thewfctlversion derived dynamically fromgo.modviago list -mto stay in sync with the engine dependency automaticallyplugin.jsonis missing or contains contract violationspermissions: contents: readfollowing least-privilege security best practicesactions/checkout@v6andactions/setup-go@v6, consistent withrelease.ymlif: ${{ secrets.RELEASES_TOKEN != '' }}so fork PRs without the secret do not break module downloadsValidation
go test -race ./...✅go vet ./...✅