courant-dev 0.5.0__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 (187) hide show
  1. courant_dev-0.6.0/PKG-INFO +415 -0
  2. courant_dev-0.6.0/README.md +363 -0
  3. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/__init__.py +1 -1
  4. courant_dev-0.6.0/courant/case/_foam_reader.py +965 -0
  5. courant_dev-0.6.0/courant/case/config.py +407 -0
  6. courant_dev-0.6.0/courant/case/dictscan.py +238 -0
  7. courant_dev-0.6.0/courant/case/mesh.py +629 -0
  8. courant_dev-0.6.0/courant/case/motion.py +81 -0
  9. courant_dev-0.6.0/courant/case/polymesh.py +448 -0
  10. courant_dev-0.6.0/courant/case/reads.py +339 -0
  11. courant_dev-0.6.0/courant/case/regime.py +197 -0
  12. courant_dev-0.6.0/courant/case/solvers.py +431 -0
  13. courant_dev-0.6.0/courant/case/viscosity.py +124 -0
  14. courant_dev-0.6.0/courant/case/wordre.py +524 -0
  15. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/mcp.py +10 -3
  16. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/preflight.py +7 -1
  17. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/spec.py +21 -2
  18. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/verify.py +3 -5
  19. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/tail.py +3 -4
  20. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/config.py +14 -0
  21. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/__init__.py +5 -3
  22. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/assess.py +9 -4
  23. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/sentences.py +7 -0
  24. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/series.py +56 -25
  25. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/judges/llm.py +12 -2
  26. courant_dev-0.6.0/courant/ctest/judges/llm_spec.py +64 -0
  27. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/run.py +18 -9
  28. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/schema.py +6 -0
  29. courant_dev-0.6.0/courant/data/certification.json +1 -0
  30. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/bundle.py +10 -4
  31. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/checkers.py +516 -78
  32. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/kb.py +30 -16
  33. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/kb_data.py +18 -4
  34. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/redact.py +2 -1
  35. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/schema.py +5 -4
  36. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/events/core.py +6 -0
  37. courant_dev-0.6.0/courant/forks.py +317 -0
  38. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/gate/run.py +3 -1
  39. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/live/watch.py +10 -2
  40. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/__init__.py +4 -1
  41. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/anthropic.py +94 -9
  42. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/budget.py +91 -3
  43. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/door.py +145 -33
  44. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/errors.py +75 -3
  45. courant_dev-0.6.0/courant/llm/prices.py +149 -0
  46. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/mcp/server.py +86 -6
  47. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/mcp/tools.py +16 -24
  48. courant_dev-0.6.0/courant/spec/as_run.py +1026 -0
  49. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/spec/check.py +60 -10
  50. courant_dev-0.6.0/courant/spec/deck.py +790 -0
  51. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/taxonomy.py +8 -3
  52. courant_dev-0.6.0/courant/verification/_fluid_reader.py +520 -0
  53. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verification/checks.py +191 -25
  54. courant_dev-0.6.0/courant/verification/convergence.py +769 -0
  55. courant_dev-0.6.0/courant/verification/fields.py +69 -0
  56. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/__init__.py +3 -2
  57. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/batch.py +2 -3
  58. courant_dev-0.6.0/courant/verify/checks.py +131 -0
  59. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/html.py +4 -3
  60. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/ingest.py +51 -16
  61. courant_dev-0.6.0/courant/verify/pack.py +259 -0
  62. courant_dev-0.6.0/courant/verify/pipeline.py +718 -0
  63. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/policy.py +28 -3
  64. courant_dev-0.6.0/courant/verify/preflight.py +273 -0
  65. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/schema.py +10 -1
  66. courant_dev-0.6.0/courant/verify/sentences.py +439 -0
  67. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/support.py +38 -3
  68. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/verdict2.py +21 -6
  69. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/watcher/anomaly.py +8 -1
  70. courant_dev-0.6.0/courant/watcher/exitcode.py +117 -0
  71. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/watcher/parser.py +219 -10
  72. courant_dev-0.6.0/courant_dev.egg-info/PKG-INFO +415 -0
  73. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant_dev.egg-info/SOURCES.txt +10 -0
  74. courant_dev-0.5.0/PKG-INFO +0 -146
  75. courant_dev-0.5.0/README.md +0 -94
  76. courant_dev-0.5.0/courant/case/_foam_reader.py +0 -269
  77. courant_dev-0.5.0/courant/case/config.py +0 -134
  78. courant_dev-0.5.0/courant/case/mesh.py +0 -135
  79. courant_dev-0.5.0/courant/case/reads.py +0 -90
  80. courant_dev-0.5.0/courant/case/solvers.py +0 -170
  81. courant_dev-0.5.0/courant/data/certification.json +0 -1
  82. courant_dev-0.5.0/courant/spec/deck.py +0 -455
  83. courant_dev-0.5.0/courant/verification/_fluid_reader.py +0 -228
  84. courant_dev-0.5.0/courant/verification/convergence.py +0 -257
  85. courant_dev-0.5.0/courant/verification/fields.py +0 -38
  86. courant_dev-0.5.0/courant/verify/checks.py +0 -37
  87. courant_dev-0.5.0/courant/verify/pack.py +0 -106
  88. courant_dev-0.5.0/courant/verify/pipeline.py +0 -396
  89. courant_dev-0.5.0/courant/verify/preflight.py +0 -166
  90. courant_dev-0.5.0/courant/verify/sentences.py +0 -137
  91. courant_dev-0.5.0/courant/watcher/exitcode.py +0 -23
  92. courant_dev-0.5.0/courant_dev.egg-info/PKG-INFO +0 -146
  93. {courant_dev-0.5.0 → courant_dev-0.6.0}/LICENSE +0 -0
  94. {courant_dev-0.5.0 → courant_dev-0.6.0}/MANIFEST.in +0 -0
  95. {courant_dev-0.5.0 → courant_dev-0.6.0}/NOTICE +0 -0
  96. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/case/__init__.py +0 -0
  97. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/case/schemes.py +0 -0
  98. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/__init__.py +0 -0
  99. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/__init__.py +0 -0
  100. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/audit.py +0 -0
  101. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/convergence.py +0 -0
  102. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/ctest.py +0 -0
  103. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/doctor.py +0 -0
  104. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/gate.py +0 -0
  105. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/live.py +0 -0
  106. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/tour.py +0 -0
  107. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/commands/update.py +0 -0
  108. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/config.py +0 -0
  109. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/guard.py +0 -0
  110. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/cli/main.py +0 -0
  111. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/exact.py +0 -0
  112. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/render.py +0 -0
  113. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/scale.py +0 -0
  114. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/steady.py +0 -0
  115. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/tables.py +0 -0
  116. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/converge/transient.py +0 -0
  117. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/__init__.py +0 -0
  118. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/build.py +0 -0
  119. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/data/judge-v0.labels.jsonl +0 -0
  120. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/data/judge-v0.tasks.jsonl.gz +0 -0
  121. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/judges/__init__.py +0 -0
  122. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/judges/constant.py +0 -0
  123. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/judges/courant.py +0 -0
  124. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/score.py +0 -0
  125. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/ctest/splits.py +0 -0
  126. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/__init__.py +0 -0
  127. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/certified_codes.json +0 -0
  128. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/icoFoam_cavity__cfl_blowup.case.json +0 -0
  129. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/icoFoam_cavity__cfl_blowup.log.gz +0 -0
  130. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/icoFoam_cavity__healthy.case.json +0 -0
  131. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/icoFoam_cavity__healthy.log.gz +0 -0
  132. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/icoFoam_cavity__transport_units.case.json +0 -0
  133. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/icoFoam_cavity__transport_units.log.gz +0 -0
  134. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/demo/pitzDaily_fixed_budget.tar.gz +0 -0
  135. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/audit.1.json +0 -0
  136. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/cache.1.json +0 -0
  137. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/convergence.1.json +0 -0
  138. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/error-rates.1.json +0 -0
  139. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/preflight.1.json +0 -0
  140. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/record.1.json +0 -0
  141. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/release-signature.1.json +0 -0
  142. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/spec.1.json +0 -0
  143. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/support.1.json +0 -0
  144. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/verdict.1.json +0 -0
  145. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/data/schemas/verdict.2.json +0 -0
  146. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/__init__.py +0 -0
  147. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/deterministic.py +0 -0
  148. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/findings.py +0 -0
  149. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/diagnosis/llm.py +0 -0
  150. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/events/__init__.py +0 -0
  151. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/events/diverged.py +0 -0
  152. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/gate/__init__.py +0 -0
  153. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/gate/config.py +0 -0
  154. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/live/__init__.py +0 -0
  155. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/live/engine.py +0 -0
  156. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/allowlist.py +0 -0
  157. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/openrouter.py +0 -0
  158. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/policy.py +0 -0
  159. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/llm/transport.py +0 -0
  160. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/mcp/__init__.py +0 -0
  161. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/record/__init__.py +0 -0
  162. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/record/filter.py +0 -0
  163. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/record/record.py +0 -0
  164. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/release.py +0 -0
  165. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/signing.py +0 -0
  166. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/spec/__init__.py +0 -0
  167. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/spec/extract.py +0 -0
  168. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/spec/impossible.py +0 -0
  169. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/spec/model.py +0 -0
  170. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verification/__init__.py +0 -0
  171. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verification/bounding.py +0 -0
  172. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verification/grade.py +0 -0
  173. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verification/suite.py +0 -0
  174. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/about.py +0 -0
  175. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/audit.py +0 -0
  176. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/cache.py +0 -0
  177. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/junit.py +0 -0
  178. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/outcome.py +0 -0
  179. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/verify/render.py +0 -0
  180. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/watcher/__init__.py +0 -0
  181. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant/watcher/watcher.py +0 -0
  182. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant_dev.egg-info/dependency_links.txt +0 -0
  183. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant_dev.egg-info/entry_points.txt +0 -0
  184. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant_dev.egg-info/requires.txt +0 -0
  185. {courant_dev-0.5.0 → courant_dev-0.6.0}/courant_dev.egg-info/top_level.txt +0 -0
  186. {courant_dev-0.5.0 → courant_dev-0.6.0}/pyproject.toml +0 -0
  187. {courant_dev-0.5.0 → courant_dev-0.6.0}/setup.cfg +0 -0
