diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84bc840..76baeec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - name: cargo clippy run: cargo clippy --locked --all-targets -- -D warnings - name: cargo test - # Also builds target/debug/panthera, which the adapter end-to-end tests run. + # Also builds target/debug/diffprowl, which the adapter end-to-end tests run. run: cargo test --locked - name: ruff run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af45b92..de43cf7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,14 +66,14 @@ jobs: - name: Build static x86_64 musl binary run: | docker run --rm --platform linux/amd64 -v "$PWD:/src" -w /src "$LINUX_BUILDER" \ - sh -ec 'apk add --no-cache musl-dev >/dev/null && cargo build --release --locked && ./target/release/panthera --version' + sh -ec 'apk add --no-cache musl-dev >/dev/null && cargo build --release --locked && ./target/release/diffprowl --version' mkdir -p dist - cp target/release/panthera dist/panthera-linux-x86_64 - LC_ALL=C file -b dist/panthera-linux-x86_64 | grep -Eq 'statically linked|static-pie linked' + cp target/release/diffprowl dist/diffprowl-linux-x86_64 + LC_ALL=C file -b dist/diffprowl-linux-x86_64 | grep -Eq 'statically linked|static-pie linked' - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: panthera-linux-x86_64 - path: dist/panthera-linux-x86_64 + name: diffprowl-linux-x86_64 + path: dist/diffprowl-linux-x86_64 if-no-files-found: error retention-days: 7 @@ -91,13 +91,13 @@ jobs: rustup default "$RUST_TOOLCHAIN" test "$(uname -m)" = arm64 cargo build --release --locked - ./target/release/panthera --version + ./target/release/diffprowl --version mkdir -p dist - cp target/release/panthera dist/panthera-darwin-arm64 + cp target/release/diffprowl dist/diffprowl-darwin-arm64 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: panthera-darwin-arm64 - path: dist/panthera-darwin-arm64 + name: diffprowl-darwin-arm64 + path: dist/diffprowl-darwin-arm64 if-no-files-found: error retention-days: 7 @@ -122,8 +122,8 @@ jobs: WORKFLOW_REF: ${{ github.workflow_ref }} run: | cd dist - chmod 0755 panthera-* - sha256sum panthera-darwin-arm64 panthera-linux-x86_64 > SHA256SUMS + chmod 0755 diffprowl-* + sha256sum diffprowl-darwin-arm64 diffprowl-linux-x86_64 > SHA256SUMS python3 - <<'EOF' import hashlib, json, os def sha(name): @@ -134,8 +134,8 @@ jobs: "tag": os.environ["TAG"], "source_commit": os.environ["GITHUB_SHA"], "assets": { - "linux-x86_64": {"name": "panthera-linux-x86_64", "sha256": sha("panthera-linux-x86_64")}, - "darwin-arm64": {"name": "panthera-darwin-arm64", "sha256": sha("panthera-darwin-arm64")}, + "linux-x86_64": {"name": "diffprowl-linux-x86_64", "sha256": sha("diffprowl-linux-x86_64")}, + "darwin-arm64": {"name": "diffprowl-darwin-arm64", "sha256": sha("diffprowl-darwin-arm64")}, }, "builder": { "workflow_ref": os.environ["WORKFLOW_REF"], @@ -166,6 +166,6 @@ jobs: echo "release $TAG already exists; refusing to overwrite its assets"; exit 1 fi gh release create "$TAG" -R "$GITHUB_REPOSITORY" --verify-tag $flags \ - --title "Panthera $TAG" \ + --title "DiffProwl $TAG" \ --notes "Built by $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID. See CHANGELOG.md and build.json." \ - dist/panthera-linux-x86_64 dist/panthera-darwin-arm64 dist/SHA256SUMS dist/build.json + dist/diffprowl-linux-x86_64 dist/diffprowl-darwin-arm64 dist/SHA256SUMS dist/build.json diff --git a/AGENTS.md b/AGENTS.md index ad8e938..e6bb180 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# Panthera +# DiffProwl LLM-free Rust engine with an optional Python shadow adapter. Keep application-specific scopes in their application repository. 9lives integration is planned, not implemented. diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ea7a4..1892e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,14 @@ # Changelog -All notable changes to Panthera. Versions follow the tags whose binaries +All notable changes to DiffProwl. Versions follow the tags whose binaries consumers pin; see `build.json` in each release for the producing workflow run. ## [Unreleased] +- Renamed Panthera to DiffProwl. New builds use the `diffprowl` binary and asset names. + The pytest plugins accept both `--diffprowl-*` and legacy `--panthera-*` options. +- Licensed the project source code under Apache-2.0. + ## [0.2.0-rc.2] First release built and uploaded by the release workflow rather than by hand. diff --git a/Cargo.lock b/Cargo.lock index 96f0017..0f24b2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,7 +75,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] -name = "panthera" +name = "diffprowl" version = "0.2.0-rc.2" dependencies = [ "serde", diff --git a/Cargo.toml b/Cargo.toml index 944aab9..867bb68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [package] -name = "panthera" +license = "Apache-2.0" +name = "diffprowl" version = "0.2.0-rc.2" edition = "2024" publish = false diff --git a/LICENSE b/LICENSE index 4502817..d645695 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,202 @@ -Copyright (c) 2026 Quality-Max. All rights reserved. -This software is proprietary and confidential. No license is granted to use, -copy, modify, distribute or create derivative works of it, in whole or in -part, except as expressly authorized in writing by Quality-Max. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index a7d91b9..5e423e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Panthera +# DiffProwl ![A black panther following a selected path through a dependency graph](assets/panthera-hero.png) @@ -20,7 +20,7 @@ From the repository root (tested with Rust/Cargo 1.94.1): cargo test --locked cargo clippy --locked --all-targets -- -D warnings cargo build --release --locked -target/release/panthera demo artifacts/demo 32 25 +target/release/diffprowl demo artifacts/demo 32 25 ``` The demo executes six contracts across 32 seeds: 192 scenarios per full suite. @@ -30,8 +30,8 @@ All generated JSON artifacts are named by SHA-256 of their serialized contents. Use the printed report path or redirect stdout to keep a convenient index. ```sh -target/release/panthera run artifacts/demo none 32 -target/release/panthera run artifacts/demo double_release 32 +target/release/diffprowl run artifacts/demo none 32 +target/release/diffprowl run artifacts/demo double_release 32 ``` To reuse evidence, append the **evidence artifact** path from the first run's @@ -39,8 +39,8 @@ To reuse evidence, append the **evidence artifact** path from the first run's failure, pass an artifact listed in a report's `replays` field: ```text -panthera run OUTPUT_DIR DEFECT [SEEDS=32] [BASELINE_EVIDENCE.json] -panthera replay REPLAY.json +diffprowl run OUTPUT_DIR DEFECT [SEEDS=32] [BASELINE_EVIDENCE.json] +diffprowl replay REPLAY.json ``` Exit codes: `0` successful run, successful experiment, or exact replay match; @@ -174,9 +174,9 @@ python3 -m venv .venv .venv/bin/python -m pip install -r adapter/requirements-dev.txt cargo build --release --locked .venv/bin/python adapter/shadow.py . examples/pytest_demo/scope.json \ - target/release/panthera artifacts/before + target/release/diffprowl artifacts/before .venv/bin/python adapter/shadow.py . examples/pytest_demo/scope.json \ - target/release/panthera artifacts/unchanged --baseline artifacts/before/baseline.json + target/release/diffprowl artifacts/unchanged --baseline artifacts/before/baseline.json ``` Use a new output directory each time. The second comparison should execute no @@ -221,7 +221,7 @@ runs both selections. Peak memory, provider cost and CI billing are not measured ## Opt-in pytest CI selection -`adapter/pytest_ci.py` applies a trusted Panthera plan in ordinary pytest and +`adapter/pytest_ci.py` applies a trusted DiffProwl plan in ordinary pytest and pytest-xdist jobs. Enable it for a reviewed content file whose tests have been qualified in the application repository. The application CI owns the baseline, plan generation, path allowlist, and schedule for full comparisons. @@ -232,11 +232,11 @@ external artifact directory and the `--option=value` form to keep artifact paths out of pytest's root directory inference: ```sh -PYTHONPATH="/path/to/panthera/adapter${PYTHONPATH:+:$PYTHONPATH}" \ +PYTHONPATH="/path/to/diffprowl/adapter${PYTHONPATH:+:$PYTHONPATH}" \ python -m pytest -p pytest_ci \ - --panthera-plan=/ci-artifacts/panthera-plan.json \ - --panthera-select-path=static/landing.html \ - --panthera-receipt=/ci-artifacts/panthera-execution.json + --diffprowl-plan=/ci-artifacts/diffprowl-plan.json \ + --diffprowl-select-path=static/landing.html \ + --diffprowl-receipt=/ci-artifacts/diffprowl-execution.json ``` CI wraps the engine's `selected` and `expand` fields in a JSON object with @@ -256,7 +256,7 @@ The execution receipt reports selected or full mode, the fallback reason, counts of collected, scheduled, attempted, and failed tests, pytest's exit code, validation time, pytest wall time, and supplied planning time. Collection failures can produce an incomplete receipt. A job supplying -only `--panthera-receipt` records an ordinary full comparison. Use fresh jobs +only `--diffprowl-receipt` records an ordinary full comparison. Use fresh jobs with the same inputs and account for planning and baseline maintenance when measuring CI savings. @@ -266,7 +266,7 @@ Its campaign also seeds two faults that would allow an earlier transient error to mask a later permanent error, one in the worker and one in its dependency: ```sh -target/release/panthera qualify . examples/ci_demo/scope.json \ +target/release/diffprowl qualify . examples/ci_demo/scope.json \ examples/ci_demo/campaign.json artifacts/ci-demo --python .venv/bin/python ``` @@ -279,7 +279,7 @@ The release binary embeds the adapter; Python 3.11+, pytest, pytest-asyncio and application's test dependencies must still be installed in the chosen interpreter. ```sh -target/release/panthera qualify . examples/pytest_demo/scope.json \ +target/release/diffprowl qualify . examples/pytest_demo/scope.json \ examples/pytest_demo/campaign.json artifacts/qualification \ --python .venv/bin/python --timeout 180 ``` @@ -342,7 +342,7 @@ five example trials and three QualityMax faults against a 449-test scope. ## Relationship to 9lives -Panthera owns selection and evidence-reuse decisions. 9lives owns browser execution +DiffProwl owns selection and evidence-reuse decisions. 9lives owns browser execution and execution receipts. They remain separate repositories, with a planned adapter exchanging versioned plans and receipts. The current `shadow-plan` schema is an experimental local pytest contract; **no 9lives integration is implemented yet**. @@ -361,7 +361,7 @@ and filesystem inputs. The elapsed planning and export times are distinct from the cost of running or profiling pytest. The full pytest command retains its original exit status and runs without applying the plan. -Use a checked-out, pinned Panthera source revision with its `adapter/` directory +Use a checked-out, pinned DiffProwl source revision with its `adapter/` directory and a matching schema 2 binary. Install pytest-cov in the job's Python environment. In the application, commit an observer JSON such as `{"discover_roots":["src"]}` or `{"targets":["app.py"]}`. Run from the Git root with pytest's rootdir set to @@ -370,13 +370,13 @@ observer and coverage options to both invocations: ```sh # Bash, run from the application Git root. -export PYTHONPATH="$PANTHERA_SRC/adapter${PYTHONPATH:+:$PYTHONPATH}" -output=.context/panthera-unit +export PYTHONPATH="$DIFFPROWL_SRC/adapter${PYTHONPATH:+:$PYTHONPATH}" +output=.context/diffprowl-unit mkdir -p "$output" -options=(--config ci/panthera-unit.json --output "$output" - --engine "$PANTHERA_BIN" --engine-sha256 "$PANTHERA_SHA256") +options=(--config ci/diffprowl-unit.json --output "$output" + --engine "$DIFFPROWL_BIN" --engine-sha256 "$DIFFPROWL_SHA256") suite=(tests/unit/ --rootdir="$PWD" --cov=src) -observed=("${suite[@]}" --cov-context=test -p pytest_observer --panthera-output "$output") +observed=("${suite[@]}" --cov-context=test -p pytest_observer --diffprowl-output "$output") if python -m pytest_observer "${options[@]}" prepare -- "${observed[@]}"; then if COVERAGE_FILE="$PWD/$output/.coverage" python -m pytest "${observed[@]}"; then status=0 @@ -456,6 +456,8 @@ both selected and full suites. See the [security-inclusive shadow validation](docs/security-shadow-2026-11-20.md) for a bounded whole-suite experiment and its execution limits. +The pytest plugins also accept the original `--panthera-*` spellings. + ## Development ```sh @@ -479,7 +481,7 @@ section. It runs the CI checks, builds a static x86-64 musl binary in `rust:1.94.1-alpine3.22` (pinned by digest, `--platform linux/amd64`) and a macOS arm64 binary on `macos-15`, then uploads them with `SHA256SUMS` and a schema 2 `build.json` naming the workflow run, toolchain and builder. Existing -releases are never overwritten. `panthera --version` identifies the build. +releases are never overwritten. `diffprowl --version` identifies the build. Consumers must pin both the release and the SHA-256 of their platform asset, and should check that the asset uploader is `github-actions[bot]` and that @@ -530,7 +532,7 @@ Its campaign seed deterministically orders the declared cases; this is a curated campaign, not random repository-wide fault coverage. Run: ```sh -target/debug/panthera qualify . examples/input_demo/scope.json \ +target/debug/diffprowl qualify . examples/input_demo/scope.json \ examples/input_demo/campaign.json artifacts/input-campaign \ --python .venv/bin/python --full-every 5 ``` @@ -602,3 +604,7 @@ by the user named in the `QMAX_DOCS_APPROVER` repository variable, for one exact reviewed commit. Enable Pages with **Source: GitHub Actions** and set that variable before the first run. Do not place evidence, scopes, receipts or application details under `site/`. + +## License + +Copyright (c) 2026 Quality-Max. The project source code is licensed under the [Apache License, Version 2.0](LICENSE). diff --git a/SECURITY.md b/SECURITY.md index fbed5e9..4a82117 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,13 +1,13 @@ # Security -Panthera is a private Quality-Max project. Report suspected vulnerabilities +DiffProwl is a private Quality-Max project. Report suspected vulnerabilities privately to the maintainers, not in issues, pull requests or chat: use a private GitHub security advisory on this repository. ## Scope and trust model -- Panthera executes the test suites it is pointed at. Repository code, scope - files and evidence are trusted input; Panthera is not a sandbox. +- DiffProwl executes the test suites it is pointed at. Repository code, scope + files and evidence are trusted input; DiffProwl is not a sandbox. - Baselines and receipts are trusted CI evidence, not signed attestations. Content hashes detect change; they do not authenticate an author. - Release binaries are built and uploaded only by `.github/workflows/release.yml`. diff --git a/adapter/history.py b/adapter/history.py index 237df15..42c942f 100644 --- a/adapter/history.py +++ b/adapter/history.py @@ -124,7 +124,7 @@ def remaining(): if "discover" in scoped: scoped["discover"] = {**scoped["discover"], "suites": scoped["suites"]} item["requested_suites"] = scoped["suites"] - with tempfile.TemporaryDirectory(prefix="panthera-history-") as temp: + with tempfile.TemporaryDirectory(prefix="diffprowl-history-") as temp: root = Path(temp) base, head, work = root / "base", root / "head", root / "work" prep = q.clock() diff --git a/adapter/pytest_ci.py b/adapter/pytest_ci.py index 90f25e7..2a2f08c 100644 --- a/adapter/pytest_ci.py +++ b/adapter/pytest_ci.py @@ -1,4 +1,4 @@ -"""Apply a CI-produced Panthera plan to one explicitly allowed content edit.""" +"""Apply a CI-produced DiffProwl plan to one explicitly allowed content edit.""" import json import math @@ -15,10 +15,16 @@ def pytest_addoption(parser): - group = parser.getgroup("panthera") - group.addoption("--panthera-plan", type=Path, help="Trusted Panthera CI plan JSON") - group.addoption("--panthera-select-path", help="Allow selection for a content edit to this Git-root-relative path") - group.addoption("--panthera-receipt", type=Path, help="Write a Panthera CI execution receipt") + group = parser.getgroup("diffprowl") + group.addoption("--diffprowl-plan", "--panthera-plan", type=Path, help="Trusted DiffProwl CI plan JSON") + group.addoption( + "--diffprowl-select-path", + "--panthera-select-path", + help="Allow selection for a content edit to this Git-root-relative path", + ) + group.addoption( + "--diffprowl-receipt", "--panthera-receipt", type=Path, help="Write a DiffProwl CI execution receipt" + ) def read_plan(path): @@ -78,8 +84,8 @@ def git(*args): def validate_plan(config): - path = config.getoption("panthera_select_path") - plan_path = config.getoption("panthera_plan") + path = config.getoption("diffprowl_select_path") + plan_path = config.getoption("diffprowl_plan") if not path: return None, "selection_disabled" if config.option.collectonly: @@ -143,7 +149,7 @@ def pytest_configure_node(self, node): inventory = None if self.reason is None: inventory = {key: self.plan[key] for key in ("baseline_tests", "selected")} - node.workerinput["panthera"] = (inventory, self.reason) + node.workerinput["diffprowl"] = (inventory, self.reason) @pytest.hookimpl(optionalhook=True) def pytest_xdist_node_collection_finished(self, node, ids): @@ -154,7 +160,7 @@ def pytest_xdist_node_collection_finished(self, node, ids): @pytest.hookimpl(optionalhook=True) def pytest_testnodedown(self, node, error): - self.workers.append(getattr(node, "workeroutput", {}).get("panthera_collection")) + self.workers.append(getattr(node, "workeroutput", {}).get("diffprowl_collection")) def pytest_collectreport(self, report): self.collection_failed |= report.failed @@ -197,23 +203,23 @@ def pytest_sessionfinish(self, session, exitstatus): except OSError: reporter = session.config.pluginmanager.get_plugin("terminalreporter") if reporter is not None: - reporter.write_line("Panthera could not write the CI receipt.") + reporter.write_line("DiffProwl could not write the CI receipt.") class WorkerSelection(Selection): def pytest_sessionfinish(self, session): - session.config.workeroutput["panthera_collection"] = self.collection + session.config.workeroutput["diffprowl_collection"] = self.collection def pytest_configure(config): if hasattr(config, "workerinput"): - if "panthera" in config.workerinput: - config.pluginmanager.register(WorkerSelection(*config.workerinput["panthera"])) + if "diffprowl" in config.workerinput: + config.pluginmanager.register(WorkerSelection(*config.workerinput["diffprowl"])) return - receipt = config.getoption("panthera_receipt") + receipt = config.getoption("diffprowl_receipt") if receipt is None: - if config.getoption("panthera_select_path") or config.getoption("panthera_plan"): - raise pytest.UsageError("Panthera selection requires --panthera-receipt") + if config.getoption("diffprowl_select_path") or config.getoption("diffprowl_plan"): + raise pytest.UsageError("DiffProwl selection requires --diffprowl-receipt") return start = time.perf_counter() plan, reason = validate_plan(config) diff --git a/adapter/pytest_observer.py b/adapter/pytest_observer.py index ec37f14..cc4fc86 100644 --- a/adapter/pytest_observer.py +++ b/adapter/pytest_observer.py @@ -1,4 +1,4 @@ -"""Observe input dependencies and compare a Panthera plan with full pytest. +"""Observe input dependencies and compare a DiffProwl plan with full pytest. Run prepare before pytest and finish after it. This plugin leaves collection and execution unfiltered. Receipts retain test IDs, phases and tracked input paths. @@ -597,7 +597,7 @@ def pytest_runtest_logreport(self, report): phases[report.when] = report.outcome def pytest_sessionfinish(self, session, exitstatus): - output = Path(session.config.getoption("panthera_output")) + output = Path(session.config.getoption("diffprowl_output")) try: self.save(output, exitstatus, session.config) except Exception: @@ -821,7 +821,7 @@ def pytest_make_collect_report(self, collector): def pytest_sessionfinish(self, session): self.active = False - output = Path(session.config.getoption("panthera_output")) + output = Path(session.config.getoption("diffprowl_output")) def plain(value): return {key: sorted(item) if isinstance(item, set) else item for key, item in value.items()} @@ -844,16 +844,16 @@ def plain(value): def pytest_addoption(parser): - parser.addoption("--panthera-output", default=str(DEFAULT_OUTPUT)) + parser.addoption("--diffprowl-output", "--panthera-output", default=str(DEFAULT_OUTPUT)) def pytest_configure(config): workerinput = getattr(config, "workerinput", None) if workerinput is None: - config.pluginmanager.register(Recorder(), "panthera-receipts") + config.pluginmanager.register(Recorder(), "diffprowl-receipts") recorder = InputRecorder(config.rootpath, workerinput["workerid"] if workerinput else "main") sys.addaudithook(recorder.audit) - config.pluginmanager.register(recorder, "panthera-inputs") + config.pluginmanager.register(recorder, "diffprowl-inputs") # ------------------------------------------------------------ evidence export @@ -1214,7 +1214,7 @@ def finish(root, output, engine, pytest_exit, config_path): def summary(output, message, report=None): path = output / "summary.md" path.parent.mkdir(parents=True, exist_ok=True) - lines = [f"### Panthera observation\n\nℹ️ {message}. Full pytest result remains authoritative.\n"] + lines = [f"### DiffProwl observation\n\nℹ️ {message}. Full pytest result remains authoritative.\n"] if report: lines.append(f"\n- Baseline: {report['baseline']}") inputs = report.get("inputs") or {} diff --git a/adapter/qualify.py b/adapter/qualify.py index aeae3d2..995f7cd 100644 --- a/adapter/qualify.py +++ b/adapter/qualify.py @@ -235,7 +235,7 @@ def campaign(repository, config, mutations, engine, output, timeout, full_every= report["execution_order"] = [trial["id"] for trial in mutations["trials"]] write(output / "report.json", report) try: - with tempfile.TemporaryDirectory(prefix="panthera-qualify-") as temp: + with tempfile.TemporaryDirectory(prefix="diffprowl-qualify-") as temp: pristine, root = Path(temp) / "pristine", Path(temp) / "work" pristine.mkdir() a.mirror(pristine, repository) diff --git a/adapter/shadow.py b/adapter/shadow.py index dc0c455..a88f07e 100644 --- a/adapter/shadow.py +++ b/adapter/shadow.py @@ -1,4 +1,4 @@ -"""Panthera generic offline pytest shadow adapter; no CI skipping.""" +"""DiffProwl generic offline pytest shadow adapter; no CI skipping.""" from __future__ import annotations @@ -605,7 +605,7 @@ def main(): configure(json.loads(args.config.read_text()), args.repository.resolve()) output = args.output.resolve() output.mkdir(parents=True, exist_ok=False) - with tempfile.TemporaryDirectory(prefix="panthera-shadow-") as temp: + with tempfile.TemporaryDirectory(prefix="diffprowl-shadow-") as temp: root = Path(temp) mirror(root, args.repository.resolve()) baseline = json.loads(args.baseline.read_text()) if args.baseline else None diff --git a/adapter/test_fixtures.py b/adapter/test_fixtures.py index 0e4e132..48f713e 100644 --- a/adapter/test_fixtures.py +++ b/adapter/test_fixtures.py @@ -28,7 +28,7 @@ def test_primed_dynamic_cached_wrapper_retains_producer(self): "def test_reuse(wrapped): assert wrapped == 1\n" ) a.configure({"targets": [service.name], "suites": ["test_value.py"], "fixture_tracking": "consumers"}) - engine = ROOT / "target/debug/panthera" + engine = ROOT / "target/debug/diffprowl" before = a.snapshot(root, engine) profile = a.run_tests(root, root / "profile.json") q.validate_run(profile) @@ -124,7 +124,7 @@ def test_cached_consumers_both_orders_and_lifetimes(self): self.assertEqual(profile["exit_code"], 0) unrelated = profile["tests"]["test_value.py::test_unrelated"]["dependencies"] self.assertNotIn("service.py::value", unrelated) - before = a.snapshot(root, ROOT / "target/debug/panthera") + before = a.snapshot(root, ROOT / "target/debug/diffprowl") baseline = { **before, "tests": { @@ -134,7 +134,10 @@ def test_cached_consumers_both_orders_and_lifetimes(self): } service.write_text("def value(): return 0\ndef other(): return 2\n") plan = a.plan_shadow( - a.snapshot(root, ROOT / "target/debug/panthera"), baseline, root, ROOT / "target/debug/panthera" + a.snapshot(root, ROOT / "target/debug/diffprowl"), + baseline, + root, + ROOT / "target/debug/diffprowl", ) self.assertEqual(len(plan["selected"]), 4) selected = a.run_tests(root, root / "selected.json", plan["selected"], False) diff --git a/adapter/test_history.py b/adapter/test_history.py index 366b357..4199575 100644 --- a/adapter/test_history.py +++ b/adapter/test_history.py @@ -50,7 +50,7 @@ def commit(): "worker_timeout_seconds": 10, "periodic_full_every": 3, } - result = history.replay(repo, config, manifest, ROOT / "target/debug/panthera", root / "out") + result = history.replay(repo, config, manifest, ROOT / "target/debug/diffprowl", root / "out") full = json.loads((root / "out/1/full.json").read_text()) self.assertEqual(full["exit_code"], 0) self.assertEqual(result["complete"], not invalid) @@ -107,7 +107,7 @@ def commit(): "worker_timeout_seconds": 10, "periodic_full_every": 3, } - result = history.replay(repo, config, manifest, ROOT / "target/debug/panthera", root / "out") + result = history.replay(repo, config, manifest, ROOT / "target/debug/diffprowl", root / "out") self.assertTrue(result["matches_full"], result) first, second, third = result["trials"] self.assertEqual(first["selected_cases"], 1) @@ -122,9 +122,9 @@ def commit(): ) self.assertEqual(json.loads((root / "out/manifest.json").read_text()), manifest) with self.assertRaises(ValueError): - history.replay(repo, config, {**manifest, "pilot": []}, ROOT / "target/debug/panthera", root / "empty") + history.replay(repo, config, {**manifest, "pilot": []}, ROOT / "target/debug/diffprowl", root / "empty") manifest["wall_budget_seconds"] = 0.000000001 - exhausted = history.replay(repo, config, manifest, ROOT / "target/debug/panthera", root / "exhausted") + exhausted = history.replay(repo, config, manifest, ROOT / "target/debug/diffprowl", root / "exhausted") self.assertFalse(exhausted["complete"]) self.assertFalse(exhausted["cost_projection_available"]) self.assertTrue(all(item["error_type"] == "TimeoutError" for item in exhausted["trials"])) diff --git a/adapter/test_inputs.py b/adapter/test_inputs.py index 78c23a0..4aa6afa 100644 --- a/adapter/test_inputs.py +++ b/adapter/test_inputs.py @@ -25,7 +25,7 @@ def test_collection_hook_body_change_expands_for_added_parameter(self): ) suite.write_text(source) a.configure({"targets": ["service.py"], "suites": [suite.name], "input_tracking": "files"}) - engine = ROOT / "target/debug/panthera" + engine = ROOT / "target/debug/diffprowl" before = a.snapshot(root, engine) profile = a.run_tests(root, root / "profile.json") q.validate_run(profile) @@ -69,7 +69,7 @@ def test_stratified_campaign_and_discovery(self): self.assertEqual(len(resolved["suites"]), 3) cases = json.loads((fixture / "campaign.json").read_text()) cases["trials"] = cases["trials"][:7] - report = q.campaign(repo, config, cases, ROOT / "target/debug/panthera", root / "out", 30, 3) + report = q.campaign(repo, config, cases, ROOT / "target/debug/diffprowl", root / "out", 30, 3) self.assertTrue(report["qualified"], report) self.assertEqual(json.loads((root / "out/campaign.json").read_text()), cases) self.assertEqual(report["execution_order"], [trial["id"] for trial in report["trials"]]) diff --git a/adapter/test_pytest_ci.py b/adapter/test_pytest_ci.py index e3b14e7..f17615b 100644 --- a/adapter/test_pytest_ci.py +++ b/adapter/test_pytest_ci.py @@ -15,7 +15,7 @@ import shadow ROOT = Path(__file__).resolve().parents[1] -ENGINE = ROOT / "target/debug/panthera" +ENGINE = ROOT / "target/debug/diffprowl" EXAMPLE = ROOT / "examples/ci_demo" @@ -42,7 +42,7 @@ def git(self, *args): [ "git", "-c", - "user.name=Panthera", + "user.name=DiffProwl", "-c", "user.email=test@example.test", "-c", @@ -86,7 +86,7 @@ def plan_landing_fault(self): def pytest(self, name, *args, enable=True): receipt = self.temp / f"{name}.json" results = self.temp / f"{name}.xml" - policy = [f"--panthera-plan={self.plan_path}", "--panthera-select-path=landing.html"] if enable else [] + policy = [f"--diffprowl-plan={self.plan_path}", "--diffprowl-select-path=landing.html"] if enable else [] command = [ sys.executable, "-m", @@ -95,7 +95,7 @@ def pytest(self, name, *args, enable=True): "no:cacheprovider", "-p", "pytest_ci", - f"--panthera-receipt={receipt}", + f"--diffprowl-receipt={receipt}", f"--junitxml={results}", "-q", "--tb=no", diff --git a/adapter/test_pytest_observer.py b/adapter/test_pytest_observer.py index be80acc..ba1dc8a 100644 --- a/adapter/test_pytest_observer.py +++ b/adapter/test_pytest_observer.py @@ -12,7 +12,7 @@ import pytest_observer as observer ADAPTER = Path(__file__).resolve().parent -ENGINE = ADAPTER.parent / "target/debug/panthera" +ENGINE = ADAPTER.parent / "target/debug/diffprowl" REGISTRY = "tests/test_registry.py::test_registry" SERVICE = ( "registry = []\n\ndef register(fn):\n registry.append(fn.__name__)\n return fn\n\ndef a():\n return 1\n" @@ -58,7 +58,7 @@ def setUp(self): "pytest_observer", "-n", "2", - "--panthera-output", + "--diffprowl-output", str(self.output), ] self.run_command("git", "init", "-q") @@ -90,7 +90,7 @@ def commit(self, message): self.run_command( "git", "-c", - "user.name=Panthera", + "user.name=DiffProwl", "-c", "user.email=test@example.test", "-c", diff --git a/adapter/test_qualify.py b/adapter/test_qualify.py index 81b5b74..634233e 100644 --- a/adapter/test_qualify.py +++ b/adapter/test_qualify.py @@ -189,7 +189,7 @@ def setUp(self): ): subprocess.run(["git", *args], cwd=self.repo, check=True, stdout=subprocess.DEVNULL) self.config = {"targets": ["service.py"], "suites": ["test_service.py"]} - self.engine = Path(__file__).resolve().parents[1] / "target/debug/panthera" + self.engine = Path(__file__).resolve().parents[1] / "target/debug/diffprowl" def test_real_campaign_is_independent_and_preserves_checkout(self): output = self.root / "evidence" @@ -231,7 +231,7 @@ def test_bad_baseline_and_worker_failure_never_qualify(self): self.assertEqual(report["trials"][0]["error_type"], "TimeoutExpired") def test_cli_embeds_adapter_and_runs_outside_source_checkout(self): - binary = self.root / "panthera" + binary = self.root / "diffprowl" shutil.copy2(self.engine, binary) (self.root / "scope.json").write_text(json.dumps(self.config)) (self.root / "campaign.json").write_text(json.dumps({"schema": 1, "trials": [trial()]})) diff --git a/adapter/test_shadow.py b/adapter/test_shadow.py index cb61ff9..3284cf5 100644 --- a/adapter/test_shadow.py +++ b/adapter/test_shadow.py @@ -180,7 +180,7 @@ def test_resources_reject_hidden_traversal_and_symlinked_directories(self): shadow.resource_file(self.root, "linked/versions.json") def test_batched_plans_match_real_engine_for_changes_and_fallbacks(self): - engine = Path(__file__).resolve().parents[1] / "target/debug/panthera" + engine = Path(__file__).resolve().parents[1] / "target/debug/diffprowl" original = {"shared": "same", "symbols": {"f": "v1", "g": "v1"}} tests = { f"test_service.py::test_{index}_é": { @@ -277,7 +277,7 @@ def test_batch_errors_never_produce_a_partial_plan(self): shadow.plan_shadow(current, baseline, self.root, Path("engine")) def test_cold_and_empty_baselines_expand_in_real_engine(self): - engine = Path(__file__).resolve().parents[1] / "target/debug/panthera" + engine = Path(__file__).resolve().parents[1] / "target/debug/diffprowl" current = {"shared": "same", "symbols": {"f": "v1"}} for baseline in (None, {**current, "tests": {}}): self.assertTrue(shadow.plan_shadow(current, baseline, self.root, engine)["expand"]) @@ -286,7 +286,7 @@ def test_cold_and_empty_baselines_expand_in_real_engine(self): call.assert_not_called() def test_real_worker_and_rust_planner_select_a_regression(self): - engine = Path(__file__).resolve().parents[1] / "target/debug/panthera" + engine = Path(__file__).resolve().parents[1] / "target/debug/diffprowl" self.assertTrue(engine.is_file(), "run cargo test before adapter tests") shadow.configure({"targets": ["app/service.py"], "suites": ["test_service.py"], "resources": ["versions.json"]}) (self.root / "versions.json").write_text('{"version": 1}') diff --git a/assets/README.md b/assets/README.md index 1018a13..95d9186 100644 --- a/assets/README.md +++ b/assets/README.md @@ -1,4 +1,4 @@ -# Panthera artwork +# DiffProwl artwork Generated with the built-in image generation tool. These are raster PNG assets; the logo has a transparent background. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 23873fc..72d7a69 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,11 +1,11 @@ -# Panthera roadmap +# DiffProwl roadmap Status: implementation roadmap, 2026-11-20. Current changes are local and unreleased. Gates describe evidence needed to advance; they are not claims that later phases have shipped. ## Purpose and boundaries -Reduce total test compute and CI cost without hiding regressions. Panthera is an +Reduce total test compute and CI cost without hiding regressions. DiffProwl is an LLM-free selection and evidence engine. It decides which existing checks need fresh execution and explains why. Test quality, runners and production behavior remain separate responsibilities. Zero selection tokens does not prove lower @@ -16,7 +16,7 @@ handling. Language adapters own dependency collection and execution contracts. A small Rust planner is a valid design; a rewrite or multi-language parser is not an acceptance criterion. Parsing alone cannot establish runtime dependencies. -Keep Panthera and 9lives separate: Panthera selects; 9lives executes browser checks +Keep DiffProwl and 9lives separate: DiffProwl selects; 9lives executes browser checks and returns receipts. The simulation is an explicitly labeled experimental model. Move it behind an examples/crate boundary when packaging requires that separation; do not present its passing invariants as application or production verification. @@ -130,7 +130,7 @@ release and integration gates unless independently qualified for selection. Roll out to one bounded suite first. Cold or invalid evidence runs full tests. Audit selection with independent full executions and retain exact failing node IDs without captured sensitive output. Rehearse an omitted-failure alert and restore -full execution automatically. Rollback must not depend on Panthera being healthy. +full execution automatically. Rollback must not depend on DiffProwl being healthy. Storage work: byte-bounded request batching, scalable baseline artifacts, retention, checksums and provenance. Do not widen baseline trust across forks or applications. diff --git a/site/index.html b/site/index.html index 7ec885a..60a169d 100644 --- a/site/index.html +++ b/site/index.html @@ -4,8 +4,8 @@ -How Panthera decides which tests to run - +How DiffProwl decides which tests to run +