capability-reasoning-kernel 0.5.0rc2__tar.gz → 0.6.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 (110) hide show
  1. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.github/workflows/ci.yml +3 -3
  2. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.github/workflows/pages.yml +1 -1
  3. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.github/workflows/release.yml +1 -1
  4. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/CHANGELOG.md +48 -0
  5. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/PKG-INFO +28 -6
  6. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/README.md +27 -5
  7. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/SECURITY.md +4 -2
  8. capability_reasoning_kernel-0.6.0/docs/CONFORMANCE.md +93 -0
  9. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/docs/DEVELOPMENT.md +6 -1
  10. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/docs/OPERATIONS.md +5 -1
  11. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/docs/index.html +6 -1
  12. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/justfile +4 -0
  13. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/pyproject.toml +3 -1
  14. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/scripts/check_artifacts.py +11 -1
  15. capability_reasoning_kernel-0.6.0/src/reasoning_kernel/conformance/__init__.py +31 -0
  16. capability_reasoning_kernel-0.6.0/src/reasoning_kernel/conformance/cli.py +54 -0
  17. capability_reasoning_kernel-0.6.0/src/reasoning_kernel/conformance/models.py +103 -0
  18. capability_reasoning_kernel-0.6.0/src/reasoning_kernel/conformance/reference.py +277 -0
  19. capability_reasoning_kernel-0.6.0/src/reasoning_kernel/conformance/runner.py +183 -0
  20. capability_reasoning_kernel-0.6.0/tests/test_conformance.py +229 -0
  21. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_release_contract.py +4 -4
  22. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/uv.lock +25 -7
  23. capability_reasoning_kernel-0.5.0rc2/docs/CONFORMANCE.md +0 -30
  24. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.env.example +0 -0
  25. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.github/dependabot.yml +0 -0
  26. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.gitignore +0 -0
  27. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.pre-commit-config.yaml +0 -0
  28. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/.python-version +0 -0
  29. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/CLAUDE.md +0 -0
  30. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/LICENSE +0 -0
  31. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/docs/.nojekyll +0 -0
  32. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/docs/ANALYSIS-2026-07.md +0 -0
  33. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/docs/favicon.svg +0 -0
  34. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/scripts/check_published.py +0 -0
  35. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/scripts/check_version.py +0 -0
  36. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/__init__.py +0 -0
  37. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/config.py +0 -0
  38. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/context/__init__.py +0 -0
  39. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/context/assembler.py +0 -0
  40. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/__init__.py +0 -0
  41. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/_report.py +0 -0
  42. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/email_exfil.py +0 -0
  43. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/live_run.py +0 -0
  44. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/merge.py +0 -0
  45. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/reasoner_error.py +0 -0
  46. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/run_limits.py +0 -0
  47. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/demo/subkernel.py +0 -0
  48. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/__init__.py +0 -0
  49. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/effects.py +0 -0
  50. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/gate.py +0 -0
  51. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/interpreter.py +0 -0
  52. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/runtime.py +0 -0
  53. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/session.py +0 -0
  54. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/kernel/taint.py +0 -0
  55. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/memory/__init__.py +0 -0
  56. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/memory/sink.py +0 -0
  57. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/memory/store.py +0 -0
  58. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/memory/trace.py +0 -0
  59. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/py.typed +0 -0
  60. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/__init__.py +0 -0
  61. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/anthropic.py +0 -0
  62. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/base.py +0 -0
  63. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/deepseek.py +0 -0
  64. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/factory.py +0 -0
  65. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/fake.py +0 -0
  66. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/openai.py +0 -0
  67. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/parse.py +0 -0
  68. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/roles.py +0 -0
  69. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/reasoner/telemetry.py +0 -0
  70. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/__init__.py +0 -0
  71. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/capability.py +0 -0
  72. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/ids.py +0 -0
  73. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/limits.py +0 -0
  74. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/plan.py +0 -0
  75. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/policy.py +0 -0
  76. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/provenance.py +0 -0
  77. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/registry.py +0 -0
  78. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/trace.py +0 -0
  79. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/schemas/values.py +0 -0
  80. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/tools/__init__.py +0 -0
  81. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/tools/demo_mail.py +0 -0
  82. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/src/reasoning_kernel/tools/registry.py +0 -0
  83. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/conftest.py +0 -0
  84. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_capability.py +0 -0
  85. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_composition.py +0 -0
  86. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_declass_policy.py +0 -0
  87. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_demo_email_exfil.py +0 -0
  88. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_demo_mail_tools.py +0 -0
  89. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_gate_capability.py +0 -0
  90. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_gate_provenance_declassify.py +0 -0
  91. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_gate_unrestricted_readers.py +0 -0
  92. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_interpreter_loop.py +0 -0
  93. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_invariant_a.py +0 -0
  94. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_merge.py +0 -0
  95. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_no_bypass_conformance.py +0 -0
  96. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_operational.py +0 -0
  97. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_parse_with_schema.py +0 -0
  98. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_plan_schema.py +0 -0
  99. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_provenance_propagation.py +0 -0
  100. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_provider_contracts.py +0 -0
  101. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_providers_live.py +0 -0
  102. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_public_api.py +0 -0
  103. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_reasoner_factory.py +0 -0
  104. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_reasoner_robustness.py +0 -0
  105. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_registry.py +0 -0
  106. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_run_limits.py +0 -0
  107. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_store.py +0 -0
  108. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_subject_provenance.py +0 -0
  109. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_subkernel.py +0 -0
  110. {capability_reasoning_kernel-0.5.0rc2 → capability_reasoning_kernel-0.6.0}/tests/test_trace_append_only.py +0 -0
