plato-ai 0.1.0.dev0__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 (181) hide show
  1. plato_ai-0.1.0.dev0/.check_typing.sh +0 -0
  2. plato_ai-0.1.0.dev0/.github/workflows/ci.yml +46 -0
  3. plato_ai-0.1.0.dev0/.gitignore +6 -0
  4. plato_ai-0.1.0.dev0/.python-version +1 -0
  5. plato_ai-0.1.0.dev0/CONTRIBUTING.md +18 -0
  6. plato_ai-0.1.0.dev0/LICENSE +203 -0
  7. plato_ai-0.1.0.dev0/NOTICE +11 -0
  8. plato_ai-0.1.0.dev0/PKG-INFO +255 -0
  9. plato_ai-0.1.0.dev0/README.md +30 -0
  10. plato_ai-0.1.0.dev0/conftest.py +56 -0
  11. plato_ai-0.1.0.dev0/deploy/skypilot/.gitkeep +1 -0
  12. plato_ai-0.1.0.dev0/deploy/skypilot/t0-dev.yaml +35 -0
  13. plato_ai-0.1.0.dev0/deploy/skypilot/t1-fit.yaml +37 -0
  14. plato_ai-0.1.0.dev0/deploy/skypilot/t1-l4.yaml +31 -0
  15. plato_ai-0.1.0.dev0/docs/architecture-explainer.md +213 -0
  16. plato_ai-0.1.0.dev0/docs/m0-execution-plan.md +343 -0
  17. plato_ai-0.1.0.dev0/docs/m0-implementation.md +501 -0
  18. plato_ai-0.1.0.dev0/docs/m0-report.md +125 -0
  19. plato_ai-0.1.0.dev0/docs/m1-execution-plan.md +936 -0
  20. plato_ai-0.1.0.dev0/docs/mvp-design.md +2855 -0
  21. plato_ai-0.1.0.dev0/docs/notes/linkage-fp32-bound.md +52 -0
  22. plato_ai-0.1.0.dev0/docs/notes/pep541.md +201 -0
  23. plato_ai-0.1.0.dev0/docs/notes/s1-preflight.md +34 -0
  24. plato_ai-0.1.0.dev0/docs/notes/s4-golden.md +832 -0
  25. plato_ai-0.1.0.dev0/docs/notes/s6-smoke.md +88 -0
  26. plato_ai-0.1.0.dev0/docs/notes/s7-bench.md +129 -0
  27. plato_ai-0.1.0.dev0/docs/notes/s9-teardown-evidence.txt +20 -0
  28. plato_ai-0.1.0.dev0/docs/notes/s9-teardown.md +37 -0
  29. plato_ai-0.1.0.dev0/docs/oolong-optrace-spec.md +183 -0
  30. plato_ai-0.1.0.dev0/docs/op-set-spec.md +267 -0
  31. plato_ai-0.1.0.dev0/docs/verbalise-spec.md +356 -0
  32. plato_ai-0.1.0.dev0/docs/xacp-trust-boundary-note.md +154 -0
  33. plato_ai-0.1.0.dev0/golden/extract/.gitkeep +1 -0
  34. plato_ai-0.1.0.dev0/golden/extract/Dockerfile +37 -0
  35. plato_ai-0.1.0.dev0/golden/extract/README.md +107 -0
  36. plato_ai-0.1.0.dev0/golden/extract/extract.py +913 -0
  37. plato_ai-0.1.0.dev0/golden/extract/requirements.lock.txt +37 -0
  38. plato_ai-0.1.0.dev0/golden/extract/requirements.txt +6 -0
  39. plato_ai-0.1.0.dev0/golden/fixtures/.gitkeep +1 -0
  40. plato_ai-0.1.0.dev0/golden/fixtures/a_cosine_weights.npz +0 -0
  41. plato_ai-0.1.0.dev0/golden/fixtures/b2_temporal_linkage_H2.npz +0 -0
  42. plato_ai-0.1.0.dev0/golden/fixtures/b_temporal_linkage.npz +0 -0
  43. plato_ai-0.1.0.dev0/golden/fixtures/c2_freeness_H2.npz +0 -0
  44. plato_ai-0.1.0.dev0/golden/fixtures/c_freeness.npz +0 -0
  45. plato_ai-0.1.0.dev0/golden/fixtures/d_erase_and_write.npz +0 -0
  46. plato_ai-0.1.0.dev0/golden/fixtures/e2_chain_steps_H2.npz +0 -0
  47. plato_ai-0.1.0.dev0/golden/fixtures/e_chain_steps.npz +0 -0
  48. plato_ai-0.1.0.dev0/golden/fixtures/e_chain_steps_B3.npz +0 -0
  49. plato_ai-0.1.0.dev0/golden/fixtures/f_grad_allocation.npz +0 -0
  50. plato_ai-0.1.0.dev0/golden/fixtures/f_grad_chain_step.npz +0 -0
  51. plato_ai-0.1.0.dev0/golden/fixtures/f_grad_zero_memory.npz +0 -0
  52. plato_ai-0.1.0.dev0/golden/fixtures/g_util.npz +0 -0
  53. plato_ai-0.1.0.dev0/golden/fixtures/meta.json +5190 -0
  54. plato_ai-0.1.0.dev0/plato/__init__.py +1 -0
  55. plato_ai-0.1.0.dev0/plato/bench/__init__.py +1 -0
  56. plato_ai-0.1.0.dev0/plato/bench/csvio.py +120 -0
  57. plato_ai-0.1.0.dev0/plato/bench/fit_spike.py +1138 -0
  58. plato_ai-0.1.0.dev0/plato/bench/fit_spike_test.py +310 -0
  59. plato_ai-0.1.0.dev0/plato/bench/hidden_size_guard.py +142 -0
  60. plato_ai-0.1.0.dev0/plato/bench/hidden_size_guard_test.py +75 -0
  61. plato_ai-0.1.0.dev0/plato/bench/offload.py +132 -0
  62. plato_ai-0.1.0.dev0/plato/bench/results/.gitkeep +1 -0
  63. plato_ai-0.1.0.dev0/plato/bench/results/decode_sweep.csv +13 -0
  64. plato_ai-0.1.0.dev0/plato/bench/results/fit.csv +3 -0
  65. plato_ai-0.1.0.dev0/plato/bench/results/hidden_size_guard.json +7 -0
  66. plato_ai-0.1.0.dev0/plato/bench/results/microbench.csv +2 -0
  67. plato_ai-0.1.0.dev0/plato/bench/results/prefill.csv +2 -0
  68. plato_ai-0.1.0.dev0/plato/bench/results/section_8_1.md +55 -0
  69. plato_ai-0.1.0.dev0/plato/bench/results/verbalise_decode_remeasure.csv +101 -0
  70. plato_ai-0.1.0.dev0/plato/bench/throughput.py +900 -0
  71. plato_ai-0.1.0.dev0/plato/bench/throughput_test.py +297 -0
  72. plato_ai-0.1.0.dev0/plato/data/__init__.py +1 -0
  73. plato_ai-0.1.0.dev0/plato/data/episodes.py +839 -0
  74. plato_ai-0.1.0.dev0/plato/data/episodes_test.py +165 -0
  75. plato_ai-0.1.0.dev0/plato/data/fixtures/c2_golden/MANIFEST.json +26 -0
  76. plato_ai-0.1.0.dev0/plato/data/fixtures/c2_golden/README.md +8 -0
  77. plato_ai-0.1.0.dev0/plato/data/fixtures/c2_golden/a5369b2d057d4a4fb0553bfb28975ef097bb792c7eb7fa3f376edeaee21e01a5.jsonl +100 -0
  78. plato_ai-0.1.0.dev0/plato/data/fixtures/c2_golden/episodes.jsonl +100 -0
  79. plato_ai-0.1.0.dev0/plato/data/pipeline.py +473 -0
  80. plato_ai-0.1.0.dev0/plato/data/pipeline_test.py +204 -0
  81. plato_ai-0.1.0.dev0/plato/data/renderers.py +121 -0
  82. plato_ai-0.1.0.dev0/plato/data/renderers_test.py +267 -0
  83. plato_ai-0.1.0.dev0/plato/data/synthetic/__init__.py +1 -0
  84. plato_ai-0.1.0.dev0/plato/data/synthetic/__main__.py +5 -0
  85. plato_ai-0.1.0.dev0/plato/data/synthetic/c0.py +992 -0
  86. plato_ai-0.1.0.dev0/plato/data/synthetic/c0_test.py +381 -0
  87. plato_ai-0.1.0.dev0/plato/data/synthetic/c2.py +1452 -0
  88. plato_ai-0.1.0.dev0/plato/data/synthetic/c2_test.py +392 -0
  89. plato_ai-0.1.0.dev0/plato/data/synthetic/cli.py +309 -0
  90. plato_ai-0.1.0.dev0/plato/data/synthetic/cli_test.py +111 -0
  91. plato_ai-0.1.0.dev0/plato/data/synthetic/credential.schema.json +39 -0
  92. plato_ai-0.1.0.dev0/plato/data/synthetic/hygiene.py +211 -0
  93. plato_ai-0.1.0.dev0/plato/data/synthetic/judge.py +352 -0
  94. plato_ai-0.1.0.dev0/plato/data/synthetic/providers.py +567 -0
  95. plato_ai-0.1.0.dev0/plato/data/synthetic/providers_test.py +350 -0
  96. plato_ai-0.1.0.dev0/plato/data/synthetic/realise.py +1867 -0
  97. plato_ai-0.1.0.dev0/plato/data/synthetic/realise_test.py +1345 -0
  98. plato_ai-0.1.0.dev0/plato/data/synthetic/repeat_copy.py +231 -0
  99. plato_ai-0.1.0.dev0/plato/data/synthetic/repeat_copy_test.py +43 -0
  100. plato_ai-0.1.0.dev0/plato/data/synthetic/veto.py +230 -0
  101. plato_ai-0.1.0.dev0/plato/data/synthetic/veto_test.py +192 -0
  102. plato_ai-0.1.0.dev0/plato/eval/__init__.py +1 -0
  103. plato_ai-0.1.0.dev0/plato/eval/ablations.py +478 -0
  104. plato_ai-0.1.0.dev0/plato/eval/ablations_test.py +485 -0
  105. plato_ai-0.1.0.dev0/plato/eval/budget.py +360 -0
  106. plato_ai-0.1.0.dev0/plato/eval/budget_test.py +167 -0
  107. plato_ai-0.1.0.dev0/plato/eval/stats.py +1688 -0
  108. plato_ai-0.1.0.dev0/plato/eval/stats_test.py +937 -0
  109. plato_ai-0.1.0.dev0/plato/memory/__init__.py +1 -0
  110. plato_ai-0.1.0.dev0/plato/memory/access.py +680 -0
  111. plato_ai-0.1.0.dev0/plato/memory/access_test.py +724 -0
  112. plato_ai-0.1.0.dev0/plato/memory/addressing.py +421 -0
  113. plato_ai-0.1.0.dev0/plato/memory/addressing_test.py +658 -0
  114. plato_ai-0.1.0.dev0/plato/memory/boundary_test.py +127 -0
  115. plato_ai-0.1.0.dev0/plato/memory/config.py +94 -0
  116. plato_ai-0.1.0.dev0/plato/memory/design_test.py +724 -0
  117. plato_ai-0.1.0.dev0/plato/memory/errors.py +17 -0
  118. plato_ai-0.1.0.dev0/plato/memory/golden_test.py +555 -0
  119. plato_ai-0.1.0.dev0/plato/memory/ops.py +214 -0
  120. plato_ai-0.1.0.dev0/plato/memory/ops_test.py +98 -0
  121. plato_ai-0.1.0.dev0/plato/memory/parity_adapters.py +193 -0
  122. plato_ai-0.1.0.dev0/plato/memory/parity_adapters_test.py +122 -0
  123. plato_ai-0.1.0.dev0/plato/memory/property_test.py +570 -0
  124. plato_ai-0.1.0.dev0/plato/memory/state.py +406 -0
  125. plato_ai-0.1.0.dev0/plato/memory/state_test.py +205 -0
  126. plato_ai-0.1.0.dev0/plato/model/__init__.py +1 -0
  127. plato_ai-0.1.0.dev0/plato/model/bare_load.py +77 -0
  128. plato_ai-0.1.0.dev0/plato/model/bare_load_test.py +26 -0
  129. plato_ai-0.1.0.dev0/plato/model/encoder.py +446 -0
  130. plato_ai-0.1.0.dev0/plato/model/encoder_test.py +178 -0
  131. plato_ai-0.1.0.dev0/plato/model/episodes.py +194 -0
  132. plato_ai-0.1.0.dev0/plato/model/episodes_test.py +81 -0
  133. plato_ai-0.1.0.dev0/plato/model/fakes.py +232 -0
  134. plato_ai-0.1.0.dev0/plato/model/fixtures/__init__.py +1 -0
  135. plato_ai-0.1.0.dev0/plato/model/fixtures/etime_features.npz +0 -0
  136. plato_ai-0.1.0.dev0/plato/model/fixtures/etime_proj_2048.npz +0 -0
  137. plato_ai-0.1.0.dev0/plato/model/fixtures/etime_proj_4096.npz +0 -0
  138. plato_ai-0.1.0.dev0/plato/model/fixtures/make_fixtures.py +126 -0
  139. plato_ai-0.1.0.dev0/plato/model/gate.py +264 -0
  140. plato_ai-0.1.0.dev0/plato/model/gate_test.py +213 -0
  141. plato_ai-0.1.0.dev0/plato/model/heads.py +374 -0
  142. plato_ai-0.1.0.dev0/plato/model/heads_test.py +233 -0
  143. plato_ai-0.1.0.dev0/plato/model/hf.py +572 -0
  144. plato_ai-0.1.0.dev0/plato/model/lora.py +240 -0
  145. plato_ai-0.1.0.dev0/plato/model/lora_test.py +100 -0
  146. plato_ai-0.1.0.dev0/plato/model/lr.py +59 -0
  147. plato_ai-0.1.0.dev0/plato/model/lr_test.py +58 -0
  148. plato_ai-0.1.0.dev0/plato/model/pins.py +12 -0
  149. plato_ai-0.1.0.dev0/plato/model/pins_test.py +42 -0
  150. plato_ai-0.1.0.dev0/plato/model/reader.py +245 -0
  151. plato_ai-0.1.0.dev0/plato/model/reader_test.py +134 -0
  152. plato_ai-0.1.0.dev0/plato/model/registry.py +145 -0
  153. plato_ai-0.1.0.dev0/plato/model/registry_test.py +94 -0
  154. plato_ai-0.1.0.dev0/plato/model/rosters/__init__.py +1 -0
  155. plato_ai-0.1.0.dev0/plato/model/rosters/dump.py +29 -0
  156. plato_ai-0.1.0.dev0/plato/model/rosters/qwen3_5_0_8b.txt +186 -0
  157. plato_ai-0.1.0.dev0/plato/model/rosters/qwen3_5_2b.txt +186 -0
  158. plato_ai-0.1.0.dev0/plato/model/smoke.py +944 -0
  159. plato_ai-0.1.0.dev0/plato/model/smoke_mutant_results.json +13713 -0
  160. plato_ai-0.1.0.dev0/plato/model/smoke_results.json +13523 -0
  161. plato_ai-0.1.0.dev0/plato/model/smoke_test.py +321 -0
  162. plato_ai-0.1.0.dev0/plato/obs/__init__.py +1 -0
  163. plato_ai-0.1.0.dev0/plato/obs/viewer.py +1242 -0
  164. plato_ai-0.1.0.dev0/plato/obs/viewer_test.py +409 -0
  165. plato_ai-0.1.0.dev0/plato/package_metadata_test.py +46 -0
  166. plato_ai-0.1.0.dev0/plato/testing/__init__.py +1 -0
  167. plato_ai-0.1.0.dev0/plato/testing/data_mutants.py +379 -0
  168. plato_ai-0.1.0.dev0/plato/testing/eval_mutants.py +200 -0
  169. plato_ai-0.1.0.dev0/plato/testing/memory_mutants.py +387 -0
  170. plato_ai-0.1.0.dev0/plato/testing/model_mutants.py +80 -0
  171. plato_ai-0.1.0.dev0/plato/testing/mutants.py +110 -0
  172. plato_ai-0.1.0.dev0/plato/testing/mutants_meta_test.py +231 -0
  173. plato_ai-0.1.0.dev0/plato/testing/obs_mutants.py +32 -0
  174. plato_ai-0.1.0.dev0/plato/train/__init__.py +1 -0
  175. plato_ai-0.1.0.dev0/plato/train/curriculum.py +34 -0
  176. plato_ai-0.1.0.dev0/plato/train/curriculum_test.py +14 -0
  177. plato_ai-0.1.0.dev0/pyproject.toml +57 -0
  178. plato_ai-0.1.0.dev0/pyrightconfig.json +7 -0
  179. plato_ai-0.1.0.dev0/ruff.toml +9 -0
  180. plato_ai-0.1.0.dev0/scripts/regen_c2_golden.py +17 -0
  181. plato_ai-0.1.0.dev0/uv.lock +2683 -0
