Repository navigation
Package the validator as the installable okgf command - #1
Merged
Merged
Conversation
Make the reference validator installable so users can validate bundles without cloning the repo and running `python tools/okgf_validate.py`. - Move the validator into an installable `okgf` package (okgf/validate.py, a console entry point, `python -m okgf`, and `--version`). tools/okgf_validate.py stays as a back-compat shim that re-exports the package API. - Add pyproject.toml (hatchling): PyYAML is the only runtime dependency, with `cryptography` optional behind the `verify` extra; the wheel ships only okgf. - One-line install: install.sh (curl | sh via uv) and a Homebrew formula. - release.yml publishes to PyPI on a version tag via Trusted Publishing (OIDC). - conformance CI installs the package and runs the `okgf` command (and the shim) on Python 3.9 and 3.12. - Docs: install section atop the README, docs/INSTALL.md, and updated references. Signed-off-by: Onehill <[email protected]> Agent: Claude Opus 4.8 (instructed by awchristoph) Co-Authored-By: Claude Opus 4.8 <[email protected]>
welsbach
force-pushed
the
feat/one-line-install
branch
from
October 21, 2026 21:18
378f41d to
fb53a5e
Compare
The previous commit put the conformance job behind a build matrix, which made GitHub report the status contexts as `validate (3.9)` and `validate (3.12)`. The branch protection on `main` requires a check named exactly `validate`, so that context was never produced and the PR stayed blocked on a missing required check even though every matrix leg passed. Rename the matrix job to `test` and add a lightweight `validate` gate job that `needs: test`, so the required `validate` context is emitted again and turns green only when both the 3.9 and 3.12 legs pass. No change to what is tested. Signed-off-by: Onehill <[email protected]> Agent: Claude Opus 4.8 (instructed by awchristoph) Co-Authored-By: Claude Opus 4.8 <[email protected]>
CodeQL (code scanning) flagged the conformance workflow for not restricting the GITHUB_TOKEN permissions. The workflow only checks out and validates code and never writes to the repository, so add a top-level `permissions: contents: read` block (the recommended minimal default). No change to what runs. Signed-off-by: Onehill <[email protected]> Agent: Claude Opus 4.8 (instructed by awchristoph) Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
What and why
The reference validator could only be run by cloning the repo and invoking
python tools/okgf_validate.py. This packages it as an installableokgfcommand so anyone can validate OKGF bundles with a one-line install.Install (after the first PyPI release)
Changes
okgfpackage (okgf/validate.py,__main__,okgfconsole entry point,--version).tools/okgf_validate.pybecomes a thin back-compat shim that re-exports the package, so existing invocations and imports keep working.pyproject.toml(hatchling): PyYAML is the only runtime dependency;cryptographystays optional behind theverifyextra, so the default install and the Homebrew formula are pure-Python. The wheel ships only theokgfpackage.install.sh(curl | shvia uv;OKGF_VERIFY=1adds signature verification) and a Homebrew formula underpackaging/homebrew/okgf.rb.release.yml: on avX.Y.Ztag, builds, smoke-tests the wheel, and publishes to PyPI via Trusted Publishing (OIDC) - no stored token.okgfcommand (and the shim) on Python 3.9 and 3.12. The matrix runs as thetestjob behind a singlevalidategate, so the required status context stays stable; the workflow'sGITHUB_TOKENis scoped read-only.docs/INSTALL.md, and updated SPEC / CONFORMANCE / CONTRIBUTING / SECURITY / examples references.Verification
okgf,python -m okgf, and thetools/okgf_validate.pyshim all validate the example bundles, including Ed25519 signature verification onexamples/governed.cryptography,--pubkeydegrades gracefully (exit 2, clear message) rather than crashing.okgf/plus the entry point; it installs and runs in a throwaway env.Maintainer follow-ups (human-only, not blocking this PR)
okgfname and register this repo'srelease.yml(environmentpypi) as its Trusted Publisher. Until then, a tag build will fail only at the publish step.OneHillAI/homebrew-tapwithFormula/okgf.rbfrompackaging/homebrew/okgf.rb(theurl/sha256placeholders are filled from the PyPI release /brew bump-formula-pr).The
curl/brew/pipxone-liners above go live oncev0.1.0is published to PyPI.