@@ -46,7 +46,7 @@ jobs:
46
46
  persist-credentials: false
47
47
 
48
48
  - name: Install uv
49
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
49
+ uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
50
50
  with:
51
51
  version: "0.12.10"
52
52
  checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
@@ -84,7 +84,7 @@ jobs:
84
84
  persist-credentials: false
85
85
 
86
86
  - name: Install uv
87
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
87
+ uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
88
88
  with:
89
89
  version: "0.12.10"
90
90
  checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
@@ -129,7 +129,7 @@ jobs:
129
129
  persist-credentials: false
130
130
 
131
131
  - name: Install uv
132
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
132
+ uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
133
133
  with:
134
134
  version: "0.12.10"
135
135
  checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
@@ -39,7 +39,7 @@ jobs:
39
39
  enablement: true # self-enable Pages (build_type=workflow) on first run — no manual Settings step
40
40
 
41
41
  - name: Upload artifact
42
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
42
+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
43
43
  with:
44
44
  path: docs
45
45
 
@@ -27,7 +27,7 @@ jobs:
27
27
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28
28
  with:
29
29
  persist-credentials: false
30
- - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
30
+ - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
31
31
  with:
32
32
  version: "0.12.10"
33
33
  checksum: "173d95a0c32d18c896c46ba6fafbf3cf9c14ab74b033f81b76c883ef492a976b"
@@ -4,6 +4,51 @@ All notable changes to this project are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.6.0] - 2026-09-06
8
+
9
+ Stable executable host-conformance release. It promotes the candidate after reference, package,
10
+ provider and real-consumer validation while keeping live host-adapter acceptance a separate claim.
11
+
12
+ ### Changed
13
+
14
+ - Validate all nine `operational-v1` cases through the packaged reference target and all four
15
+ `gate-v1` cases through Vibemonitor's real pre-pipeline checkpoint on Python 3.12 and 3.13.
16
+ - Verify the release wheel and source distribution through checksummed CI round trips, isolated
17
+ installation, TestPyPI and PyPI publication, plus the required live DeepSeek provider gate.
18
+ - Preserve the evidence boundary: consumer conformance does not establish an organic
19
+ enforce-to-PR run, complete `RunSession` adoption, or live adapter UAT.
20
+
21
+ ## [0.6.0rc1] - 2026-09-06
22
+
23
+ First executable host-conformance candidate. It turns the operational checklist into a versioned,
24
+ key-free profile without claiming that package tests replace live-adapter acceptance.
25
+
26
+ ### Added
27
+
28
+ - Public `reasoning_kernel.conformance` API with fixed `gate-v1` and `operational-v1` profiles,
29
+ trusted host scenarios and external-effect observations.
30
+ - Sanitized JSON reports with pass, fail and inconclusive outcomes, plus a
31
+ `reasoning-kernel-conformance` CLI suitable for CI artifacts.
32
+ - Nine-case reference suite covering benign and injected flows, capability denial, invalid output,
33
+ failures around effects, audit failure and crash/reopen without replay.
34
+ - Four-case Gate profile for consumers that use the verifier as a pre-pipeline checkpoint without
35
+ embedding the operational session runtime.
36
+ - Structural report checks requiring every started effect to have a preceding successful Gate
37
+ decision and every completion to follow its matching start.
38
+
39
+ ## [0.5.0] - 2026-09-06
40
+
41
+ First stable operational embedding release. It promotes the two release candidates after package,
42
+ provider and real-consumer compatibility validation; each host remains responsible for validating
43
+ its own live adapters and policies.
44
+
45
+ ### Changed
46
+
47
+ - Qualify OpenAI SDK 3.8 through the required live DeepSeek compatibility gate without calling the
48
+ OpenAI service, and update the locked Pyright version.
49
+ - Upgrade the SHA-pinned uv and Pages actions after CI artifact round-trip and rendered Pages checks.
50
+ - Validate Vibemonitor's real `KernelGate` integration and complete consumer suite on Python 3.14.
51
+
7
52
  ## [0.5.0rc2] - 2026-09-06
8
53
 
9
54
  Maintenance candidate following the first published operational release. Publication remains