File without changes
@@ -0,0 +1,46 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ env:
10
+ PLATO_DEBUG_ASSERTS: "1"
11
+
12
+ jobs:
13
+ checks:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: astral-sh/setup-uv@v5
18
+ with:
19
+ enable-cache: true
20
+ - run: uv python install 3.12
21
+ - run: uv sync --all-groups
22
+ - run: uv run ruff check .
23
+ - run: uv run pyright
24
+ - run: uv run pytest -q -m "not gpu"
25
+
26
+ mutants:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: astral-sh/setup-uv@v5
31
+ with:
32
+ enable-cache: true
33
+ - run: uv python install 3.12
34
+ - run: uv sync --all-groups
35
+ - run: uv run pytest -q -m "not gpu" plato/testing
36
+
37
+ wheel-build:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: astral-sh/setup-uv@v5
42
+ with:
43
+ enable-cache: true
44
+ - run: uv python install 3.12
45
+ - run: uv build
46
+ - run: uvx twine check dist/*
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,18 @@
1
+ # Contributing
2
+
3
+ One PR per slice, named after the execution-plan slice (e.g. `m0/s1-scaffold`).
4
+
5
+ Run the four checks with uv (CPython 3.12, never the system 3.10):
6
+
7
+ ```
8
+ uv sync --all-groups
9
+ uv run ruff check .
10
+ uv run pyright
11
+ uv run pytest -q -m "not gpu"
12
+ ```
13
+
14
+ Markers: `gpu` needs a GPU; `t0` is the S6 training smoke; `t1` is the S7 fit
15
+ check / controller bench; `slow` marks long-running tests (such as the per-mutant subprocess matrix); they run in CI and can be selected with `-m slow` or excluded with `-m "not slow"` locally.
16
+
17
+ `PLATO_DEBUG_ASSERTS=1` is forced on under pytest (`conftest.py`) so debug-only
18
+ memory asserts run in tests (decision E1). Set it in SkyPilot yamls and CI too.
@@ -0,0 +1,203 @@
1
+ Copyright 2026 byterover
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright 2026 byterover
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
@@ -0,0 +1,11 @@
1
+ plato
2
+ Copyright 2026 byterover
3
+
4
+ This product includes a PyTorch port of the Differentiable Neural Computer
5
+ reference implementation, Copyright 2017 Google Inc., licensed under the
6
+ Apache License 2.0, https://github.com/google-deepmind/dnc at commit
7
+ f5981c66ac6fe27978014c314c4aba39f1962ee3.
8
+
9
+ Graves, A. et al. "Hybrid computing using a neural network with dynamic
10
+ external memory." Nature 538, 471–476 (2016).
11
+ https://doi.org/10.1038/nature20101
@@ -0,0 +1,255 @@
1
+ Metadata-Version: 2.5
2
+ Name: plato-ai
3
+ Version: 0.1.0.dev0
4
+ Summary: A controller-operated DNC memory that any LLM can use.
5
+ Project-URL: Repository, https://github.com/campfirein/plato
6
+ Author-email: Andy <andy@byterover.dev>
7
+ License: Copyright 2026 byterover
8
+
9
+ Apache License
10
+ Version 2.0, January 2004
11
+ http://www.apache.org/licenses/
12
+
13
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
14
+
15
+ 1. Definitions.
16
+
17
+ "License" shall mean the terms and conditions for use, reproduction,
18
+ and distribution as defined by Sections 1 through 9 of this document.
19
+
20
+ "Licensor" shall mean the copyright owner or entity authorized by
21
+ the copyright owner that is granting the License.
22
+
23
+ "Legal Entity" shall mean the union of the acting entity and all
24
+ other entities that control, are controlled by, or are under common
25
+ control with that entity. For the purposes of this definition,
26
+ "control" means (i) the power, direct or indirect, to cause the
27
+ direction or management of such entity, whether by contract or
28
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
29
+ outstanding shares, or (iii) beneficial ownership of such entity.
30
+
31
+ "You" (or "Your") shall mean an individual or Legal Entity
32
+ exercising permissions granted by this License.
33
+
34
+ "Source" form shall mean the preferred form for making modifications,
35
+ including but not limited to software source code, documentation
36
+ source, and configuration files.
37
+
38
+ "Object" form shall mean any form resulting from mechanical
39
+ transformation or translation of a Source form, including but
40
+ not limited to compiled object code, generated documentation,
41
+ and conversions to other media types.
42
+
43
+ "Work" shall mean the work of authorship, whether in Source or
44
+ Object form, made available under the License, as indicated by a
45
+ copyright notice that is included in or attached to the work
46
+ (an example is provided in the Appendix below).
47
+
48
+ "Derivative Works" shall mean any work, whether in Source or Object
49
+ form, that is based on (or derived from) the Work and for which the
50
+ editorial revisions, annotations, elaborations, or other modifications
51
+ represent, as a whole, an original work of authorship. For the purposes
52
+ of this License, Derivative Works shall not include works that remain
53
+ separable from, or merely link (or bind by name) to the interfaces of,
54
+ the Work and Derivative Works thereof.
55
+
56
+ "Contribution" shall mean any work of authorship, including
57
+ the original version of the Work and any modifications or additions
58
+ to that Work or Derivative Works thereof, that is intentionally
59
+ submitted to Licensor for inclusion in the Work by the copyright owner
60
+ or by an individual or Legal Entity authorized to submit on behalf of
61
+ the copyright owner. For the purposes of this definition, "submitted"
62
+ means any form of electronic, verbal, or written communication sent
63
+ to the Licensor or its representatives, including but not limited to
64
+ communication on electronic mailing lists, source code control systems,
65
+ and issue tracking systems that are managed by, or on behalf of, the
66
+ Licensor for the purpose of discussing and improving the Work, but
67
+ excluding communication that is conspicuously marked or otherwise
68
+ designated in writing by the copyright owner as "Not a Contribution."
69
+
70
+ "Contributor" shall mean Licensor and any individual or Legal Entity
71
+ on behalf of whom a Contribution has been received by Licensor and
72
+ subsequently incorporated within the Work.
73
+
74
+ 2. Grant of Copyright License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ copyright license to reproduce, prepare Derivative Works of,
78
+ publicly display, publicly perform, sublicense, and distribute the
79
+ Work and such Derivative Works in Source or Object form.
80
+
81
+ 3. Grant of Patent License. Subject to the terms and conditions of
82
+ this License, each Contributor hereby grants to You a perpetual,
83
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
84
+ (except as stated in this section) patent license to make, have made,
85
+ use, offer to sell, sell, import, and otherwise transfer the Work,
86
+ where such license applies only to those patent claims licensable
87
+ by such Contributor that are necessarily infringed by their
88
+ Contribution(s) alone or by combination of their Contribution(s)
89
+ with the Work to which such Contribution(s) was submitted. If You
90
+ institute patent litigation against any entity (including a
91
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
92
+ or a Contribution incorporated within the Work constitutes direct
93
+ or contributory patent infringement, then any patent licenses
94
+ granted to You under this License for that Work shall terminate
95
+ as of the date such litigation is filed.
96
+
97
+ 4. Redistribution. You may reproduce and distribute copies of the
98
+ Work or Derivative Works thereof in any medium, with or without
99
+ modifications, and in Source or Object form, provided that You
100
+ meet the following conditions:
101
+
102
+ (a) You must give any other recipients of the Work or
103
+ Derivative Works a copy of this License; and
104
+
105
+ (b) You must cause any modified files to carry prominent notices
106
+ stating that You changed the files; and
107
+
108
+ (c) You must retain, in the Source form of any Derivative Works
109
+ that You distribute, all copyright, patent, trademark, and
110
+ attribution notices from the Source form of the Work,
111
+ excluding those notices that do not pertain to any part of
112
+ the Derivative Works; and
113
+
114
+ (d) If the Work includes a "NOTICE" text file as part of its
115
+ distribution, then any Derivative Works that You distribute must
116
+ include a readable copy of the attribution notices contained
117
+ within such NOTICE file, excluding those notices that do not
118
+ pertain to any part of the Derivative Works, in at least one
119
+ of the following places: within a NOTICE text file distributed
120
+ as part of the Derivative Works; within the Source form or
121
+ documentation, if provided along with the Derivative Works; or,
122
+ within a display generated by the Derivative Works, if and
123
+ wherever such third-party notices normally appear. The contents
124
+ of the NOTICE file are for informational purposes only and
125
+ do not modify the License. You may add Your own attribution
126
+ notices within Derivative Works that You distribute, alongside
127
+ or as an addendum to the NOTICE text from the Work, provided
128
+ that such additional attribution notices cannot be construed
129
+ as modifying the License.
130
+
131
+ You may add Your own copyright statement to Your modifications and
132
+ may provide additional or different license terms and conditions
133
+ for use, reproduction, or distribution of Your modifications, or
134
+ for any such Derivative Works as a whole, provided Your use,
135
+ reproduction, and distribution of the Work otherwise complies with
136
+ the conditions stated in this License.
137
+
138
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
139
+ any Contribution intentionally submitted for inclusion in the Work
140
+ by You to the Licensor shall be under the terms and conditions of
141
+ this License, without any additional terms or conditions.
142
+ Notwithstanding the above, nothing herein shall supersede or modify
143
+ the terms of any separate license agreement you may have executed
144
+ with Licensor regarding such Contributions.
145
+
146
+ 6. Trademarks. This License does not grant permission to use the trade
147
+ names, trademarks, service marks, or product names of the Licensor,
148
+ except as required for reasonable and customary use in describing the
149
+ origin of the Work and reproducing the content of the NOTICE file.
150
+
151
+ 7. Disclaimer of Warranty. Unless required by applicable law or
152
+ agreed to in writing, Licensor provides the Work (and each
153
+ Contributor provides its Contributions) on an "AS IS" BASIS,
154
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
155
+ implied, including, without limitation, any warranties or conditions
156
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
157
+ PARTICULAR PURPOSE. You are solely responsible for determining the
158
+ appropriateness of using or redistributing the Work and assume any
159
+ risks associated with Your exercise of permissions under this License.
160
+
161
+ 8. Limitation of Liability. In no event and under no legal theory,
162
+ whether in tort (including negligence), contract, or otherwise,
163
+ unless required by applicable law (such as deliberate and grossly
164
+ negligent acts) or agreed to in writing, shall any Contributor be
165
+ liable to You for damages, including any direct, indirect, special,
166
+ incidental, or consequential damages of any character arising as a
167
+ result of this License or out of the use or inability to use the
168
+ Work (including but not limited to damages for loss of goodwill,
169
+ work stoppage, computer failure or malfunction, or any and all
170
+ other commercial damages or losses), even if such Contributor
171
+ has been advised of the possibility of such damages.
172
+
173
+ 9. Accepting Warranty or Additional Liability. While redistributing
174
+ the Work or Derivative Works thereof, You may choose to offer,
175
+ and charge a fee for, acceptance of support, warranty, indemnity,
176
+ or other liability obligations and/or rights consistent with this
177
+ License. However, in accepting such obligations, You may act only
178
+ on Your own behalf and on Your sole responsibility, not on behalf
179
+ of any other Contributor, and only if You agree to indemnify,
180
+ defend, and hold each Contributor harmless for any liability
181
+ incurred by, or claims asserted against, such Contributor by reason
182
+ of your accepting any such warranty or additional liability.
183
+
184
+ END OF TERMS AND CONDITIONS
185
+
186
+ APPENDIX: How to apply the Apache License to your work.
187
+
188
+ To apply the Apache License to your work, attach the following
189
+ boilerplate notice, with the fields enclosed by brackets "[]"
190
+ replaced with your own identifying information. (Don't include
191
+ the brackets!) The text should be enclosed in the appropriate
192
+ comment syntax for the file format. We also recommend that a
193
+ file or class name and description of purpose be included on the
194
+ same "printed page" as the copyright notice for easier
195
+ identification within third-party archives.
196
+
197
+ Copyright 2026 byterover
198
+
199
+ Licensed under the Apache License, Version 2.0 (the "License");
200
+ you may not use this file except in compliance with the License.
201
+ You may obtain a copy of the License at
202
+
203
+ http://www.apache.org/licenses/LICENSE-2.0
204
+
205
+ Unless required by applicable law or agreed to in writing, software
206
+ distributed under the License is distributed on an "AS IS" BASIS,
207
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
208
+ See the License for the specific language governing permissions and
209
+ limitations under the License.
210
+ License-File: LICENSE
211
+ License-File: NOTICE
212
+ Classifier: Development Status :: 3 - Alpha
213
+ Classifier: License :: OSI Approved :: Apache Software License
214
+ Classifier: Programming Language :: Python :: 3.12
215
+ Requires-Python: <3.13,>=3.12
216
+ Requires-Dist: chz>=0.1
217
+ Requires-Dist: hypothesis>=6.0
218
+ Requires-Dist: numpy>=1.26
219
+ Requires-Dist: peft>=0.12
220
+ Requires-Dist: skypilot>=0.5
221
+ Requires-Dist: tinker-cookbook>=0.5.5
222
+ Requires-Dist: torch>=2.4
223
+ Requires-Dist: transformers>=4.40
224
+ Description-Content-Type: text/markdown
225
+
226
+ # plato
227
+
228
+ A memory that any LLM can use. plato sits between your app and the model you already pay
229
+ for (by API key - GPT, Claude, Grok, Kimi, or your own server) as an OpenAI-compatible
230
+ proxy. A small trained controller (Qwen3.5-2B) operates a Differentiable Neural Computer
231
+ (DNC) memory - a fixed grid of slots with learned write, read, link and time mechanics -
232
+ remembers what happened in past conversations, renders what it read as labeled text into
233
+ your request, and maintains itself while idle (merging duplicates, resolving
234
+ contradictions toward newer facts, pruning stale entries). You pay for the size of the
235
+ memory, in slots - never for your model's tokens.
236
+
237
+ ## Documents
238
+
239
+ | Doc | What it is |
240
+ |---|---|
241
+ | [docs/mvp-design.md](docs/mvp-design.md) | **The design of record** - rev 19, LOCKED 2026-08-31 after nine adversarial review rounds. Architecture, models, training, evaluation gates, serving, pricing, milestones, risks, and all owner rulings (Q1-Q28). Starts with a plain-language one-page overview. |
242
+ | [docs/m0-implementation.md](docs/m0-implementation.md) | **The M0 implementation plan** - rev 14, LOCKED. The first milestone: repo scaffold, PyTorch DNC port with golden parity against the DeepMind reference, training smoke tests, and the throughput benchmarks that replace the design's cost estimates. |
243
+ | [docs/m0-execution-plan.md](docs/m0-execution-plan.md) | **The M0 execution plan** - rev 3, DRAFT. The M0 plan broken into PR-sized tasks (S1-S9) with named files, tests, mutants, fixtures and exit-gate traceability; implementer decisions and doc-vs-doc discrepancies flagged for errata; adversarial review log (Codex + Grok). Subordinate to the M0 plan. |
244
+ | [docs/architecture-explainer.md](docs/architecture-explainer.md) | Plain-language companion with ASCII diagrams: the serving path, one controller turn, the anatomy of a memory slot, and the training mechanism (three-tier signal ladder, two-phase BPTT). Non-normative. |
245
+ | [docs/xacp-trust-boundary-note.md](docs/xacp-trust-boundary-note.md) | Investigation note (non-normative, post-MVP): embedding XACP-style selective sharing - what knowledge to share and with whom - via write-time layering, one memory per disclosure layer. |
246
+
247
+ Where a document disagrees with `docs/mvp-design.md`, the design doc wins.
248
+
249
+ ## Status
250
+
251
+ M0 COMPLETE (2026-09-03, under the rev-16 erratum). The design is at rev 21 - the environment pivot (Q29-Q32): three surfaces over one op set, reader-free-at-scale training. Next: the M1 execution-plan delta pass, then M1. Report: [`docs/m0-report.md`](docs/m0-report.md).
252
+
253
+ ## License
254
+
255
+ Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,30 @@
1
+ # plato
2
+
3
+ A memory that any LLM can use. plato sits between your app and the model you already pay
4
+ for (by API key - GPT, Claude, Grok, Kimi, or your own server) as an OpenAI-compatible
5
+ proxy. A small trained controller (Qwen3.5-2B) operates a Differentiable Neural Computer
6
+ (DNC) memory - a fixed grid of slots with learned write, read, link and time mechanics -
7
+ remembers what happened in past conversations, renders what it read as labeled text into
8
+ your request, and maintains itself while idle (merging duplicates, resolving
9
+ contradictions toward newer facts, pruning stale entries). You pay for the size of the
10
+ memory, in slots - never for your model's tokens.
11
+
12
+ ## Documents
13
+
14
+ | Doc | What it is |
15
+ |---|---|
16
+ | [docs/mvp-design.md](docs/mvp-design.md) | **The design of record** - rev 19, LOCKED 2026-08-31 after nine adversarial review rounds. Architecture, models, training, evaluation gates, serving, pricing, milestones, risks, and all owner rulings (Q1-Q28). Starts with a plain-language one-page overview. |
17
+ | [docs/m0-implementation.md](docs/m0-implementation.md) | **The M0 implementation plan** - rev 14, LOCKED. The first milestone: repo scaffold, PyTorch DNC port with golden parity against the DeepMind reference, training smoke tests, and the throughput benchmarks that replace the design's cost estimates. |
18
+ | [docs/m0-execution-plan.md](docs/m0-execution-plan.md) | **The M0 execution plan** - rev 3, DRAFT. The M0 plan broken into PR-sized tasks (S1-S9) with named files, tests, mutants, fixtures and exit-gate traceability; implementer decisions and doc-vs-doc discrepancies flagged for errata; adversarial review log (Codex + Grok). Subordinate to the M0 plan. |
19
+ | [docs/architecture-explainer.md](docs/architecture-explainer.md) | Plain-language companion with ASCII diagrams: the serving path, one controller turn, the anatomy of a memory slot, and the training mechanism (three-tier signal ladder, two-phase BPTT). Non-normative. |
20
+ | [docs/xacp-trust-boundary-note.md](docs/xacp-trust-boundary-note.md) | Investigation note (non-normative, post-MVP): embedding XACP-style selective sharing - what knowledge to share and with whom - via write-time layering, one memory per disclosure layer. |
21
+
22
+ Where a document disagrees with `docs/mvp-design.md`, the design doc wins.
23
+
24
+ ## Status
25
+
26
+ M0 COMPLETE (2026-09-03, under the rev-16 erratum). The design is at rev 21 - the environment pivot (Q29-Q32): three surfaces over one op set, reader-free-at-scale training. Next: the M1 execution-plan delta pass, then M1. Report: [`docs/m0-report.md`](docs/m0-report.md).
27
+
28
+ ## License
29
+
30
+ Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,56 @@
1
+ """Pytest configuration.
2
+
3
+ ``PLATO_DEBUG_ASSERTS`` is forced on at import time, before any ``plato`` import,
4
+ so debug-only memory asserts (decision E1) run under pytest even if the
5
+ interpreter would otherwise leave them off.
6
+
7
+ If ``PLATO_MUTANT`` is set, the named mutant from ``plato.testing.memory_mutants``,
8
+ ``plato.testing.model_mutants``, ``plato.testing.obs_mutants``, or
9
+ ``plato.testing.data_mutants``, or ``plato.testing.eval_mutants`` is applied
10
+ for the whole session (S2 / S8 / M1.1 / M1.3 / M1.4 / M1.6 / execution-plan §4).
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import os
16
+ from collections.abc import Callable
17
+
18
+ os.environ["PLATO_DEBUG_ASSERTS"] = "1"
19
+
20
+ _mutant_undo: Callable[[], None] | None = None
21
+
22
+
23
+ def pytest_sessionstart(session: object) -> None:
24
+ """Apply ``PLATO_MUTANT`` once, after collection, before tests run."""
25
+ del session
26
+ global _mutant_undo
27
+ name = os.environ.get("PLATO_MUTANT")
28
+ if not name:
29
+ return
30
+ import plato.testing.data_mutants as data_mutants
31
+ import plato.testing.eval_mutants as eval_mutants
32
+ import plato.testing.memory_mutants as memory_mutants
33
+ import plato.testing.model_mutants as model_mutants
34
+ import plato.testing.obs_mutants as obs_mutants
35
+ from plato.testing.mutants import registry
36
+
37
+ found = registry().get(name)
38
+ if found is None:
39
+ known = ", ".join(sorted(registry())) or "(none)"
40
+ raise RuntimeError(
41
+ f"unknown PLATO_MUTANT={name!r}; known: {known} "
42
+ f"(via {memory_mutants.__name__}, {model_mutants.__name__}, "
43
+ f"{obs_mutants.__name__}, {data_mutants.__name__}, "
44
+ f"{eval_mutants.__name__})"
45
+ )
46
+ _mutant_undo = found.apply()
47
+
48
+
49
+ def pytest_sessionfinish(session: object, exitstatus: int) -> None:
50
+ """Undo the session mutant, if any."""
51
+ del session, exitstatus
52
+ global _mutant_undo
53
+ undo = _mutant_undo
54
+ _mutant_undo = None
55
+ if undo is not None:
56
+ undo()