pyrn 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. pyrn-0.1.0/.gitignore +32 -0
  2. pyrn-0.1.0/CHANGELOG.md +38 -0
  3. pyrn-0.1.0/CONTRIBUTING.md +50 -0
  4. pyrn-0.1.0/Cargo.lock +1464 -0
  5. pyrn-0.1.0/Cargo.toml +56 -0
  6. pyrn-0.1.0/LICENSE +195 -0
  7. pyrn-0.1.0/PKG-INFO +169 -0
  8. pyrn-0.1.0/README.md +143 -0
  9. pyrn-0.1.0/SECURITY.md +34 -0
  10. pyrn-0.1.0/crates/pyrn-cli/Cargo.toml +29 -0
  11. pyrn-0.1.0/crates/pyrn-cli/src/main.rs +1391 -0
  12. pyrn-0.1.0/crates/pyrn-core/Cargo.toml +39 -0
  13. pyrn-0.1.0/crates/pyrn-core/src/cache.rs +336 -0
  14. pyrn-0.1.0/crates/pyrn-core/src/config.rs +378 -0
  15. pyrn-0.1.0/crates/pyrn-core/src/dynamic.rs +209 -0
  16. pyrn-0.1.0/crates/pyrn-core/src/git_replay.rs +463 -0
  17. pyrn-0.1.0/crates/pyrn-core/src/graph.rs +1865 -0
  18. pyrn-0.1.0/crates/pyrn-core/src/key.rs +199 -0
  19. pyrn-0.1.0/crates/pyrn-core/src/lib.rs +67 -0
  20. pyrn-0.1.0/crates/pyrn-core/src/parser.rs +3165 -0
  21. pyrn-0.1.0/crates/pyrn-core/src/policy.rs +221 -0
  22. pyrn-0.1.0/crates/pyrn-core/src/receipt.rs +423 -0
  23. pyrn-0.1.0/crates/pyrn-core/src/tree.rs +249 -0
  24. pyrn-0.1.0/crates/pyrn-core/tests/core_tests.rs +1224 -0
  25. pyrn-0.1.0/crates/pyrn-runner/Cargo.toml +27 -0
  26. pyrn-0.1.0/crates/pyrn-runner/python/pyrn_worker.py +1497 -0
  27. pyrn-0.1.0/crates/pyrn-runner/python/pytest_pyrn_trace.py +416 -0
  28. pyrn-0.1.0/crates/pyrn-runner/src/daemon.rs +654 -0
  29. pyrn-0.1.0/crates/pyrn-runner/src/diagnostics.rs +531 -0
  30. pyrn-0.1.0/crates/pyrn-runner/src/discovery.rs +416 -0
  31. pyrn-0.1.0/crates/pyrn-runner/src/isolation.rs +343 -0
  32. pyrn-0.1.0/crates/pyrn-runner/src/lib.rs +759 -0
  33. pyrn-0.1.0/crates/pyrn-runner/src/protocol.rs +242 -0
  34. pyrn-0.1.0/crates/pyrn-runner/src/resources.rs +593 -0
  35. pyrn-0.1.0/crates/pyrn-runner/src/scheduler.rs +411 -0
  36. pyrn-0.1.0/crates/pyrn-runner/src/supervisor.rs +1541 -0
  37. pyrn-0.1.0/crates/pyrn-runner/tests/integration_runner.rs +668 -0
  38. pyrn-0.1.0/crates/pyrn-runner/tests_resilience/custom_naming_test.py +7 -0
  39. pyrn-0.1.0/crates/pyrn-runner/tests_resilience/pyproject.toml +4 -0
  40. pyrn-0.1.0/crates/pyrn-runner/tests_resilience/test_faults.py +61 -0
  41. pyrn-0.1.0/crates/pyrn-runner/tests_resilience/test_parity_edge_cases.py +36 -0
  42. pyrn-0.1.0/docs/assets/branding/pyrn_logo.png +0 -0
  43. pyrn-0.1.0/docs/assets/branding/pyrn_wordmark.svg +100 -0
  44. pyrn-0.1.0/docs/benchmarks.md +103 -0
  45. pyrn-0.1.0/docs/caching.md +134 -0
  46. pyrn-0.1.0/docs/changelog.md +71 -0
  47. pyrn-0.1.0/docs/ci-adoption.md +142 -0
  48. pyrn-0.1.0/docs/commands.md +292 -0
  49. pyrn-0.1.0/docs/configuration.md +126 -0
  50. pyrn-0.1.0/docs/contributing.md +92 -0
  51. pyrn-0.1.0/docs/embedding.md +244 -0
  52. pyrn-0.1.0/docs/execution-engine.md +130 -0
  53. pyrn-0.1.0/docs/getting-started.md +172 -0
  54. pyrn-0.1.0/docs/index.md +47 -0
  55. pyrn-0.1.0/docs/receipts-and-telemetry.md +244 -0
  56. pyrn-0.1.0/docs/recipes.md +230 -0
  57. pyrn-0.1.0/docs/resource-budgeting.md +91 -0
  58. pyrn-0.1.0/docs/security.md +88 -0
  59. pyrn-0.1.0/docs/stylesheets/extra.css +265 -0
  60. pyrn-0.1.0/docs/tia.md +174 -0
  61. pyrn-0.1.0/docs/troubleshooting.md +172 -0
  62. pyrn-0.1.0/hatch_build.py +60 -0
  63. pyrn-0.1.0/overrides/404.html +5 -0
  64. pyrn-0.1.0/pyproject.toml +93 -0
  65. pyrn-0.1.0/scripts/check_docs.py +216 -0
  66. pyrn-0.1.0/scripts/native_wheel.py +106 -0
  67. pyrn-0.1.0/src/pyrn/__init__.py +8 -0
  68. pyrn-0.1.0/src/pyrn/__main__.py +8 -0
  69. pyrn-0.1.0/src/pyrn/entrypoint.py +65 -0
  70. pyrn-0.1.0/zensical.toml +75 -0
