RumleyRum commited on
Commit
b38450d
·
verified ·
1 Parent(s): 50521b3

Upload 23 files

Browse files
Files changed (5) hide show
  1. .gitignore +141 -0
  2. CONTRIBUTING.md +31 -0
  3. README.md +26 -31
  4. app.py +0 -0
  5. requirements.txt +5 -1
.gitignore ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # with no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # pytype static type analyzer
132
+ .pytype/
133
+
134
+ # Cython debug symbols
135
+ cython_debug/
136
+
137
+ # VS Code
138
+ .vscode/
139
+
140
+ # Project specific
141
+ roots.sst
CONTRIBUTING.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing
2
+
3
+ This repository is a reference implementation intended to remain small, deterministic, and auditable.
4
+
5
+ ## Bug Reports
6
+
7
+ - Include the exact command you ran and the full stdout/stderr.
8
+ - Include your Python version (`python --version`) and OS.
9
+ - If determinism breaks, include the differing hashes and inputs.
10
+
11
+ ## Development
12
+
13
+ Run checks:
14
+
15
+ ```bash
16
+ python -m compileall -q .
17
+ python test_suite.py
18
+ ```
19
+
20
+ Optional GUI:
21
+
22
+ ```bash
23
+ python -m pip install -r requirements-gui.txt
24
+ streamlit run demo_gui_dev.py
25
+ ```
26
+
27
+ ## Pull Requests
28
+
29
+ - Keep changes minimal and focused.
30
+ - Avoid adding new dependencies unless necessary.
31
+ - Preserve deterministic behavior: no ambient randomness, no hidden state, no time-based logic.
README.md CHANGED
@@ -1,19 +1,3 @@
1
-
2
- ---
3
- title: Deterministic Governance Demo
4
- emoji: 🔬
5
- colorFrom: green
6
- colorTo: blue
7
- sdk: streamlit
8
- sdk_version: 1.32.0
9
- app_file: app.py
10
- pinned: false
11
- license: mit
12
- ---
13
-
14
-
15
-
16
-
17
  # Deterministic Governance Mechanism
18
 
19
  Probabilistic systems cannot be audited. If a decision changes between runs with identical inputs, the reasoning chain is non-reproducible, and post-hoc explanation is speculation.
@@ -64,6 +48,32 @@ The system implements:
64
 
65
  All arithmetic is in code. No learned parameters. No hidden state.
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
  ## What This Is
69
 
@@ -137,18 +147,3 @@ See [LICENSE](LICENSE) for full terms.
137
  **Try to break the invariant. If you do, file an issue.**
138
 
139
  *An invitation to treat inference as mechanics rather than chance.*
140
-
141
- # Deterministic Exclusion Demo
142
-
143
- Material-Field Engine with LLM Guardrails
144
-
145
- ## Features
146
- - Real-time deterministic governance visualization
147
- - Multi-provider LLM testing (OpenAI, Anthropic, Ollama)
148
- - Interactive physics parameter tuning
149
- - Complete audit trail with cryptographic hashes
150
-
151
- ## Usage
152
- The Space will launch automatically. Configure parameters in the sidebar and run tests.
153
-
154
- For API testing (Tab 3), you'll need to provide your own API keys for commercial providers.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Deterministic Governance Mechanism
2
 
3
  Probabilistic systems cannot be audited. If a decision changes between runs with identical inputs, the reasoning chain is non-reproducible, and post-hoc explanation is speculation.
 
48
 
49
  All arithmetic is in code. No learned parameters. No hidden state.
50
 
51
+ ## Quick Start
52
+
53
+ ```bash
54
+ git clone https://github.com/Rymley/Deterministic-Governance-Mechanism
55
+ cd Deterministic-Governance-Mechanism
56
+ pip install -r requirements.txt
57
+ python exclusion_demo.py
58
+ ```
59
+
60
+ **Prove determinism:**
61
+ ```bash
62
+ python exclusion_demo.py replay
63
+ # Runs 5 times - prints identical SHA-256 hashes
64
+ ```
65
+
66
+ **Compare modes:**
67
+ ```bash
68
+ python exclusion_demo.py compare
69
+ # Shows behavioral differences across elastic modulus modes
70
+ ```
71
+
72
+ **Run full test suite:**
73
+ ```bash
74
+ python test_suite.py
75
+ # 14 mechanical tests verifying invariants
76
+ ```
77
 
78
  ## What This Is
79
 
 
147
  **Try to break the invariant. If you do, file an issue.**
148
 
149
  *An invitation to treat inference as mechanics rather than chance.*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
The diff for this file is too large to render. See raw diff
 
requirements.txt CHANGED
@@ -1 +1,5 @@
1
- # No runtime dependencies (stdlib only).
 
 
 
 
 
1
+ streamlit>=1.30.0
2
+ plotly>=5.18.0
3
+ pandas>=2.0.0
4
+ requests>=2.31.0
5
+ numpy>=1.24.0