@@ -201,6 +246,9 @@ Initial reference implementation of the Reasoning Kernel pattern (strong / CaMeL
201
246
  invariants, no-effect-bypasses-the-Verifier by construction, the deterministic declassification seam,
202
247
  and the worked email-exfiltration demo.
203
248
 
249
+ [0.6.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.6.0
250
+ [0.6.0rc1]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.6.0rc1
251
+ [0.5.0]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.5.0
204
252
  [0.5.0rc2]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.5.0rc2
205
253
  [0.5.0rc1]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.5.0rc1
206
254
  [0.4.2]: https://github.com/gianlucamazza/reasoning-kernel/releases/tag/v0.4.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: capability-reasoning-kernel
3
- Version: 0.5.0rc2
3
+ Version: 0.6.0
4
4
  Summary: Reference implementation of the Reasoning Kernel pattern (strong / CaMeL-like form)
5
5
  Project-URL: Homepage, https://github.com/gianlucamazza/reasoning-kernel
6
6
  Project-URL: Repository, https://github.com/gianlucamazza/reasoning-kernel
@@ -105,7 +105,7 @@ The trusted, deterministic kernel is the **interpreter + capability/provenance g
105
105
  Reasoner providers: Anthropic, OpenAI, Deepseek (OpenAI-compatible, reusing the `openai` SDK via a
106
106
  `base_url` — no separate dependency), plus a deterministic `FakeProvider` for key-free tests — all
107
107
  behind one interface (`reasoner/base.py`). Configured providers can be exercised through the same
108
- live contract (`just test-live`). The 0.5 release workflow requires DeepSeek qualification; OpenAI
108
+ live contract (`just test-live`). The release workflow requires DeepSeek qualification; OpenAI
109
109
  and Anthropic remain independently contract-tested unless a release explicitly qualifies them live.
110
110
 
111
111
  ## No effect bypasses the Verifier — by construction
@@ -157,13 +157,35 @@ pre-commit) and how to configure provider keys. Release notes are in
157
157
 
158
158
  Install: `pip install capability-reasoning-kernel` — it **imports as** `import reasoning_kernel`
159
159
  (the PyPI name differs because `reasoning-kernel` was taken by an unrelated project).
160
- Install the operational candidate explicitly with
161
- `pip install capability-reasoning-kernel==0.5.0rc2`.
160
+ Install the conformance release explicitly with
161
+ `pip install capability-reasoning-kernel==0.6.0`.
162
162
 
163
163
  For operational embedding, use `RunSession` with a persistent sink and bounded defaults; see
164
164
  [operations and migration](docs/OPERATIONS.md) and the [conformance checklist](docs/CONFORMANCE.md).
165
- It isolates each run, records partial effects and refuses automatic replay. The 0.5 line is a
166
- published pre-release; package publication is not evidence of validated host integration.
165
+ It isolates each run, records partial effects and refuses automatic replay. Package publication and
166
+ consumer compatibility tests are not evidence that a host's live adapters are correctly configured.
167
+
168
+ ### Executable host conformance
169
+
170
+ Version 0.6 adds fixed `gate-v1` and `operational-v1` profiles for turning host tests into sanitized,
171
+ repeatable evidence. `gate-v1` covers hosts that use the verifier as a pre-pipeline checkpoint;
172
+ `operational-v1` covers complete `RunSession` integrations. Run the key-free operational reference:
173
+
174
+ ```bash
175
+ reasoning-kernel-conformance \
176
+ reasoning_kernel.conformance.reference:reference_suite \
177
+ --output conformance.json
178
+ ```
179
+
180
+ An application supplies a trusted zero-argument factory returning `ConformanceSuite` for one profile.
181
+ Each required `ScenarioKind` runs in isolation and returns a `ConformanceObservation` containing the
182
+ decision or kernel result and counts observed in the external test world. Expectations are fixed by
183
+ the profile: applications cannot redefine a denial as success. Exit `0` means every case passed; `1` means a failure or
184
+ inconclusive case; `2` means an invalid suite or runner, or an error while loading the factory, running
185
+ the suite, serializing the report, or writing `--output`. Reports contain only version metadata,
186
+ scenario/check identifiers and outcomes—never prompts, payloads, paths or raw provider errors.
187
+
188
+ See [the conformance guide](docs/CONFORMANCE.md) for the required cases and host factory contract.
167
189
 
168
190
  Explicit low-level wiring remains available. The package root re-exports the building blocks. Sketch (see
169
191
  [`demo/email_exfil.py`](src/reasoning_kernel/demo/email_exfil.py) for a complete, runnable version):
@@ -66,7 +66,7 @@ The trusted, deterministic kernel is the **interpreter + capability/provenance g
66
66
  Reasoner providers: Anthropic, OpenAI, Deepseek (OpenAI-compatible, reusing the `openai` SDK via a
67
67
  `base_url` — no separate dependency), plus a deterministic `FakeProvider` for key-free tests — all
68
68
  behind one interface (`reasoner/base.py`). Configured providers can be exercised through the same
69
- live contract (`just test-live`). The 0.5 release workflow requires DeepSeek qualification; OpenAI
69
+ live contract (`just test-live`). The release workflow requires DeepSeek qualification; OpenAI
70
70
  and Anthropic remain independently contract-tested unless a release explicitly qualifies them live.
71
71
 
72
72
  ## No effect bypasses the Verifier — by construction
@@ -118,13 +118,35 @@ pre-commit) and how to configure provider keys. Release notes are in
118
118
 
