feat: orca CLI (verify, audit, checks)#1
Merged
Merged
Conversation
Final-review fixes: unknown check name, config without 'checks', missing pyyaml, and malformed YAML now exit 2 with a clear message instead of an uncaught traceback. verify() now loads plugins so configs can reference third-party checks. audit rejects a missing ledger instead of reporting a vacuous 'intact'. Adds type hints on judge_from_env/main.
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
Adds an
orcacommand-line tool that wraps the existing verification engine, so the library can be used without writing Python. Same product, wider reach; no new core dependencies (YAML is an optional[cli]extra).orca verify [OUTPUT] -c CONFIG [--source ...] [--json]— load a JSON/YAML check config, read the output from a file or stdin, runfrom_config(...).check(...), print a per-check table or--json. Exit0pass /1verification failed /2usage error.orca audit verify|export LEDGER [-o OUT]— verify or export aProvenancehash chain. Fully offline, no API key.orca checks— list registered checks (including plugins), marking judge-requiring ones with*.ANTHROPIC_API_KEY→OPENAI_API_KEY→ORCA_JUDGE_BASE_URL) via a single seam,judge_from_env; offline checks run with zero setup.checkskey, malformed/locked-out YAML, missing ledger) map to a clean exit2with a message, never a traceback.Implementation notes
argparse, one new modulesrc/orcaverify/cli.py(~130 lines). Built TDD across 8 commits.judge_from_envis the only code touching real model SDKs, so every test monkeypatches it — the suite stays fully offline.verify, missing-ledger false-positive) addressed in590c6e4.Test Plan
pytest -q— 104 passedruff check .clean,ruff format --check .cleancli.py95% covered (only the real-SDK judge constructors uncovered, by the no-network rule)pip install -e .thenorca checks/orca verify/orca auditwork end-to-end0/1/2) matches README