@@ -0,0 +1,415 @@
1
+ Metadata-Version: 2.4
2
+ Name: courant-dev
3
+ Version: 0.6.0
4
+ Summary: Courant: physics acceptance testing for machine-produced simulation. A read-only, deterministic gate that accepts, rejects or abstains on an OpenFOAM run, with the reasons it read.
5
+ Author: Shivanshu Dwivedi
6
+ Maintainer-email: Courant <hello@courant.dev>
7
+ License-Expression: Apache-2.0
8
+ Project-URL: Homepage, https://courant.dev
9
+ Project-URL: Repository, https://github.com/courantdev/courant
10
+ Project-URL: Releases, https://github.com/courantdev/courant/releases
11
+ Project-URL: Issues, https://github.com/courantdev/courant/issues
12
+ Keywords: openfoam,cfd,simulation,verification,ai-agents,mcp,ci
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering
24
+ Classifier: Topic :: Scientific/Engineering :: Physics
25
+ Classifier: Topic :: Software Development :: Quality Assurance
26
+ Classifier: Topic :: Software Development :: Testing
27
+ Requires-Python: >=3.11
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ License-File: NOTICE
31
+ Requires-Dist: pydantic>=2.6
32
+ Requires-Dist: typer>=0.12
33
+ Requires-Dist: rich>=13.7
34
+ Requires-Dist: numpy>=1.26
35
+ Requires-Dist: foamlib>=1.6
36
+ Requires-Dist: httpx>=0.27
37
+ Provides-Extra: sandbox
38
+ Requires-Dist: docker>=7.0; extra == "sandbox"
39
+ Provides-Extra: diagnosis
40
+ Requires-Dist: anthropic>=0.40; extra == "diagnosis"
41
+ Provides-Extra: build
42
+ Requires-Dist: pyinstaller>=6.6; extra == "build"
43
+ Provides-Extra: dev
44
+ Requires-Dist: pytest>=8.0; extra == "dev"
45
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
46
+ Requires-Dist: ruff>=0.4; extra == "dev"
47
+ Requires-Dist: pyyaml>=6.0; extra == "dev"
48
+ Requires-Dist: jsonschema>=4.20; extra == "dev"
49
+ Provides-Extra: mcp
50
+ Requires-Dist: mcp<3,>=2.2; extra == "mcp"
51
+ Dynamic: license-file
52
+
53
+ # Courant
54
+
55
+ **Physics acceptance testing for machine-produced simulation.**
56
+
57
+ Courant is a read-only, deterministic gate between a simulation (an AI agent's or an
58
+ engineer's) and the person who signs it. Without a task specification it decides whether an
59
+ OpenFOAM run is *valid*. With the task the run was asked to solve, it decides whether the run is
60
+ *the problem that was asked*.
61
+
62
+ Every verdict is `accept`, `reject` or `insufficient`, and every reason cites the file it read,
63
+ the method, the threshold and the value. Deterministic code decides every verdict; no language
64
+ model is in the verdict's path. Courant never edits a case, never runs a solver, and its checks
65
+ never use the network.
66
+
67
+ **[courant.dev](https://courant.dev)** &middot;
68
+ [Results](https://github.com/courantdev/courant/blob/main/RESULTS.md) &middot;
69
+ [Getting started](https://github.com/courantdev/courant/blob/main/docs/GETTING-STARTED.md) &middot;
70
+ [PyPI: courant-dev](https://pypi.org/project/courant-dev/) &middot;
71
+ [Releases](https://github.com/courantdev/courant/releases)
72
+
73
+ ![Two real OpenFOAM runs of the pitzDaily tutorial, their residuals arriving iteration by iteration. Both end with exit 0. Courant accepts run A and rejects run B, with its rule and its first reason.](https://raw.githubusercontent.com/courantdev/courant/main/docs/media/verdicts.gif)
74
+
75
+ <sub>Two real OpenFOAM v2406 runs of the pitzDaily tutorial, from `certification/corpus/`. Run A
76
+ is the tutorial as shipped. Run B is the same case with its pressure solver's tolerance loosened
77
+ from 1e-06 to 0.01. The solver ends both with `End`, exit 0. Their residuals are read by the
78
+ parser the verdict uses, and the verdicts are `courant verify --json` on the same two files:
79
+ A is accepted (rule VER-5.6); B is rejected (rule VER-5.4), first reason
80
+ `residual.not_converged`.</sub>
81
+
82
+ ## What it catches
83
+
84
+ Every figure is drawn from real solver output and Courant's own verdicts, and its numbers are
85
+ the published ones, under [Benchmarks](#benchmarks) and in
86
+ [RESULTS.md](https://github.com/courantdev/courant/blob/main/RESULTS.md). Click one to see it
87
+ full size.
88
+
89
+ <table>
90
+ <tr>
91
+ <td valign="top" align="center"><a href="https://github.com/courantdev/courant/blob/main/docs/media/courant-test.svg"><img src="https://raw.githubusercontent.com/courantdev/courant/main/docs/media/courant-test.svg" width="390" alt="The Courant Test's real runs as tiles, one per run: its residuals, whether its log ends, and Courant's verdict. Every right run is accepted and every wrong run rejected."></a></td>
92
+ <td valign="top" align="center"><a href="https://github.com/courantdev/courant/blob/main/docs/media/judges.svg"><img src="https://raw.githubusercontent.com/courantdev/courant/main/docs/media/judges.svg" width="390" alt="Wrong runs accepted on the same 420 real runs, as bars with Wilson intervals: Courant beside Claude Haiku 5.5, Claude Opus 5.5 and Claude Sonnet 5.5."></a></td>
93
+ </tr>
94
+ <tr>
95
+ <td valign="top"><b>Exit 0 is not a verdict.</b><br><sub>On the 31 real runs of the Courant Test, 31 of 31 are judged correctly: 0 of 23 wrong results accepted, 0 of 8 good results rejected. The two runs above are ringed.</sub></td>
96
+ <td valign="top"><b>Beside frontier models.</b><br><sub>The same 420 runs, the same files and the task's specification for every judge. Courant accepted 0 of 264 wrong runs; Claude Haiku 5.5 accepted 52 of 249, Claude Opus 5.5 69 of 264 and Claude Sonnet 5.5 76 of 263.</sub></td>
97
+ </tr>
98
+ <tr>
99
+ <td valign="top" align="center"><a href="https://github.com/courantdev/courant/blob/main/docs/media/wrong-problem.svg"><img src="https://raw.githubusercontent.com/courantdev/courant/main/docs/media/wrong-problem.svg" width="390" alt="Runs with the right physics and one wrong input, one square each, grouped by tutorial: rejected without the task and with it."></a></td>
100
+ <td valign="top" align="center"><a href="https://github.com/courantdev/courant/blob/main/docs/media/scale.svg"><img src="https://raw.githubusercontent.com/courantdev/courant/main/docs/media/scale.svg" width="390" alt="Courant-10K on 1,827 real runs: each pre-registered hypothesis, its observed rate, its Wilson interval and its bar, including the one that was refuted."></a></td>
101
+ </tr>
102
+ <tr>
103
+ <td valign="top"><b>The right physics, the wrong problem.</b><br><sub>On 20 real runs that converged with one input wrong, the verdict without a specification rejected 8 of 20; against the task specification, 20 of 20.</sub></td>
104
+ <td valign="top"><b>At scale.</b><br><sub>On 1,827 real runs, with the task's specification, 0 of 609 faulted and 0 of 609 wrong-problem runs were accepted. Right runs rejected: 34 of 609, against a pre-registered bar of 2%; refuted, and published.</sub></td>
105
+ </tr>
106
+ </table>
107
+
108
+ ## Install
109
+
110
+ <!-- docs-skip: installs from the package index, which CI does not reach -->
111
+ ```bash
112
+ pip install 'courant-dev[mcp]' # Python 3.11 or later; the command is `courant`
113
+ ```
114
+
115
+ The distribution is named `courant-dev` (PyPI's `courant` is an unrelated project); the import
116
+ package and the commands are `courant` and `courant-mcp`.
117
+
118
+ A single-file binary for Linux and macOS, which needs no Python, is attached to every
119
+ [release](https://github.com/courantdev/courant/releases), with `SHA256SUMS` and its Ed25519
120
+ signature:
121
+
122
+ <!-- docs-skip: downloads the installer from GitHub, which CI does not reach -->
123
+ ```bash
124
+ curl -fsSL https://github.com/courantdev/courant/releases/latest/download/install.sh | sh
125
+ ```
126
+
127
+ The installer checks the binary's SHA-256 against the release's `SHA256SUMS`, and the signature
128
+ of `SHA256SUMS` against the release key it carries when python3 with the `cryptography` package
129
+ or OpenSSL 3 is on the machine. With neither, it says that only the checksum was checked and how
130
+ to check the signature by hand; `COURANT_REQUIRE_SIGNATURE=1` makes it refuse instead.
131
+ `courant update` installs nothing unless the signature verifies against the key built into the
132
+ binary.
133
+
134
+ ## Try it offline
135
+
136
+ These run on the real OpenFOAM runs that ship inside the package, with no network:
137
+
138
+ ```bash
139
+ courant demo # four real runs and an HTML report
140
+ courant verify --about # the error rates published for this version
141
+ ```
142
+
143
+ ## What a verdict looks like
144
+
145
+ `courant demo --keep DIR` writes the demo's runs to a folder you keep. One of them is the icoFoam
146
+ cavity with a timestep ten times too large:
147
+
148
+ ```bash
149
+ courant demo --keep ./demo
150
+ courant verify demo/icoFoam_cavity__cfl_blowup/icoFoam_cavity__cfl_blowup.log.gz --case-json demo/icoFoam_cavity__cfl_blowup/icoFoam_cavity__cfl_blowup.case.json # exit 2
151
+ ```
152
+
153
+ ```text
154
+ $ courant verify demo/icoFoam_cavity__cfl_blowup/icoFoam_cavity__cfl_blowup.log.gz --case-json demo/icoFoam_cavity__cfl_blowup/icoFoam_cavity__cfl_blowup.case.json
155
+ VERDICT reject (rule VER-5.3)
156
+ BASIS validity
157
+ GRADE C
158
+ RUN icoFoam_cavity::cfl_blowup · icoFoam
159
+
160
+ WHY
161
+ 1 cfl.max — Courant number exceeds stability limit: max Co=9.66 at t=0.15 exceeds limit 1.0; still 8.92 over the final fifth of the run
162
+ read icoFoam_cavity__cfl_blowup.log.gz (t = 0.15)
163
+ method checker cfl
164
+ value 9.66086 threshold 1.0
165
+ 2 convergence.residual — transient solve judged on stability rather than a residual threshold — Courant number settled at 8.92, above the stability limit of 1 — a transient solve that does not respect its timestep criterion is not converged, whatever the residuals say (final worst residual 3.61e-01)
166
+ read icoFoam_cavity__cfl_blowup.log.gz
167
+ method check convergence.residual (Residuals converged below tolerance)
168
+ value 0.361172 threshold —
169
+ 3 cfl.climbing — Courant number climbing on a fixed timestep: Co rose 0 -> 9.66; icoFoam has no adaptive timestep
170
+ read icoFoam_cavity__cfl_blowup.log.gz
171
+ method checker cfl
172
+ value 0.0 threshold 1.0
173
+
174
+ PROBABLE CAUSES
175
+ 1 NUM.CFL_VIOLATION — Courant number too high
176
+ 2 NUM.MISSING_ADJUSTABLE_DT — Fixed dt without adjustableRunTime
177
+
178
+ NOT CHECKED
179
+ - Solution fields were not read: no time directory with fields was found.
180
+ - Discretisation error was not quantified: a single mesh was supplied.
181
+ - Accuracy against a reference was not assessed: no reference data was supplied.
182
+ - Field values physically plausible: no internal fields
183
+ - Flow regime matches turbulence modeling: not implemented (Courant derives no length scale for a Reynolds number from the case)
184
+ - Near-wall y+ compatible with wall treatment: not implemented (Courant reads no y+, neither a yPlus field nor the yPlus function object's output)
185
+ - Net boundary mass flux ~ 0: no field flux data
186
+ - No specification given: conformance to the task was not assessed.
187
+
188
+ NEXT Suggested, not applied: Reduce deltaT in controlDict
189
+ ```
190
+
191
+ The solver exited normally on this run. The verdict says why it cannot be accepted, and what was
192
+ not checked. The exit code is the verdict's: `accept` 0, `reject` 2, `insufficient` 3, and 4 for
193
+ an input that cannot be read. `--json` prints the same verdict as canonical JSON
194
+ (`courant.verdict/2`), `--html` and `--report md` as a report, and `--pack` writes an evidence
195
+ pack that `--check-pack` re-derives from its inputs. `--spec` with `--spec-sha256` adds the task:
196
+ every value the specification names is checked against the case
197
+ ([Getting started](https://github.com/courantdev/courant/blob/main/docs/GETTING-STARTED.md),
198
+ section 2b).
199
+
200
+ ## The rule this repository keeps
201
+
202
+ Deterministic code decides every verdict, number and grade. A language model may draft prose,
203
+ and may extract a task specification that is shown, hashed and can only lower a verdict to
204
+ `insufficient`; nothing else, and nothing a model writes is in the verdict's path. Courant never
205
+ edits a case, never runs a solver, and its checks never use the network. A pull request that
206
+ lets a model, a threshold nobody recorded or the network into the verdict's path is not merged
207
+ ([CONTRIBUTING.md](https://github.com/courantdev/courant/blob/main/CONTRIBUTING.md)).
208
+
209
+ These tests in this repository hold the model-free, read-only, offline and reproducible parts of
210
+ it:
211
+
212
+ - `tests/unit/test_public_verdict_path.py`: no module the verdict is made of (the gate, the
213
+ checks it calls, and the commands and tools that read a run) imports a language-model client
214
+ or a network library, names a model provider's endpoint or starts a process (but for the
215
+ workers `--jobs` asks for), and importing all of it loads no model client. The lint reads the
216
+ code's syntax, and is first run on code that breaks each of its rules.
217
+ - `tests/unit/test_public_network.py`: `courant verify` on the demo runs, in each of its
218
+ outputs, opens no socket and starts no process; every visible command and every tool of the
219
+ MCP server runs on the demo data with network connections refused; and each command whose
220
+ purpose is a network call names its host first
221
+ ([NETWORK.md](https://github.com/courantdev/courant/blob/main/docs/NETWORK.md)).
222
+ - `tests/unit/test_mcp_tools.py` and `tests/unit/test_mcp_e2e.py`: the agent tools refuse a path
223
+ outside the directories named, change no file and open no network connection.
224
+ - `tests/unit/test_action.py`: the CI gate opens no network connection and writes only where it
225
+ is told.
226
+ - `tests/unit/test_preflight.py`, `tests/unit/test_live.py` and `tests/unit/test_audit.py`:
227
+ preflight, `watch` and the audit read a case and leave every byte of it as it was.
228
+ - `tests/unit/test_verify_pack.py`: an evidence pack is the same bytes when written twice, an
229
+ edit to a file the gate read changes that file's entry in the manifest, and `--check-pack`
230
+ re-verifies only the run under `--root`, as the root holds it: a pack whose manifest names a
231
+ file outside it, lists other files than its verdict read, leaves out the sidecar the root holds
232
+ for its log, judges a case directory by its log alone, or carries another specification than
233
+ the one `--spec-sha256` names, is refused.
234
+ - `tests/integration/test_docs_commands.py`: every `bash` block in this README and in Getting
235
+ started runs, offline, on the demo data, with the exit code it documents.
236
+
237
+ ## Use it from an agent
238
+
239
+ `courant mcp` serves the gate to any AI agent over MCP (stdio), read-only and confined to the
240
+ directories you name. Print the settings for your client:
241
+
242
+ ```bash
243
+ courant mcp --print-config --root ./runs
244
+ ```
245
+
246
+ For Claude Code that is one command:
247
+
248
+ <!-- docs-skip: needs the claude CLI, which CI does not have -->
249
+ ```bash
250
+ claude mcp add courant -- courant mcp --root ~/runs
251
+ ```
252
+
253
+ The server offers six read-only tools: `verify_run`, `score_agent_output`, `check_convergence`,
254
+ `explain_code`, `list_failure_modes` and `verifier_certification`. `score_agent_output` is
255
+ advice to the agent before it reports, not a certification: given the task specification and
256
+ whether the agent is about to report success, it returns the verdict and whether the run is a
257
+ *silent error* (it executed, the agent would report success, and the gate rejects it).
258
+
259
+ ## In CI: the GitHub Action
260
+
261
+ [`courant-gate`](https://github.com/courantdev/courant/tree/main/.github/actions/courant-gate)
262
+ verifies the runs a repository names, writes one summary row per run and one evidence pack per
263
+ run, and fails the check unless every run is accepted. Its logic is `courant gate`, which runs
264
+ the same way on any CI system.
265
+
266
+ ```yaml
267
+ - uses: courantdev/courant/.github/actions/courant-gate@v0.6.0
268
+ with:
269
+ paths: runs/*.log.gz
270
+ spec: task/spec.json
271
+ spec-sha256: ${{ vars.TASK_SPEC_SHA256 }}
272
+ ```
273
+
274
+ Without the Action, `courant verify --batch runs/ --junit courant.xml` writes one JUnit test per
275
+ run, which any CI system shows.
276
+
277
+ ## Commands
278
+
279
+ | Command | What it does |
280
+ |---|---|
281
+ | `courant verify <case or log>` | `accept`, `reject` or `insufficient` (exit 0, 2 or 3; `courant.verdict/2`), with the basis it was judged on and what was not checked. `--spec` with `--spec-sha256` checks every value a task specification names against the case. `--html`, `--report md`, `--json`, `--pack` and `--check-pack` (an evidence pack anyone can re-derive), `--batch` with `--junit`, `--record`, `--about` |
282
+ | `courant spec init / hash / check / lock / confirm / extract` | Draft a task specification from a reference case, lock it by hash, and check a case against it before or after its run |
283
+ | `courant gate` | The CI check, and the [GitHub Action](https://github.com/courantdev/courant/tree/main/.github/actions/courant-gate): verify the runs a repository names, one summary row per run, one evidence pack per run |
284
+ | `courant preflight <case>` | A broken setup, caught before the solver spends anything |
285
+ | `courant convergence <case>` | Where the monitored answer stopped changing, and the iterations, wall clock and core-hours after it |
286
+ | `courant watch <case>` | A read-only live advisory while the solver runs, with `--exit-on-fail` for job scripts |
287
+ | `courant audit <dir>` | What a folder of runs cost, and how much of it bought nothing |
288
+ | `courant test run --judge …` | The Courant Test: score any judge, including an AI model, on real OpenFOAM runs |
289
+ | `courant mcp` | The same tools for any AI agent over MCP, read-only and confined to the directories named; `score_agent_output` tells an agent, before it reports, whether its run is a silent error |
290
+ | `courant doctor`, `courant update`, `courant version` | Diagnostics and a support bundle you send yourself; a signed update of the binary |
291
+
292
+ Start with
293
+ [GETTING-STARTED.md](https://github.com/courantdev/courant/blob/main/docs/GETTING-STARTED.md).
294
+
295
+ ## Configuration and the network
296
+
297
+ Courant has no account, no telemetry and no service of its own, and needs no configuration to
298
+ verify a run. What it reads when it is there:
299
+
300
+ | Setting | What it does |
301
+ |---|---|
302
+ | `courant.toml` | For `courant gate` and `courant verify --batch`: `fail-on`, `pack-store`, `courant-version`, and `[[run]]` tables of `paths`, `outputs`, `spec` and `spec-sha256`. An unknown key is an error that names it |
303
+ | `COURANT_GATE_*` | Every `courant gate` option as an environment variable; the Action sets them from its inputs |
304
+ | `COURANT_CACHE_DIR` | Where `--batch` keeps its verdict cache (else `~/.cache/courant/verdicts`); off by default where `CI` is set |
305
+ | `COURANT_DEBUG=1` | Print the traceback of an internal error, as `--debug` does |
306
+ | `COURANT_REQUIRE_SIGNATURE=1` | The installer refuses a binary whose signature it cannot check |
307
+ | `OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY` | Used only by the commands whose purpose is a model call you name, and `courant doctor` says whether one is set; a paid model is refused unless `COURANT_ALLOW_PAID_LLM=1` is set. A key may also sit in a `.env` file; `COURANT_NO_DOTENV=1` ignores it |
308
+
309
+ A fixture repository's `courant.toml`, whose check fails on purpose:
310
+
311
+ ```toml
312
+ fail-on = "not-accept"
313
+ pack-store = "evidence"
314
+
315
+ [[run]]
316
+ paths = ["runs/*.log.gz"]
317
+ ```
318
+
319
+ The checks never use the network. A command contacts something only when that is its purpose
320
+ and you ran it, and it names the host first: `courant update` (github.com), `courant doctor
321
+ --models`, and a language model you name
322
+ ([NETWORK.md](https://github.com/courantdev/courant/blob/main/docs/NETWORK.md)).
323
+
324
+ ## From Python
325
+
326
+ ```python
327
+ from courant.verify import verify_path
328
+
329
+ v = verify_path("demo/icoFoam_cavity__cfl_blowup/icoFoam_cavity__cfl_blowup.log.gz",
330
+ "demo/icoFoam_cavity__cfl_blowup/icoFoam_cavity__cfl_blowup.case.json")
331
+ v.verdict, v.rule, v.reasons[0].code # ('reject', 'VER-5.3', 'cfl.max')
332
+ v.exit_code # 2
333
+ print(v.to_json()) # the canonical courant.verdict/2
334
+ ```
335
+
336
+ `verify_path` takes a case directory or a solver log, and `spec=` with `spec_locked_sha256=` for
337
+ the task.
338
+
339
+ ## Benchmarks
340
+
341
+ On OpenFOAM v2406, with every figure carrying its denominator (`courant verify --about` prints
342
+ the rates that ship with each version):
343
+
344
+ - **Detection:** 31 of 31 real runs judged correctly. 0 of 23 wrong results accepted and 0 of 8
345
+ good results rejected.
346
+ - **The wrong problem:** on 20 real runs with the right physics and a wrong input (inlet
347
+ doubled, viscosity tripled, gravity rotated, geometry scaled, end time cut), the verdict
348
+ without a specification rejected 8 of 20; against the task specification, 20 of 20.
349
+ - **Before the run:** preflight caught 8 of 23 broken setups, and flagged 0 of 8 good ones.
350
+ - **Fixed budgets:** where the answer settled, 1,023 of 1,999 iterations (51.2%, pitzDaily)
351
+ and 547 of 999 (54.8%, T3A) came after it.
352
+ - **Reproducible:** evidence packs re-derive byte for byte, 31 of 31.
353
+ - **Beside frontier models:** on the same 420 real runs, given the task's specification, Courant
354
+ accepted 0 of 264 wrong runs; Claude Opus 5.5 accepted 69 of 264, Claude Sonnet 5.5 76 of 263
355
+ and Claude Haiku 5.5 52 of 249. Courant rejected 10 of 140 right runs.
356
+ - **At scale:** on 1,827 real runs, 0 of 609 faulted and 0 of 609 wrong-problem runs were
357
+ accepted with the task's specification.
358
+
359
+ Every figure, its interval and its pre-registered bar, including the one that missed, are in
360
+ [RESULTS.md](https://github.com/courantdev/courant/blob/main/RESULTS.md).
361
+
362
+ "Certified" here means measured against a real solver, with the error rate published. It is not
363
+ a regulator's approval. The runs are tutorial-sized, with injected faults; no customer data.
364
+
365
+ ## Layout
366
+
367
+ ```text
368
+ courant/
369
+ verify/ the gate: ingest, checks, policy, the verdict, reports, evidence packs, batch
370
+ spec/ task specifications (courant.spec/1): draft, hash, lock, check against a case
371
+ gate/ courant gate, behind the GitHub Action
372
+ case/ an OpenFOAM case as the solver read it: dictionaries, mesh, regime
373
+ watcher/ the log parser: solver output to events
374
+ verification/ the physics checks and the grade
375
+ diagnosis/ findings and probable causes
376
+ converge/ where the answer stopped changing
377
+ live/ courant watch
378
+ record/ verified records (courant.record/1)
379
+ ctest/ the Courant Test and its judges
380
+ llm/ the model door: the one way to a language model, for the commands that call one
381
+ mcp/ the MCP server and its read-only tools
382
+ cli/ the courant command
383
+ data/ shipped with the package: the demo runs, the published error rates, the schemas
384
+ certification/ the real OpenFOAM v2406 runs the gate is measured on
385
+ tests/ unit, integration and robustness tests, all offline
386
+ packaging/ the single-file binary, the installer, the hashed release locks
387
+ .github/ the courant-gate Action and the CI and release workflows
388
+ docs/ Getting started, NETWORK.md, COVERAGE.md, and these figures (docs/media/)
389
+ ```
390
+
391
+ ## Development
392
+
393
+ <!-- docs-skip: builds a virtual environment -->
394
+ ```bash
395
+ python3.11 -m venv .venv && .venv/bin/pip install -e ".[dev,mcp]"
396
+ .venv/bin/python -m ruff check --select F,E9 courant tests
397
+ .venv/bin/python -m pytest -q # offline: no Docker, no network, no solver
398
+ ```
399
+
400
+ A change comes with a test that fails without it, and real solver output beats a synthetic log.
401
+ See [CONTRIBUTING.md](https://github.com/courantdev/courant/blob/main/CONTRIBUTING.md).
402
+
403
+ ## Security
404
+
405
+ Report a vulnerability privately, through GitHub's private vulnerability reporting on this
406
+ repository or by email to hello@courant.dev. A verdict a crafted input can turn to `accept`, a
407
+ command that reads outside the directories it was given or opens a connection that is not its
408
+ purpose, and a release whose signature check can be bypassed all count. See
409
+ [SECURITY.md](https://github.com/courantdev/courant/blob/main/SECURITY.md).
410
+
411
+ ## License
412
+
413
+ Licensed under the [Apache License 2.0](https://github.com/courantdev/courant/blob/main/LICENSE).
414
+
415
+ Copyright 2026 Shivanshu Dwivedi (Courant, https://courant.dev)