pyrn-0.1.0/.gitignore ADDED
@@ -0,0 +1,32 @@
1
+ # Rust build artifacts
2
+ /target/
3
+ **/target/
4
+
5
+ # Python packaging & caches
6
+ /dist/
7
+ /build/
8
+ *.egg-info/
9
+ .venv/
10
+ .ci-venv/
11
+ __pycache__/
12
+ *.py[cod]
13
+ .pytest_cache/
14
+ .ruff_cache/
15
+ .coverage
16
+ .coverage.*
17
+ htmlcov/
18
+
19
+ # Bundled native binaries staged into Python wheel source tree
20
+ /src/pyrn/_bin/
21
+
22
+ # Runtime caches & temporary outputs
23
+ .pyrn/
24
+ .artifacts/
25
+ *.tmp
26
+ *.bak
27
+
28
+ # Documentation build output
29
+ site/
30
+
31
+ # Local research notes & benchmarks
32
+ research/
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ All notable changes to `pyrn` are maintained in [docs/changelog.md](docs/changelog.md) and
4
+ published at [dariuszpanas.github.io/pyrn/changelog.html](https://dariuszpanas.github.io/pyrn/changelog.html).
5
+
6
+ This project follows [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) and
7
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ ## [Unreleased]
10
+
11
+ ## [0.1.0] - 2026-11-26
12
+
13
+ First public beta release of `pyrn`.
14
+
15
+ ### Added
16
+
17
+ - **Pure-Rust symbol-level Test Impact Analysis (`crates/pyrn-core`)**: parallel AST parser
18
+ (`rustpython-parser` + `rayon`), `def`/`class` symbol-level diffs with preamble fail-closed
19
+ guards, fixture-scoped `conftest.py` resolution, Django settings/migration/template rules,
20
+ fail-closed `UnknownPathPolicy::Full`, and zero-checkout in-memory embedding via `TreeSource`
21
+ and `plan_python_tests` (`default-features = false`, `#![forbid(unsafe_code)]`).
22
+ - **Role-segregated BLAKE3 content-addressed test cache (`CasTestCache`)**: multi-process SQLite
23
+ WAL cache keyed by domain-separated 64-hex `pyrn.test-key.v1` digests, strictly segregated by
24
+ `SlotRole::{Agent, Verify}` and refusing to cache failed, skipped, errored, flaky, or tainted
25
+ tests.
26
+ - **Isolated cold & warm-pool execution engine (`crates/pyrn-runner`)**: persistent `pytest.Session`
27
+ workers, container- and SMT-aware `-w auto` worker budgeting (physical cores,
28
+ `available_parallelism`, Linux cgroups v2/v1 CPU/cpuset/memory OOM guard), `:memory:` and
29
+ file-backed SQLite migration template cloning, compact Windows-safe sandboxes, disjoint loopback
30
+ ports, built-in PEP 669 + PEP 578 + `os.environ` tracing, `--cov-sysmon` coverage shard merging,
31
+ hard watchdogs, crash respawn, and `--reruns` flake detection.
32
+ - **Standalone CLI (`crates/pyrn-cli`) & zero-dependency Python wheel (`src/pyrn/`)**: unified
33
+ `pyrn` binary (`run`, `plan`, `daemon`, `cache`, `doctor`, `replay-git`), bounded `<= 2,048 B`
34
+ `CompactReceipt` (`pyrn.receipt.v1`), `<= 128 B` `CrashCapsule`, `--ndjson` streaming,
35
+ configurable `--metrics-kv` / `--metrics-prefix`, deterministic `0`/`1`/`2` exit codes, and a
36
+ `py3-none-<platform>` wheel with zero PyO3 or Python runtime dependencies.
37
+ - **Documentation site**: full Zensical documentation published to GitHub Pages with offline link
38
+ and anchor verification (`scripts/check_docs.py`).
@@ -0,0 +1,50 @@
1
+ # Contributing to `pyrn`
2
+
3
+ Thank you for contributing to `pyrn`. The full contributor guide is published in the
4
+ [Contributing documentation](https://dariuszpanas.github.io/pyrn/contributing.html)
5
+ ([docs/contributing.md](docs/contributing.md)).
6
+
7
+ ## Workspace Overview
8
+
9
+ | Path | Responsibility |
10
+ | --- | --- |
11
+ | `crates/pyrn-core` | Pure-Rust in-memory TIA, symbol-level AST diff, BLAKE3 cache keys, config loader, receipts, optional `fs`/`cache`/`process` features |
12
+ | `crates/pyrn-runner` | Cold and persistent warm-pool worker supervisor, container-aware resource budgeter, SQLite template cloning, tracing, `--cov-sysmon`, `pyrn doctor` |
13
+ | `crates/pyrn-cli` | Standalone `pyrn` CLI (`run`, `plan`, `daemon`, `cache`, `doctor`, `replay-git`) |
14
+ | `src/pyrn/` & `scripts/native_wheel.py` | Zero-dependency `py3-none-<platform>` Python launcher wheel |
15
+ | `docs/` & `zensical.toml` | Zensical documentation site and `scripts/check_docs.py` link verifier |
16
+
17
+ ## Local Verification Gate
18
+
19
+ Prerequisites: Rust stable toolchain (edition 2024, `rustfmt`, `clippy`), Python 3.11+ (3.12+
20
+ recommended with `pytest` and `coverage`), and `uv`.
21
+
22
+ ```sh
23
+ # 1. Formatting and pure in-memory pyrn-core build (zero FS/SQLite/subprocess/FFI)
24
+ cargo fmt --all -- --check
25
+ cargo check -p pyrn-core --no-default-features --locked
26
+ cargo clippy -p pyrn-core --no-default-features --all-targets --locked -- -D warnings
27
+ cargo test -p pyrn-core --no-default-features --locked
28
+
29
+ # 2. Full workspace lint and release test suite
30
+ cargo clippy --workspace --all-targets --locked -- -D warnings
31
+ cargo test --workspace --release --locked
32
+
33
+ # 3. Documentation strict build and link/anchor audit
34
+ uvx --from "zensical>=0.0.20" zensical build --strict --clean
35
+ python scripts/check_docs.py
36
+ ```
37
+
38
+ Set `PYRN_TEST_PYTHON` to a Python 3.12+ interpreter with `pytest` and `coverage` installed when
39
+ running the live `pyrn-runner` E2E integration tests. Remove the generated `site/` and `dist/`
40
+ directories when finished with local checks.
41
+
42
+ ## Engineering Rules
43
+
44
+ - Preserve `#![forbid(unsafe_code)]` across all crates in the workspace.
45
+ - Keep `pyrn-core` compiling and passing tests with `--no-default-features` (zero filesystem,
46
+ SQLite/C FFI, or subprocess dependencies).
47
+ - Never hardcode project-specific fixture or repository names inside `pyrn-core` or `pyrn-runner`.
48
+ - Update the relevant reference page under `docs/` and record user-visible changes under
49
+ `## [Unreleased]` in [docs/changelog.md](docs/changelog.md) when changing CLI, config, receipt,
50
+ or library behavior.