119
119
  Install: `pip install capability-reasoning-kernel` — it **imports as** `import reasoning_kernel`
120
120
  (the PyPI name differs because `reasoning-kernel` was taken by an unrelated project).
121
- Install the operational candidate explicitly with
122
- `pip install capability-reasoning-kernel==0.5.0rc2`.
121
+ Install the conformance release explicitly with
122
+ `pip install capability-reasoning-kernel==0.6.0`.
123
123
 
124
124
  For operational embedding, use `RunSession` with a persistent sink and bounded defaults; see
125
125
  [operations and migration](docs/OPERATIONS.md) and the [conformance checklist](docs/CONFORMANCE.md).
126
- It isolates each run, records partial effects and refuses automatic replay. The 0.5 line is a
127
- published pre-release; package publication is not evidence of validated host integration.
126
+ It isolates each run, records partial effects and refuses automatic replay. Package publication and
127
+ consumer compatibility tests are not evidence that a host's live adapters are correctly configured.
128
+
129
+ ### Executable host conformance
130
+
131
+ Version 0.6 adds fixed `gate-v1` and `operational-v1` profiles for turning host tests into sanitized,
132
+ repeatable evidence. `gate-v1` covers hosts that use the verifier as a pre-pipeline checkpoint;
133
+ `operational-v1` covers complete `RunSession` integrations. Run the key-free operational reference:
134
+
135
+ ```bash
136
+ reasoning-kernel-conformance \
137
+ reasoning_kernel.conformance.reference:reference_suite \
138
+ --output conformance.json
139
+ ```
140
+
141
+ An application supplies a trusted zero-argument factory returning `ConformanceSuite` for one profile.
142
+ Each required `ScenarioKind` runs in isolation and returns a `ConformanceObservation` containing the
143
+ decision or kernel result and counts observed in the external test world. Expectations are fixed by
144
+ the profile: applications cannot redefine a denial as success. Exit `0` means every case passed; `1` means a failure or
145
+ inconclusive case; `2` means an invalid suite or runner, or an error while loading the factory, running
146
+ the suite, serializing the report, or writing `--output`. Reports contain only version metadata,
147
+ scenario/check identifiers and outcomes—never prompts, payloads, paths or raw provider errors.
148
+
149
+ See [the conformance guide](docs/CONFORMANCE.md) for the required cases and host factory contract.
128
150
 
129
151
  Explicit low-level wiring remains available. The package root re-exports the building blocks. Sketch (see
130
152
  [`demo/email_exfil.py`](src/reasoning_kernel/demo/email_exfil.py) for a complete, runnable version):
@@ -38,9 +38,11 @@ permissive policy written on top of it.
38
38
 
39
39
  | Version | Supported |
40
40
  |---------|-----------|
41
+ | `0.6.x` | ✅; validate host adapters before application use |
42
+ | `0.6.0rc1` | Superseded candidate; upgrade to `0.6.0` |
43
+ | `0.5.x` | ✅; validate host adapters before application use |
41
44
  | `0.4.x` | ✅ |
42
- | `0.5.0rc2` | Current candidate; report issues, validate adapters before application use |
43
- | `0.5.0rc1` | Superseded candidate; upgrade to the current candidate |
45
+ | `0.5.0rc1`, `0.5.0rc2` | Superseded candidates; upgrade to `0.5.0` |
44
46
  | `< 0.4` | ❌ |
45
47
 
46
48
  ## Reporting a vulnerability
