Repository navigation
ci: add the intent contract check against the playbook binary - #28
Merged
Merged
Conversation
Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.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
The skills, commands and agents here call intents from the playbook binary, and nothing tells us when a binary release drops one. This check catches it on every PR and once a day.
What Changed
intents.jsonlists the 48 intents the plugin relies on, named like the entries ofplaybook tools map. Each entry has arequiredflag.scripts/check-intents.shvalidates the file first (sorted, unique, kebab-case ids, booleanrequired). Given a binary, it compares the list withtools map --json. A missing intent prints a warning, and fails the run only when it's markedrequired.contractworkflow runs on pull requests, the merge queue, by hand, and daily at 06:41 UTC. It downloads the latest stable playbook release for linux musl, checks it againstSHA256SUMS, runs shellcheck on the scripts, then runs the check. Egress is locked to GitHub hosts through harden-runner.Notes for reviewers
required: falsefor now. A missing intent only warns until we flip one totrue.tools mapcommand yet, the script prints a WARN and exits 0. The job stays green until a release ships the map.