feat: sp — command-line client for the Sample Platform REST API#1
Open
gaurav02081 wants to merge 1 commit into
Open
feat: sp — command-line client for the Sample Platform REST API#1gaurav02081 wants to merge 1 commit into
gaurav02081 wants to merge 1 commit into
Conversation
sp lets a developer or an AI agent investigate CI runs end-to-end from the terminal (no web frontend): list/show runs, summaries, classified failures, expected-vs-actual diffs, logs, errors, artifacts, samples, regression tests, auth, and a one-shot `investigate` triage command. Output defaults to JSON for agents, with a -o table human view. The API address is configurable via --base-url / SP_BASE_URL. Includes a test suite (pytest), lint/type configs (pycodestyle, pydocstyle, isort, mypy), and a GitHub Actions CI workflow.
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.
Initial import of the
spCLI into its own repo (moved out of thesample-platform PR, per discussion — a client tool belongs in its own
repository, separate from the server that gets deployed on the VM).
What it is
spis a CLI client for the Sample Platform REST API. It lets a developeror an AI agent investigate CI runs end-to-end from the terminal, no web
frontend required:
sp run ls / show / summary / failures / results / resultsp run diff— expected-vs-actual structured diff (auto-resolves the hidden ids)sp run logs / errors / artifactssp investigate <run_id>— one-shot triage: run info + pass/fail counts + classified failuressp sample,sp regression,sp auth,sp healthOutput defaults to JSON (for agents/scripts), with a
-o tablehuman view.Each failure is labelled with a stable code (SEGFAULT, EXIT_CODE_MISMATCH,
OUTPUT_DIFF, …) so you get why a test failed without reading logs.
Notes
--base-url/SP_BASE_URL, so it pointsat any deployment without code changes.
Fully reviewable now; runs against a live server once those are deployed.
isort, mypy), and a GitHub Actions CI workflow.
Opening as a PR for review before merge, as discussed.