@@ -0,0 +1,93 @@
1
+ # Conformance and operational acceptance
2
+
3
+ Conformance establishes mediation points. Policy correctness and host configuration are separate
4
+ requirements; an allow-all policy can conform without useful confidentiality protection.
5
+
6
+ | Requirement | Test evidence |
7
+ |---|---|
8
+ | Every model input is assembled by the host/kernel | `test_invariant_a`, `test_subject_provenance` |
9
+ | Each callable invocation has its own preceding Gate authorization | `test_no_bypass_conformance`, `test_operational` |
10
+ | Parsing, merging and delegation cannot launder provenance | `test_provenance_propagation`, `test_merge`, `test_subkernel` |
11
+ | Delegated authority never exceeds its parent | `test_composition`, `test_subkernel`, `test_operational` |
12
+ | Egress READs receive provenance checks | `test_operational` |
13
+ | Normalized checked values are the executed values | `test_operational` |
14
+ | Contexts/budgets are isolated between roots and shared within a tree | `test_operational` |
15
+ | Failure stops later work and preserves partial-effect evidence | `test_operational`, `test_reasoner_robustness` |
16
+ | Storage failure before start prevents the callable | `test_operational` |
17
+ | Process crashes leave durable evidence; reopening cannot replay | `test_operational` |
18
+ | Provider refusal, truncation and fallback errors are terminal | `test_provider_contracts` |
19
+
20
+ Reproduce these scenarios against application policies and wiring, including tools returning invalid
21
+ output or raising after an effect. Validators and policies are trusted code and must not perform I/O.
22
+ Supplying an external model authorizes data transfer; quarantining it does not make that transfer private.
23
+
24
+ Before application use, verify identity mapping, destination restrictions, adapter provenance, egress
25
+ declarations, finite adapter timeouts, shared-client thread safety, audit access/retention and operator
26
+ reconciliation. Exercise clean and injected input with the chosen providers. Record local, CI,
27
+ published-artifact and live-adapter evidence separately.
28
+
29
+ Conformance does not include rollback, exactly-once external effects, automatic recovery, tamper-proof
30
+ storage, a Python security sandbox or correctness of arbitrary declassification policies.
31
+
32
+ ## Executable profiles
33
+
34
+ The `reasoning_kernel.conformance` package turns the requirements above into fixed host acceptance
35
+ profiles. Use `gate-v1` when the host embeds the verifier as a pre-pipeline checkpoint but does not
36
+ use `RunSession`; use `operational-v1` for the complete operational runtime. A suite selects one
37
+ profile and must provide each of its `ScenarioKind` values exactly once.
38
+
39
+ ### `gate-v1`
40
+
41
+ | Scenario | Required evidence |
42
+ |---|---|
43
+ | `gate_authorized` | An authorized proposal is allowed, not enforcement-skipped, and audited |
44
+ | `gate_capability_denied` | Missing capability is denied, enforcement-skipped, audited, and launches nothing |
45
+ | `gate_tainted_egress_denied` | Tainted egress is denied, enforcement-skipped, audited, and launches nothing |
46
+ | `gate_internal_error_denied` | An internal mapping error fails closed, is audited, and launches nothing |
47
+
48
+ ### `operational-v1`
49
+
50
+ | Scenario | Required evidence |
51
+ |---|---|
52
+ | `benign_effect` | An authorized effect succeeds and is externally observable |
53
+ | `injected_control` | Injected content cannot redirect control or the authorized destination |
54
+ | `injected_egress` | An attempted tainted exfiltration is blocked with no unauthorized effect |
55
+ | `capability_denied` | Missing authority blocks the WRITE before its callable |
56
+ | `invalid_output` | Invalid adapter output is recorded and later effects do not run |
57
+ | `tool_failure_before_effect` | The outcome is uncertain, no effect is observed and execution stops |
58
+ | `tool_failure_after_effect` | The effect is observed but remains uncertain and execution stops |
59
+ | `audit_failure_before_dispatch` | Failure to persist the start prevents the callable |
60
+ | `crash_reopen_no_replay` | The incomplete root is discoverable and its ID cannot be reused |
61
+
62
+ The host factory is trusted Python code and must return a `ConformanceSuite`. Operational scenario
63
+ callables build fresh `RunSession` instances and test worlds. Gate scenarios exercise the host's real
64
+ checkpoint in enforcement mode. Both return `ConformanceObservation`. `authorized_effects`,
65
+ `unauthorized_effects` and `subsequent_effects` count externally visible WRITE effects, not READ calls
66
+ or trace records. The host must observe the destination system or a faithful test double; the kernel
67
+ cannot infer an external commit from its own log.
68
+ The suite name is a 1–64 character identifier containing only letters, digits, `.`, `_` or `-`; it
69
+ must not contain a customer name, path or other operational data.
70
+
71
+ ```python
72
+ from reasoning_kernel.conformance import ConformanceScenario, ConformanceSuite, ScenarioKind
73
+
74
+ def build_suite() -> ConformanceSuite:
75
+ return ConformanceSuite(
76
+ name="my-agent",
77
+ profile="operational-v1",
78
+ scenarios=(
79
+ ConformanceScenario(ScenarioKind.BENIGN_EFFECT, run_benign),
80
+ # ...exactly one callable for every operational-v1 ScenarioKind...
81
+ ),
82
+ )
83
+ ```
84
+
85
+ Run `reasoning-kernel-conformance my_agent.conformance:build_suite --output conformance.json`.
86
+ The JSON schema is versioned independently from the profile. A report is deliberately payload-free
87
+ and is evidence from trusted host observers, not a signed attestation. Passing it does not establish
88
+ production identity mapping, credentials, network policy, retention or live-adapter correctness.
89
+
90
+ In CI, install an exact package version, run the command above and retain `conformance.json` as an
91
+ artifact only after the command exits successfully. Inspect `cases[].outcome` and `cases[].checks`:
92
+ `fail` means observed evidence violated a fixed expectation, while `inconclusive` means the scenario
93
+ could not produce trustworthy evidence. Neither is a pass and there is no permissive CLI override.
@@ -19,6 +19,7 @@ Python 3.12+ is required. The default suite needs no API keys: it runs against t
19
19
  |--------------------|--------------------------------------------------------------------------|
20
20
  | `just check` | `lint` + `typecheck` + `test` — everything CI runs, in one command |
