diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39024bc..ef09ca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: branches: [main] jobs: + # Single offline gate entry point — same as local `make ci-local`. validate: runs-on: ubuntu-latest @@ -17,46 +18,15 @@ jobs: with: python-version: "3.11" + - uses: actions/setup-node@v4 + with: + node-version: "22" + - name: Install test dependencies run: python -m pip install -e '.[dev]' - - name: Validate skills - run: python scripts/skill_integrity_check.py - - - name: Check hardcoded pricing - run: python scripts/no_hardcoded_pricing.py - - - name: Check reference scope - run: python scripts/reference_scope_check.py - - - name: Check provider scope - run: python scripts/provider_scope_check.py - - - name: Check output contract - run: python scripts/contract_check.py - - - name: Check eval coverage floor - run: python scripts/coverage_check.py - - - name: Validate golden cases - run: python skills/storageops-eval-golden-cases/scripts/golden_case_validator.py skills/storageops-eval-golden-cases/cases - - - name: Validate routing contract - run: python scripts/routing_contract_check.py - - - name: Check repository size gates - run: python scripts/repo_size_gate.py - - - name: Evaluate baseline outputs - run: | - python skills/storageops-eval-golden-cases/scripts/eval_all.py \ - --cases skills/storageops-eval-golden-cases/cases \ - --outputs skills/storageops-eval-golden-cases/baseline-outputs \ - --only-with-outputs \ - --json-out /tmp/storageops-eval.json - - - name: Run tests - run: python -m pytest + - name: Run offline quality gates (make ci-local) + run: make ci-local package: runs-on: ubuntu-latest @@ -74,37 +44,6 @@ jobs: - name: Validate wheel and sdist contents run: python scripts/package_check.py - check-extension: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Validate extension - run: | - echo "=== Checking extension file ===" - if [ ! -f storageops_cli/extensions/storageops.ts ]; then - echo "ERROR: Extension file not found at storageops_cli/extensions/storageops.ts" - exit 1 - fi - if ! grep -q "scan_secrets" storageops_cli/extensions/storageops.ts; then - echo "ERROR: scan_secrets tool not found in extension" - exit 1 - fi - if ! grep -q "detect_domain" storageops_cli/extensions/storageops.ts; then - echo "ERROR: detect_domain tool not found in extension" - exit 1 - fi - if ! grep -q "search_memory" storageops_cli/extensions/storageops.ts; then - echo "ERROR: search_memory tool not found in extension" - exit 1 - fi - if ! grep -q "capture_http_trace" storageops_cli/extensions/storageops.ts; then - echo "ERROR: capture_http_trace tool not found in extension" - exit 1 - fi - echo "Extension validated." - check-docs: runs-on: ubuntu-latest @@ -212,21 +151,3 @@ jobs: # missing required evidence, or forbidden/unsafe output). python skills/storageops-eval-golden-cases/scripts/eval_runner.py \ --case "$CASE" --output /tmp/diag.md - - # Behavioral unit tests for the 4 extension tools. Runs the real functions via - # node:test. The extension's only runtime import is `typebox` (used solely - # inside the default export, which these tests do not call), so a one-line local - # stub satisfies the import without any external dependency. - tool-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22" - - name: Behavioral tests for extension tools - run: | - mkdir -p node_modules/typebox - printf '{"name":"typebox","version":"0.0.0","type":"module","exports":"./index.js"}' > node_modules/typebox/package.json - printf 'export const Type = {};\n' > node_modules/typebox/index.js - node --experimental-strip-types --test tests/extension/*.test.ts diff --git a/AGENTS.md b/AGENTS.md index 89df1a1..c693cce 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,15 +29,18 @@ Packaging is the most fragile part of this repo. `storageops_cli.__init__._packa ```bash make validate # fast skill/extension/doc gates (greps the extension only) -make ci-local # mirror CI validate job (offline; run before PR) +make ci-local # offline PR gate (mirrors CI validate job) make validate-full # alias for ci-local +make test # alias for ci-local +make test-fast # pytest + extension tests + fast validate +make ci-full # ci-local + package-check (pre-release) make dev # one-shot dev setup (venv, Node, storageops install) ``` `make validate` does not exercise the TypeScript extension — the routing, provider, and trace logic is only covered by the extension behavioral tests, so -run `make ci-local` (or `make extension-tests`) when touching -`storageops_cli/extensions/storageops.ts`. `make package-check`, `install-smoke`, +run `make ci-local` (or `make test`) when touching +`storageops_cli/extensions/storageops.ts`. `make ci-full`, `install-smoke`, and `diagnosis-smoke` need a wheel build or network/model key — see `docs/release.md`. ## Editing Skills diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ad4ee1..71f6f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,21 @@ # Changelog -## Unreleased — Dev ergonomics (ci-local, dev_setup, doctor Node hints) +## 2026-06-29 — v0.7.1: Dev ergonomics & CI alignment -- **`make ci-local`** mirrors the CI `validate` job offline (provider/contract/coverage - gates, golden-case validation, pytest, extension tests, baseline eval). `make validate-full` - is now an alias. +- **`make ci-local`** mirrors the offline PR gate (provider/contract/coverage checks, + golden-case validation, pytest, extension tests, size/routing gates, baseline eval). + `make validate-full` and **`make test`** are aliases. +- **`make test-fast`** for a quicker loop (pytest + extension tests + fast `validate`). +- **`make ci-full`** runs `ci-local` plus `make package-check` (pre-release). - **`make dev` / `scripts/dev_setup.sh`** one-shot setup: venv, editable install, Node >= 22.19 (nvm fallback), `storageops install --force`, and `storageops doctor`. -- **`make package-check`** builds a wheel and runs `package_check.py` locally. - **`storageops doctor`** suggests an nvm Node `PATH` prefix when the active Node is < 22.19 (`node_path_hint` in `--json` output). +- **CI `validate` job** now runs `make ci-local` with Node 22 (drops duplicate + `check-extension` and `tool-tests` jobs; extension grep + behavioral tests live in + `make ci-local`). +- **Docs** unified to recommend `make ci-local` / `make dev` in getting-started, + skill-quality-guide, and quick-reference. ## 2026-06-21 — v0.7.0: Unify & Complete (major iteration) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb27ae6..ab95343 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,12 +89,13 @@ Edit `storageops_cli/__init__.py`. Be careful with: Run these from the repository root before opening a PR: ```bash -make ci-local # mirrors CI validate job (offline) -make package-check # wheel build + package_check.py (needs network once) +make ci-local # offline PR gate (mirrors CI validate job) +make ci-full # optional pre-release: ci-local + package-check ``` -`make ci-local` runs skill gates, provider/contract/coverage checks, golden-case -validation, pytest, extension tests, size/routing gates, and baseline eval. +`make test` is an alias for `make ci-local`. Use `make test-fast` for a quicker +edit loop (pytest + extension tests + fast `validate` only). + Individual scripts (for targeted debugging): ```bash diff --git a/Makefile b/Makefile index b16038f..d8f13bd 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,16 @@ -.PHONY: help validate validate-full ci-local extension-tests test install dev package-check +.PHONY: help validate validate-full ci-local ci-full extension-tests test-fast test install dev package-check help: @echo "StorageOps — Pi Coding Agent extension + skill pack" @echo "" @echo "Usage:" @echo " make validate Fast skill/extension/doc gates (no tests run)" - @echo " make ci-local Mirror CI validate job (offline; run before PR)" + @echo " make ci-local Offline PR gate (mirrors CI validate job; run before PR)" @echo " make validate-full Alias for ci-local" + @echo " make ci-full ci-local + package-check (pre-release)" + @echo " make test Alias for ci-local" + @echo " make test-fast pytest + extension tests + fast validate only" @echo " make extension-tests Run the TypeScript extension behavioral tests" - @echo " make test Run pytest, extension tests, and validation" @echo " make install Install thin CLI shim (pip install -e .)" @echo " make dev One-shot dev setup (venv, Node, storageops install)" @echo " make package-check Build wheel and run package_check.py (needs network once)" @@ -51,11 +53,16 @@ ci-local: validate validate-full: ci-local -test: +test: ci-local + +test-fast: python3 -m pytest $(MAKE) extension-tests $(MAKE) validate +ci-full: ci-local + $(MAKE) package-check + install: pip install -e . diff --git a/README.md b/README.md index 938ff8b..2d06e83 100644 --- a/README.md +++ b/README.md @@ -184,15 +184,18 @@ Run quality gates from a checkout: ```bash make validate # fast skill/extension/doc gates (greps the extension) -make ci-local # mirror CI validate job (offline; run before PR) +make ci-local # offline PR gate (mirrors CI validate job) make validate-full # alias for ci-local +make test # alias for ci-local +make test-fast # faster loop while editing +make ci-full # pre-release: ci-local + package-check make dev # one-shot dev setup (venv, Node, storageops install) ``` `make validate` only *greps* the TypeScript extension; the routing, provider, and trace behavior is covered by the extension tests, so run `make ci-local` (or `make test`) before changing `storageops_cli/extensions/storageops.ts`. -`make package-check`, `install-smoke`, and `diagnosis-smoke` need a wheel build +`make ci-full`, `install-smoke`, and `diagnosis-smoke` need a wheel build or network/model key — see [Release](docs/release.md). ## Documentation Map diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index fc529af..d6198f8 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -1,6 +1,6 @@ # Architecture -StorageOps v0.7.0 is a Pi Coding Agent extension and skill pack. +StorageOps v0.7.1 is a Pi Coding Agent extension and skill pack. ## Components diff --git a/docs/cli-reference.md b/docs/cli-reference.md index b95b1d1..fe27cdd 100644 --- a/docs/cli-reference.md +++ b/docs/cli-reference.md @@ -41,7 +41,7 @@ from the older local package. Deployment provenance is written to ## `storageops --version` ```text -StorageOps v0.7.0 (pi: 0.78.0) +StorageOps v0.7.1 (pi: 0.78.0) httpmon : /root/.storageops/bin/httpmon api key : api-key file independent install : yes (~/.storageops/agent) diff --git a/docs/getting-started.md b/docs/getting-started.md index f4839d8..1daf2d7 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -156,10 +156,19 @@ v...` value before relying on the deployed skills. ## 6. Validate a Checkout ```bash -python3 scripts/skill_integrity_check.py -python3 skills/storageops-eval-golden-cases/scripts/golden_case_validator.py \ - skills/storageops-eval-golden-cases/cases -make validate +make ci-local +``` + +For a faster edit loop while iterating on tests or the extension: + +```bash +make test-fast +``` + +Before a release, also run: + +```bash +make ci-full ``` ## Troubleshooting diff --git a/docs/quick-reference.md b/docs/quick-reference.md index 3780148..7f17b60 100644 --- a/docs/quick-reference.md +++ b/docs/quick-reference.md @@ -101,11 +101,7 @@ python3 skills/storageops-eval-golden-cases/scripts/eval_all.py \ ## Validate ```bash -python3 scripts/skill_integrity_check.py -python3 scripts/routing_contract_check.py -python3 scripts/repo_size_gate.py -python3 scripts/package_check.py -python3 skills/storageops-eval-golden-cases/scripts/eval_all.py --cases skills/storageops-eval-golden-cases/cases --outputs skills/storageops-eval-golden-cases/baseline-outputs --only-with-outputs -make validate -.venv/bin/python -m pytest +make ci-local # PR gate (offline) +make test-fast # faster loop while editing +make ci-full # pre-release: ci-local + package-check ``` diff --git a/docs/release.md b/docs/release.md index 229dc71..98181d7 100644 --- a/docs/release.md +++ b/docs/release.md @@ -27,7 +27,7 @@ Trusted Publisher. ```bash make ci-local - make package-check # optional; wheel build + package_check.py + make ci-full # optional pre-release: + package-check ``` 3. Merge the release PR to `main`. diff --git a/docs/skill-quality-guide.md b/docs/skill-quality-guide.md index b7d75dd..788b35b 100644 --- a/docs/skill-quality-guide.md +++ b/docs/skill-quality-guide.md @@ -59,17 +59,16 @@ recompute — never by re-issuing the write. Live tracing stays read-only. ## Validation -Run: +Run before opening a PR: ```bash -python3 scripts/skill_integrity_check.py -python3 scripts/no_hardcoded_pricing.py -python3 scripts/reference_scope_check.py -python3 skills/storageops-eval-golden-cases/scripts/golden_case_validator.py \ - skills/storageops-eval-golden-cases/cases -python3 scripts/routing_contract_check.py -make validate -.venv/bin/python -m pytest +make ci-local +``` + +For a faster loop while editing tests or the extension: + +```bash +make test-fast ``` ## Golden Cases diff --git a/pyproject.toml b/pyproject.toml index ac073bc..de1c869 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "storageops" -version = "0.7.0" +version = "0.7.1" description = "StorageOps — S3-compatible object storage diagnostic toolkit. A Pi Coding Agent extension + skill pack." requires-python = ">=3.11" readme = "README.md" diff --git a/skill-registry.yaml b/skill-registry.yaml index 891145f..8819a71 100644 --- a/skill-registry.yaml +++ b/skill-registry.yaml @@ -1,4 +1,4 @@ -# StorageOps Skill Registry v0.7.0 +# StorageOps Skill Registry v0.7.1 # Machine-readable metadata for all StorageOps skills. # Skills are auto-discovered by Pi from the skills/ directory.