21
21
  | `just demo` | Worked demo (FakeProvider): legit send commits; injection inert; exfil blocked |
22
+ | `just conformance` | Complete key-free `operational-v1` reference profile |
22
23
  | `just demo-subkernel` | §5.4 composition demo: untrusted content delegated at a reduced grant |
23
24
  | `just demo-limits` | Termination demo: `RunLimits` aborts the run closed before the second effect |
24
25
  | `just demo-reasoner-error` | Fail-closed demo: a failing reasoner commits nothing (`plan_rejected`) |
@@ -48,11 +49,15 @@ Python 3.12+ is required. The default suite needs no API keys: it runs against t
48
49
  CI (`.github/workflows/ci.yml`) runs lint, typecheck, and the covered test suite on a Python
49
50
  3.12 + 3.13 + 3.14 matrix on push / PR and on release tags via a reusable workflow.
50
51
  `just package-check` validates wheel/sdist metadata and an isolated wheel install. The live job runs
51
- manually and when a release calls the reusable workflow with required providers. The 0.5 release
52
+ manually and when a release calls the reusable workflow with required providers. The release
52
53
  workflow requires DeepSeek before package build or publication. Release notes live in
53
54
  [`CHANGELOG.md`](../CHANGELOG.md);
54
55
  security reporting and scope in [`SECURITY.md`](../SECURITY.md).
55
56
 
57
+ The conformance CLI is included in wheel smoke testing. It imports a trusted host factory, executes
58
+ the selected fixed profile and returns a non-zero status for failures, inconclusive evidence or invalid suite
59
+ configuration; it never calls a live provider on its own.
60
+
56
61
  The pyright configuration selects `.venv` explicitly, avoiding accidental system-Python imports.
57
62
  Operational contracts and migration are in [OPERATIONS.md](OPERATIONS.md); the integration
58
63
  acceptance checklist is in [CONFORMANCE.md](CONFORMANCE.md). Provider refusal/truncation handling
@@ -1,4 +1,4 @@
1
- # Operational embedding and migration (0.5 candidate)
1
+ # Operational embedding and migration (0.5)
2
2
 
3
3
  `RunSession` is the bounded, single-use entry point. The host supplies authenticated identity, a
4
4
  trusted query, a fixed grant, deterministic policy, schemas and adapters. Authentication, scheduling,
@@ -147,3 +147,7 @@ providers must pass on the tagged commit before the package is built. It then bu
147
147
  hashes, publishes to TestPyPI, verifies served bytes, promotes those artifacts to PyPI and verifies
148
148
  the public bytes again. OIDC publishers/environments must be configured. Provider qualification is
149
149
  still distinct from host-adapter acceptance.
150
+
151
+ Use the executable `operational-v1` profile in [CONFORMANCE.md](CONFORMANCE.md) to standardize host
152
+ tests and CI evidence. A passing report demonstrates the supplied scenarios and observers only; it
153
+ does not replace a controlled live-adapter UAT.
@@ -435,6 +435,11 @@
435
435
  <span class="mod">memory/trace.py</span>
436
436
  <p>An append-only record of decisions and invocations. Operational sessions persist authorization and start before calling a tool. Missing completion after a crash means an uncertain effect requiring reconciliation.</p>
437
437
  </div>
438
+ <div class="role">
439
+ <div class="head"><span class="name">Conformance kit</span><span class="trust t">trusted</span></div>
440
+ <span class="mod">conformance/</span>
441
+ <p>A fixed operational profile turns host scenarios and external observations into a sanitized CI report. Expectations belong to the profile, not to the host being tested.</p>
442
+ </div>
438
443
  </div>
439
444
  </div>
440
445
  </section>
@@ -662,7 +667,7 @@ result = kernel.run(ctx) <span class="c"># committed is None if it f
662
667
  <div class="wrap">
663
668
  <p class="eyebrow">Get started</p>
664
669
  <h2>Read it, fork it, conform to it</h2>
665
- <p class="lede">It is a reference implementation and spec — a vetted skeleton, not a turn-key product. Install it, run the worked demo, or conform your own agent to the pattern.</p>
670
+ <p class="lede">It is a reference implementation and spec — a vetted skeleton, not a turn-key product. Install it, run the worked demo, then execute the versioned conformance profile against your own host.</p>
666
671
  <div class="cta">
667
672
  <div class="install">
668
673
  <span class="dollar">$</span>
@@ -35,6 +35,10 @@ test-live:
35
35
  demo:
36
36
  uv run python -m reasoning_kernel.demo.email_exfil
37
37
 
38
+ # run the complete key-free operational conformance profile
39
+ conformance:
40
+ uv run reasoning-kernel-conformance reasoning_kernel.conformance.reference:reference_suite
41
+
38
42
  # run the demo end-to-end against a REAL provider (needs a key in .env)
39
43
  demo-live:
40
44
  uv run python -m reasoning_kernel.demo.live_run
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "capability-reasoning-kernel"
7
- version = "0.5.0rc2"
7
+ version = "0.6.0"
8
8
  description = "Reference implementation of the Reasoning Kernel pattern (strong / CaMeL-like form)"
9
9
  authors = [{ name = "Gianluca Mazza — Venere Labs" }]
10
10
  license = { text = "MIT" }
@@ -46,6 +46,7 @@ dev = ["pytest>=8.0", "pytest-cov>=5.0", "ruff>=0.9", "pyright>=1.1.380", "twine
46
46
 
47
47
  [project.scripts]
48
48
  reasoning-kernel-demo = "reasoning_kernel.demo.email_exfil:main"
49
+ reasoning-kernel-conformance = "reasoning_kernel.conformance.cli:entrypoint"
49
50
 
50
51
  [tool.hatch.build.targets.wheel]
51
52
  packages = ["src/reasoning_kernel"]
@@ -64,6 +65,7 @@ venv = ".venv"
64
65
  include = ["src/reasoning_kernel"]
65
66
  pythonVersion = "3.12"
66
67
  strict = [
68
+ "src/reasoning_kernel/conformance", # executable host acceptance contract
67
69
  "src/reasoning_kernel/schemas", # contract layer
68
70
  "src/reasoning_kernel/kernel", # the trusted core: interpreter, gate, dispatcher, taint
69
71
  "src/reasoning_kernel/memory", # trusted core: ValueStore (tainted-value custody) + TraceWriter
@@ -39,7 +39,17 @@ def main() -> None:
39
39
  check=True,
40
40
  stdout=subprocess.DEVNULL,
41
41
  )
42
- print("Wheel import, public API and deterministic demo passed in an isolated environment.")
42
+ subprocess.run(
43
+ [
44
+ str(python.parent / "reasoning-kernel-conformance"),
45
+ "reasoning_kernel.conformance.reference:reference_suite",
46
+ ],
47
+ cwd=directory,
48
+ env=env,
49
+ check=True,
50
+ stdout=subprocess.DEVNULL,
51
+ )
52
+ print("Wheel import, demo and conformance CLI passed in an isolated environment.")
43
53
 
44
54
 
45
55
  if __name__ == "__main__":
@@ -0,0 +1,31 @@
1
+ """Executable, versioned evidence that a host preserves the kernel's contracts."""
2
+
3
+ from reasoning_kernel.conformance.models import (
4
+ GATE_V1_KINDS,
5
+ OPERATIONAL_V1_KINDS,
6
+ ConformanceCaseResult,
7
+ ConformanceObservation,
8
+ ConformanceProfile,
9
+ ConformanceReport,
10
+ ConformanceScenario,
11
+ ConformanceSuite,
12
+ ScenarioKind,
13
+ )
14
+ from reasoning_kernel.conformance.runner import (
15
+ ConformanceConfigurationError,
16
+ run_conformance,
17
+ )
18
+
19
+ __all__ = [
20
+ "GATE_V1_KINDS",
21
+ "OPERATIONAL_V1_KINDS",
22
+ "ConformanceCaseResult",
23
+ "ConformanceConfigurationError",
24
+ "ConformanceObservation",
25
+ "ConformanceProfile",
26
+ "ConformanceReport",
27
+ "ConformanceScenario",
28
+ "ConformanceSuite",
29
+ "ScenarioKind",
30
+ "run_conformance",
31
+ ]
@@ -0,0 +1,54 @@
1
+ """Command-line entry point for host conformance suites."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import importlib
7
+ import sys
8
+ from collections.abc import Callable, Sequence
9
+ from pathlib import Path
10
+
11
+ from reasoning_kernel.conformance.models import ConformanceSuite
12
+ from reasoning_kernel.conformance.runner import ConformanceConfigurationError, run_conformance
13
+
14
+
15
+ def _load_factory(reference: str) -> Callable[[], object]:
16
+ module_name, separator, attribute = reference.partition(":")
17
+ if not separator or not module_name or not attribute:
18
+ raise ConformanceConfigurationError("factory must use module:attribute syntax")
19
+ factory = getattr(importlib.import_module(module_name), attribute)
20
+ if not callable(factory):
21
+ raise ConformanceConfigurationError("factory is not callable")
22
+ return factory
23
+
24
+
25
+ def main(argv: Sequence[str] | None = None) -> int:
26
+ parser = argparse.ArgumentParser(description="Run Reasoning Kernel host conformance")
27
+ parser.add_argument("factory", help="trusted host suite factory as module:attribute")
28
+ parser.add_argument("--output", type=Path, help="write the sanitized JSON report to this path")
29
+ args = parser.parse_args(argv)
30
+
31
+ try:
32
+ candidate = _load_factory(args.factory)()
33
+ if not isinstance(candidate, ConformanceSuite):
34
+ raise ConformanceConfigurationError("factory did not return ConformanceSuite")
35
+ report = run_conformance(candidate)
36
+ rendered = report.model_dump_json(indent=2) + "\n"
37
+ if args.output is None:
38
+ sys.stdout.write(rendered)
39
+ else:
40
+ args.output.write_text(rendered, encoding="utf-8")
41
+ outcome = "PASS" if report.passed else "FAIL"
42
+ print(f"{outcome} {report.profile} ({len(report.cases)} cases)")
43
+ return 0 if report.passed else 1
44
+ except Exception:
45
+ print("conformance configuration or runner error", file=sys.stderr)
46
+ return 2
47
+
48
+
49
+ def entrypoint() -> None:
50
+ raise SystemExit(main())
51
+
52
+
53
+ if __name__ == "__main__":
54
+ entrypoint()
@@ -0,0 +1,103 @@
1
+ """Public contracts for executable host conformance evidence."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import re
6
+ from collections.abc import Callable
7
+ from dataclasses import dataclass
8
+ from enum import StrEnum
9
+ from typing import Literal
10
+
11
+ from pydantic import BaseModel, ConfigDict, Field
12
+
13
+ from reasoning_kernel.schemas.trace import RunResult
14
+
15
+ ConformanceProfile = Literal["gate-v1", "operational-v1"]
16
+
17
+
18
+ class ScenarioKind(StrEnum):
19
+ """Required cases in the versioned conformance profiles."""
20
+
21
+ BENIGN_EFFECT = "benign_effect"
22
+ INJECTED_CONTROL = "injected_control"
23
+ INJECTED_EGRESS = "injected_egress"
24
+ CAPABILITY_DENIED = "capability_denied"
25
+ INVALID_OUTPUT = "invalid_output"
26
+ TOOL_FAILURE_BEFORE_EFFECT = "tool_failure_before_effect"
27
+ TOOL_FAILURE_AFTER_EFFECT = "tool_failure_after_effect"
28
+ AUDIT_FAILURE_BEFORE_DISPATCH = "audit_failure_before_dispatch"
29
+ CRASH_REOPEN_NO_REPLAY = "crash_reopen_no_replay"
30
+ GATE_AUTHORIZED = "gate_authorized"
31
+ GATE_CAPABILITY_DENIED = "gate_capability_denied"
32
+ GATE_TAINTED_EGRESS_DENIED = "gate_tainted_egress_denied"
33
+ GATE_INTERNAL_ERROR_DENIED = "gate_internal_error_denied"
34
+
35
+
36
+ OPERATIONAL_V1_KINDS = tuple(kind for kind in ScenarioKind if not kind.value.startswith("gate_"))
37
+ GATE_V1_KINDS = tuple(kind for kind in ScenarioKind if kind.value.startswith("gate_"))
38
+
39
+
40
+ @dataclass(frozen=True, slots=True)
41
+ class ConformanceObservation:
42
+ """Evidence returned by trusted host code for one isolated scenario.
43
+
44
+ Effect counts cover externally visible WRITE effects, not READ calls. The
45
+ kernel deliberately cannot infer external state from its own trace.
46
+ """
47
+
48
+ result: RunResult | None = None
49
+ authorized_effects: int = 0
50
+ unauthorized_effects: int = 0
51
+ subsequent_effects: int = 0
52
+ replay_refused: bool | None = None
53
+ incomplete_discovered: bool | None = None
54
+ decision_allowed: bool | None = None
55
+ decision_enforced: bool | None = None
56
+ audit_recorded: bool | None = None
57
+
58
+ def __post_init__(self) -> None:
59
+ if min(self.authorized_effects, self.unauthorized_effects, self.subsequent_effects) < 0:
60
+ raise ValueError("effect counts cannot be negative")
61
+
62
+
63
+ @dataclass(frozen=True, slots=True)
64
+ class ConformanceScenario:
65
+ """A required scenario and the trusted host factory that executes it."""
66
+
67
+ kind: ScenarioKind
68
+ run: Callable[[], ConformanceObservation]
69
+
70
+
71
+ @dataclass(frozen=True, slots=True)
72
+ class ConformanceSuite:
73
+ """One host target implementing exactly one complete versioned profile."""
74
+
75
+ name: str
76
+ scenarios: tuple[ConformanceScenario, ...]
77
+ profile: ConformanceProfile = "operational-v1"
78
+
79
+ def __post_init__(self) -> None:
80
+ if re.fullmatch(r"[A-Za-z0-9._-]{1,64}", self.name) is None:
81
+ raise ValueError("suite name must be a safe identifier")
82
+
83
+
84
+ class ConformanceCaseResult(BaseModel):
85
+ model_config = ConfigDict(frozen=True)
86
+
87
+ kind: ScenarioKind
88
+ outcome: Literal["pass", "fail", "inconclusive"]
89
+ checks: list[str] = Field(default_factory=list)
90
+
91
+
92
+ class ConformanceReport(BaseModel):
93
+ """Payload-free, machine-readable result of one conformance run."""
94
+
95
+ model_config = ConfigDict(frozen=True)
96
+
97
+ schema_version: Literal[1] = 1
98
+ profile: ConformanceProfile
99
+ suite: str
100
+ package_version: str
101
+ python_version: str
102
+ passed: bool
103
+ cases: list[ConformanceCaseResult]