burnmydays Claude Opus 4.6 commited on
Commit
a8c7a60
·
1 Parent(s): 38e6bef

Archive harness v1, update docs for v0.04 paper and harness v2

Browse files

- Move old harness to archive/harness-v1/
- Update README.md with v2 architecture, new DOI (10.5281/zenodo.18792459)
- Update CITATION.cff for v0.04
- Update REPRODUCIBILITY.md for 53-test v2 suite
- Update requirements.txt (gradio + matplotlib only)
- Update .gitignore to exclude binaries and v2 working directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (36) hide show
  1. .gitignore +8 -0
  2. CITATION.cff +10 -5
  3. README.md +85 -35
  4. REPRODUCIBILITY.md +75 -34
  5. README_BACKUP.md → archive/README_BACKUP.md +0 -0
  6. app.py → archive/app-v1.py +0 -0
  7. {harness → archive/harness-v1}/EXP.md +0 -0
  8. {harness → archive/harness-v1}/Harnesstest.ini +0 -0
  9. {harness → archive/harness-v1}/README.md +0 -0
  10. {harness → archive/harness-v1}/analyze.py +0 -0
  11. {harness → archive/harness-v1}/compare_enforcement.py +0 -0
  12. {harness → archive/harness-v1}/environment.yml +0 -0
  13. {harness → archive/harness-v1}/outputs/.gitkeep +0 -0
  14. archive/harness-v1/outputs/compression_receipt.json +25 -0
  15. archive/harness-v1/outputs/enforcement_comparison.json +322 -0
  16. archive/harness-v1/outputs/experiment_results.json +159 -0
  17. archive/harness-v1/outputs/recursion_receipt.json +21 -0
  18. {harness → archive/harness-v1}/pyproject.toml +0 -0
  19. {harness → archive/harness-v1}/pytest.ini +0 -0
  20. {harness → archive/harness-v1}/quick_demo.py +0 -0
  21. {harness → archive/harness-v1}/requirements.txt +0 -0
  22. {harness → archive/harness-v1}/run_experiments.py +0 -0
  23. {harness → archive/harness-v1}/src/__init__.py +0 -0
  24. {harness → archive/harness-v1}/src/advanced_extractor.py +0 -0
  25. {harness → archive/harness-v1}/src/config.py +0 -0
  26. {harness → archive/harness-v1}/src/deterministic_pipeline.py +0 -0
  27. {harness → archive/harness-v1}/src/extraction.py +0 -0
  28. {harness → archive/harness-v1}/src/harness.py +0 -0
  29. {harness → archive/harness-v1}/src/metrics.py +0 -0
  30. {harness → archive/harness-v1}/src/plotting.py +0 -0
  31. {harness → archive/harness-v1}/src/samples.py +0 -0
  32. {harness → archive/harness-v1}/src/test_harness.py +0 -0
  33. {harness → archive/harness-v1}/tests/test_full_harness.py +0 -0
  34. {harness → archive/harness-v1}/tests/test_harness.py +0 -0
  35. import React, { useState } from 'react';.js → archive/import React, { useState } from 'react';.js +0 -0
  36. requirements.txt +15 -6
.gitignore CHANGED
@@ -41,3 +41,11 @@ harness/outputs/*.json
41
 
42
  # PDFs (for HuggingFace - use releases instead)
43
  *.pdf
 
 
 
 
 
 
 
 
 
41
 
42
  # PDFs (for HuggingFace - use releases instead)
43
  *.pdf
44
+
45
+ # Binary images (HF rejects binary files — use Xet or keep local)
46
+ *.png
47
+ *.jpg
48
+ *.jpeg
49
+
50
+ # v2 working directories (source copy, not deployed)
51
+ commitment-harness-v2/
CITATION.cff CHANGED
@@ -2,14 +2,16 @@ cff-version: 1.2.0
2
  message: "If you use this software or research, please cite it as below."
3
  type: software
4
  title: "A Conservation Law for Commitment in Language Under Transformative Compression and Recursive Application"
5
- version: "v0.2"
6
- doi: 10.5281/zenodo.18271102
7
- date-released: 2026-01-16
8
- url: "https://doi.org/10.5281/zenodo.18271102"
9
  repository-code: "https://github.com/SunrisesIllNeverSee/commitment-conservation"
10
  authors:
11
  - family-names: "McHenry"
12
  given-names: "Deric J."
 
 
13
  keywords:
14
  - information-theory
15
  - llm
@@ -18,5 +20,8 @@ keywords:
18
  - computational-linguistics
19
  - commitment-conservation
20
  - language-models
 
 
 
21
  license: CC-BY-4.0
22
- abstract: "This work proposes a conservation law for commitment in language under transformative compression and recursive application. We define commitment as the minimal, identity-preserving content that remains invariant under loss-inducing transformations, and demonstrate that commitment content must be conserved or the signal collapses."
 
2
  message: "If you use this software or research, please cite it as below."
3
  type: software
4
  title: "A Conservation Law for Commitment in Language Under Transformative Compression and Recursive Application"
5
+ version: "v0.04"
6
+ doi: 10.5281/zenodo.18792459
7
+ date-released: 2026-02-26
8
+ url: "https://doi.org/10.5281/zenodo.18792459"
9
  repository-code: "https://github.com/SunrisesIllNeverSee/commitment-conservation"
10
  authors:
11
  - family-names: "McHenry"
12
  given-names: "Deric J."
13
+ affiliation: "Ello Cello LLC"
14
+ email: "burnmyday@proton.me"
15
  keywords:
16
  - information-theory
17
  - llm
 
20
  - computational-linguistics
21
  - commitment-conservation
22
  - language-models
23
+ - falsification
24
+ - conservation-law
25
+ - semantic-preservation
26
  license: CC-BY-4.0
27
+ abstract: "This work proposes a conservation law for commitment in language under transformative compression and recursive application. We define commitment as the minimal, identity-preserving content that remains invariant under loss-inducing transformations, and demonstrate that commitment content is conserved under such compression while non-committal information collapses. Preliminary tests using a prototype harness on a limited corpus demonstrate patterns consistent with these predictions; we invite large-scale adversarial replication to validate or falsify the framework."
README.md CHANGED
@@ -13,38 +13,41 @@ tags:
13
  - summarization
14
  - semantic-preservation
15
  - commitment-conservation
16
- - transformers
17
- - llm
18
  ---
19
 
20
- # Commitment Conservation Harness
21
 
22
- **Open evaluation framework for testing the conservation law proposed in the preprint.**
23
 
24
- 📄 **Paper**: [A Conservation Law for Commitment in Language Under Transformative Compression (v0.03)](https://doi.org/10.5281/zenodo.18274930)
25
- 🏗️ **Zenodo Record**: https://zenodo.org/records/18274930
 
 
26
  💻 **GitHub**: https://github.com/SunrisesIllNeverSee/commitment-conservation
27
 
28
  ---
29
 
30
  ## Quick Start
31
 
32
- Run the harness locally:
33
-
34
  ```bash
35
  # Clone and install
36
  git clone https://huggingface.co/burnmydays/commitment_conservation_harness
37
- cd commitment_conservation_harness/harness
38
  pip install -r requirements.txt
39
 
40
- # Run baseline experiments
41
- python run_experiments.py
 
42
 
43
- # Run baseline vs enforced comparison
44
- python compare_enforcement.py
45
- ```
46
 
47
- Results saved to `harness/outputs/` as JSON files showing baseline vs enforced stability.
 
 
 
48
 
49
  ---
50
 
@@ -56,8 +59,6 @@ This repository accompanies a preprint introducing a conservation law for commit
56
 
57
  We propose a falsifiability framework based on compression-driven stress tests and lineage-aware evaluation, distinguishing semantic preservation from mere token retention. The framework is model-agnostic and applies to both human and machine-generated language.
58
 
59
- This repository serves as a public, timestamped disclosure of the theoretical law, evaluation criteria, and architectural relationships. Implementation mechanisms are intentionally out of scope.
60
-
61
  ---
62
 
63
  ## Core Claims
@@ -68,33 +69,81 @@ This repository serves as a public, timestamped disclosure of the theoretical la
68
 
69
  ---
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  ## Empirical Results
72
 
73
- We tested standard transformer-based compression (baseline) versus commitment-enforced compression on 5 signals over 10 recursive iterations:
74
 
75
- | Metric | Baseline | Enforced | Improvement |
76
- |--------|----------|----------|-------------|
77
- | **Recursion Stability** | 20.0% | 60.0% | **+40 pp** |
78
- | **Compression Fidelity** | 63.8% | 78.9% | **+15 pp** |
79
 
80
- **Key Finding:** Simple commitment enforcement (extracting obligations before compression and re-appending if lost) triples stability from 20% to 60%. This 40-percentage-point gain demonstrates that commitment-aware systems dramatically outperform baseline transformers.
 
 
 
 
81
 
82
- **Baseline Results:** Only 1 of 5 signals (20%) maintained commitment integrity under standard recursive summarization. Four signals exhibited complete drift after a single transformation cycle.
83
 
84
- **Enforcement Results:** With commitment preservation, 3 of 5 signals (60%) maintained full integrity through 10 iterations. This validates that tracking deontic force prevents catastrophic loss.
 
 
 
 
 
 
 
 
 
 
 
85
 
86
- **Full experimental data:**
87
- - Baseline: `harness/outputs/experiment_results.json`
88
- - Comparison: `harness/outputs/enforcement_comparison.json`
89
 
90
- **Interpretation:** These results empirically validate the paper's core thesis. Probabilistic transformations without commitment enforcement exhibit significant drift (Corollary 3.3). The 40pp improvement demonstrates the value of conservation-aware architectures.
 
 
 
 
 
91
 
92
  ---
93
 
94
  ## Resources
95
 
96
- - **Zenodo (DOI, all versions):** <https://doi.org/10.5281/zenodo.18267278>
97
- - **Zenodo (current version):** <https://doi.org/10.5281/zenodo.18271102>
98
  - **GitHub Repository:** <https://github.com/SunrisesIllNeverSee/commitment-conservation>
99
 
100
  ---
@@ -111,17 +160,18 @@ Core implementation details related to production deployment, enforcement, and s
111
 
112
  ## Attribution & Contact
113
 
114
- **Author:** Deric J. McHenry
115
- **Copyright:** © 2026 Ello Cello LLC. All rights reserved.
116
  **Affiliation:** Ello Cello LLC
 
117
 
118
  For academic or research correspondence, please reference the Zenodo DOI above.
119
 
120
  ---
121
 
122
- ## ⚖️ Intellectual Property Notice
123
 
124
- **MO§ES™** (Modus Operandi §ignal Scaling Expansion System) is a trademark of Ello Cello LLC.
125
 
126
  All systems, methods, and written material contained herein are protected under applicable copyright law and are part of one or more provisional patent applications filed with the United States Patent and Trademark Office (USPTO).
127
 
 
13
  - summarization
14
  - semantic-preservation
15
  - commitment-conservation
16
+ - falsification
17
+ - conservation-law
18
  ---
19
 
20
+ # Commitment Conservation Harness v2.0
21
 
22
+ **Falsification instrument for the commitment conservation law.**
23
 
24
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18792459.svg)](https://doi.org/10.5281/zenodo.18792459)
25
+
26
+ 📄 **Paper**: [A Conservation Law for Commitment in Language Under Transformative Compression (v0.04)](https://doi.org/10.5281/zenodo.18792459)
27
+ 🏗️ **Zenodo Record**: https://zenodo.org/records/18792459
28
  💻 **GitHub**: https://github.com/SunrisesIllNeverSee/commitment-conservation
29
 
30
  ---
31
 
32
  ## Quick Start
33
 
 
 
34
  ```bash
35
  # Clone and install
36
  git clone https://huggingface.co/burnmydays/commitment_conservation_harness
37
+ cd commitment_conservation_harness
38
  pip install -r requirements.txt
39
 
40
+ # Run the interactive demo
41
+ python app.py
42
+ # Opens at http://localhost:7860
43
 
44
+ # Run the full falsification protocol (CLI)
45
+ python -m src.runner --backend lossy --depth 10
 
46
 
47
+ # Run tests (53 tests, <1 second)
48
+ pip install pytest
49
+ python -m pytest tests/ -v
50
+ ```
51
 
52
  ---
53
 
 
59
 
60
  We propose a falsifiability framework based on compression-driven stress tests and lineage-aware evaluation, distinguishing semantic preservation from mere token retention. The framework is model-agnostic and applies to both human and machine-generated language.
61
 
 
 
62
  ---
63
 
64
  ## Core Claims
 
69
 
70
  ---
71
 
72
+ ## Harness v2.0 Architecture
73
+
74
+ ```
75
+ app.py <- Gradio interactive demo
76
+ src/
77
+ extraction.py <- Modal-pattern sieve (Definition 2.4, Figure 4)
78
+ fidelity.py <- Min-aggregated scoring: F = min(Jaccard, Cosine, NLI proxy)
79
+ compression.py <- Pluggable backends (extractive, BART, back-translation)
80
+ lossy.py <- Deterministic LLM drift simulator (pure Python, no model)
81
+ enforcement.py <- Reject-and-retry commitment gate (Module 3)
82
+ lineage.py <- SHA-256 provenance chains (Module 2)
83
+ runner.py <- Falsification protocol orchestrator (Section 7)
84
+ corpus/
85
+ canonical_corpus.json <- 25 pinned signals across 5 categories
86
+ tests/
87
+ test_harness.py <- 53 tests covering all modules
88
+ ```
89
+
90
+ ### Key improvements over v1
91
+
92
+ | Issue | v1 | v2 |
93
+ |---|---|---|
94
+ | Extractors | 3 incompatible implementations | 1 modal-pattern sieve |
95
+ | Enforcement | String concatenation (stripped next cycle) | Reject-and-retry gate with re-injection |
96
+ | Fidelity | Jaccard only | min(Jaccard, Cosine, NLI proxy) |
97
+ | Lineage | None | SHA-256 provenance chains |
98
+ | Collapse detection | None | Cross-signal attractor check |
99
+ | False positives | "will", "have" match as commitments | Blocked by pattern design |
100
+ | Demo backend | BART (2GB model download) | Lossy simulator (pure Python, zero deps) |
101
+ | Backend pairing | Same backend for both runs | Auto-pairs lossy with lossy_enforced |
102
+
103
+ ---
104
+
105
  ## Empirical Results
106
 
107
+ ### Paper results (Section 7)
108
 
109
+ Compression + lineage enforcement vs. probabilistic baseline on 175 signals (100 sentences, 50 code snippets, 25 proofs) over 10 recursive iterations:
 
 
 
110
 
111
+ | Metric | Compression + Lineage | Probabilistic |
112
+ |--------|----------------------|--------------|
113
+ | **Commitment Stability (n=10)** | 0.94 ± 0.03 | 0.42 ± 0.12 |
114
+ | **Identity Preservation** | 92% | 38% |
115
+ | **Drift Rate (per iteration)** | 0.006 | 0.058 |
116
 
117
+ ### Harness v2 results (lossy backend, drift=0.4, depth=10)
118
 
119
+ 25-signal canonical corpus across 5 categories:
120
+
121
+ | | Baseline | Enforced | Gap |
122
+ |---|---|---|---|
123
+ | **Avg Final Fidelity** | 0.000 | 0.479 | **+47.9pp** |
124
+ | **Contract (payment + penalty)** | 0.000 | 1.000 | **+100.0pp** |
125
+ | **Security (encrypt + prohibit)** | 0.000 | 0.500 | **+50.0pp** |
126
+
127
+ Baseline → 0.0 (commitments destroyed, text becomes "Pretty straightforward. Nothing too complicated here.")
128
+ Enforced → holds (modal-bearing sentences survive compression).
129
+
130
+ ---
131
 
132
+ ## Version History
 
 
133
 
134
+ | Version | Label | Date | DOI |
135
+ |---------|-------|------|-----|
136
+ | V.1-preprint | Law Disclosure | Jan 12, 2026 | [10.5281/zenodo.18267279](https://doi.org/10.5281/zenodo.18267279) |
137
+ | V.02 | Preprint | Jan 16, 2026 | [10.5281/zenodo.18271102](https://doi.org/10.5281/zenodo.18271102) |
138
+ | V.03 | Falsifiability Testing | Jan 16, 2026 | [10.5281/zenodo.18274930](https://doi.org/10.5281/zenodo.18274930) |
139
+ | V.04 | Technical Structure Depth | Feb 26, 2026 | [10.5281/zenodo.18792459](https://doi.org/10.5281/zenodo.18792459) |
140
 
141
  ---
142
 
143
  ## Resources
144
 
145
+ - **Zenodo (DOI, all versions):** <https://doi.org/10.5281/zenodo.18267278>
146
+ - **Zenodo (current version — v0.04):** <https://doi.org/10.5281/zenodo.18792459>
147
  - **GitHub Repository:** <https://github.com/SunrisesIllNeverSee/commitment-conservation>
148
 
149
  ---
 
160
 
161
  ## Attribution & Contact
162
 
163
+ **Author:** Deric J. McHenry
164
+ **Copyright:** © 2026 Ello Cello LLC. All rights reserved.
165
  **Affiliation:** Ello Cello LLC
166
+ **Contact:** burnmyday@proton.me
167
 
168
  For academic or research correspondence, please reference the Zenodo DOI above.
169
 
170
  ---
171
 
172
+ ## Intellectual Property Notice
173
 
174
+ **MO§ES™** (Minimal Orthogonal Subset to Essential Structure) is a trademark of Ello Cello LLC.
175
 
176
  All systems, methods, and written material contained herein are protected under applicable copyright law and are part of one or more provisional patent applications filed with the United States Patent and Trademark Office (USPTO).
177
 
REPRODUCIBILITY.md CHANGED
@@ -1,69 +1,110 @@
1
  # Reproducibility Receipt
2
 
3
- **Zenodo (concept DOI):** `https://doi.org/10.5281/zenodo.18267278`
 
 
 
4
 
5
- **Date**: January 16, 2026
6
- **Status**: Harness Confirmed Operational
7
 
8
  ## Test Execution
9
 
10
- All 13 tests passing in test suite:
11
 
12
  ```bash
13
- cd harness
14
- MPLBACKEND=Agg python -m pytest tests/test_full_harness.py -q
15
  ```
16
 
17
- **Result**: `13 passed, 17 warnings in 21.09s`
18
 
19
  ### Test Coverage
20
 
21
- Commitment extraction (empty/nonempty signals)
22
- Jaccard index (perfect match / zero overlap)
23
- ✅ Intersection-based commitment computation
24
- Compression sweep (Prediction 1: σ-invariance)
25
- Recursion drift (Prediction 2: Δ_hard accumulation)
26
- Canonical corpus loading
27
- Transformation pipeline application
28
- ✅ Complex signal processing
29
-
30
- ## Key Fixes Applied
31
-
32
- 1. **Blocking issue**: Replaced `plt.show()` `plt.close()` in plotting functions
33
- 2. **Test errors**: Fixed duplicate function names, removed invalid parameters
34
- 3. **File paths**: Corrected corpus path from `data/` → `corpus/`
35
- 4. **Type checking**: Configured `.vscode/settings.json` to disable strict Pylance checks for research code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  ## Environment
38
 
39
- - **Python**: 3.9.6 (virtual environment at `.venv/`)
40
- - **Key dependencies**: transformers, spacy, matplotlib, pytest
 
41
  - **Matplotlib backend**: Agg (non-GUI, CI-friendly)
42
 
43
  ## Running Tests
44
 
45
- ### Quick run (recommended):
 
46
  ```bash
47
- MPLBACKEND=Agg pytest tests/test_full_harness.py -q
48
  ```
49
 
50
  ### Verbose output:
 
51
  ```bash
52
- MPLBACKEND=Agg pytest tests/test_full_harness.py -v
53
  ```
54
 
55
- ### With minimal warnings:
 
 
 
 
 
 
 
56
  ```bash
57
- MPLBACKEND=Agg pytest tests/test_full_harness.py -q --disable-warnings
 
58
  ```
59
 
60
  ## Notes
61
 
62
- - Tests complete in ~20 seconds (model loading + transformations)
63
- - Plots saved to PNG files, no GUI interaction required
64
- - Warnings from dependencies (urllib3, matplotlib) are non-critical
65
- - Type checking disabled for research flexibility
66
 
67
  ---
68
 
69
- **Harness is research-ready for experimental evaluation.**
 
1
  # Reproducibility Receipt
2
 
3
+ **Paper:** A Conservation Law for Commitment in Language Under Transformative Compression and Recursive Application
4
+ **Version:** V.04 — Technical Structure Depth
5
+ **DOI:** [10.5281/zenodo.18792459](https://doi.org/10.5281/zenodo.18792459)
6
+ **Concept DOI (all versions):** [10.5281/zenodo.18267278](https://doi.org/10.5281/zenodo.18267278)
7
 
8
+ **Date**: March 6, 2026
9
+ **Status**: Harness v2.0 Confirmed Operational
10
 
11
  ## Test Execution
12
 
13
+ All 53 tests passing in test suite:
14
 
15
  ```bash
16
+ python -m pytest tests/test_harness.py -v
 
17
  ```
18
 
19
+ **Result**: `53 passed in 0.07s`
20
 
21
  ### Test Coverage
22
 
23
+ **Extraction (modal-pattern sieve):**
24
+ - Sentence segmentation (single, multiple, semicolons, empty)
25
+ - Classification (obligations, prohibitions, constraints)
26
+ - False positive rejection ("will", "have", soft modals)
27
+ - "must not" correctly classified as prohibition (v1 regression)
28
+ - Conditional detection
29
+ - Backward compatibility interface
30
+
31
+ **Fidelity (min-aggregated scoring):**
32
+ - Jaccard (perfect, zero, partial overlap, empty sets)
33
+ - Cosine TF-IDF (identical, paraphrased, unrelated)
34
+ - NLI proxy (modal preserved vs. destroyed)
35
+ - Min-aggregation binding
36
+
37
+ **Compression:**
38
+ - Extractive backend (compression, modal priority, passthrough)
39
+
40
+ **Enforcement:**
41
+ - Commitment gate (pass when preserved)
42
+ - Baseline (no gate)
43
+
44
+ **Lineage:**
45
+ - Hash determinism
46
+ - Commitment set hash (order-independent)
47
+ - Chain integrity validation
48
+ - Chain break detection
49
+ - JSON serialization
50
+
51
+ **Corpus:**
52
+ - 25 signals load correctly
53
+ - 5 categories present (contractual, technical, regulatory, procedural, composite)
54
+ - All signals contain extractable commitments
55
+
56
+ **Integration:**
57
+ - Single signal full protocol
58
+ - Enforcement >= baseline validation
59
+
60
+ **Regressions (v1 bugs):**
61
+ - "will" false positive blocked
62
+ - "have" false positive blocked
63
+ - Soft modals rejected
64
+ - "must not" is prohibition
65
+ - Fidelity uses multiple metrics
66
 
67
  ## Environment
68
 
69
+ - **Python**: 3.11+
70
+ - **Dependencies**: gradio, matplotlib (demo only); core harness is stdlib-only
71
+ - **Lossy backend**: Pure Python, zero external dependencies, deterministic
72
  - **Matplotlib backend**: Agg (non-GUI, CI-friendly)
73
 
74
  ## Running Tests
75
 
76
+ ### Quick run:
77
+
78
  ```bash
79
+ python -m pytest tests/test_harness.py -q
80
  ```
81
 
82
  ### Verbose output:
83
+
84
  ```bash
85
+ python -m pytest tests/test_harness.py -v
86
  ```
87
 
88
+ ### Full falsification protocol (CLI):
89
+
90
+ ```bash
91
+ python -m src.runner --backend lossy --depth 10
92
+ ```
93
+
94
+ ### Interactive demo:
95
+
96
  ```bash
97
+ python app.py
98
+ # Opens at http://localhost:7860
99
  ```
100
 
101
  ## Notes
102
 
103
+ - Tests complete in <1 second (no model loading required)
104
+ - Lossy backend is deterministic: same input -> same output -> same lineage chain
105
+ - Harness requires only `gradio` and `matplotlib` for the demo; core pipeline is stdlib-only
106
+ - Previous harness (v1) archived at `archive/harness-v1/`
107
 
108
  ---
109
 
110
+ **Harness v2.0 is research-ready for experimental evaluation and adversarial replication.**
README_BACKUP.md → archive/README_BACKUP.md RENAMED
File without changes
app.py → archive/app-v1.py RENAMED
File without changes
{harness → archive/harness-v1}/EXP.md RENAMED
File without changes
{harness → archive/harness-v1}/Harnesstest.ini RENAMED
File without changes
{harness → archive/harness-v1}/README.md RENAMED
File without changes
{harness → archive/harness-v1}/analyze.py RENAMED
File without changes
{harness → archive/harness-v1}/compare_enforcement.py RENAMED
File without changes
{harness → archive/harness-v1}/environment.yml RENAMED
File without changes
{harness → archive/harness-v1}/outputs/.gitkeep RENAMED
File without changes
archive/harness-v1/outputs/compression_receipt.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "timestamp_utc": "2026-01-16T20:41:21Z",
3
+ "command": "compression",
4
+ "python": {
5
+ "mpl_backend": "Agg"
6
+ },
7
+ "input_signal": "You must pay .",
8
+ "n": 6,
9
+ "sigma_values": [
10
+ 120,
11
+ 80,
12
+ 40,
13
+ 20,
14
+ 10,
15
+ 5
16
+ ],
17
+ "fidelities": [
18
+ 0.0,
19
+ 0.0,
20
+ 0.0,
21
+ 0.0,
22
+ 0.0,
23
+ 0.0
24
+ ]
25
+ }
archive/harness-v1/outputs/enforcement_comparison.json ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "summary": {
3
+ "n_signals": 5,
4
+ "recursion_depth": 10,
5
+ "baseline": {
6
+ "avg_stability": 0.4,
7
+ "avg_fidelity": 0.4
8
+ },
9
+ "enforced": {
10
+ "avg_stability": 0.6,
11
+ "avg_fidelity": 0.4958333333333333
12
+ },
13
+ "improvements": {
14
+ "stability_gain_pp": 19.999999999999996,
15
+ "fidelity_gain_pp": 9.583333333333327
16
+ }
17
+ },
18
+ "detailed_results": {
19
+ "baseline": {
20
+ "recursion": [
21
+ {
22
+ "signal": "Users must change passwords every 90 days.",
23
+ "deltas": [
24
+ 0.0,
25
+ 0.0,
26
+ 0.0,
27
+ 0.0,
28
+ 0.0,
29
+ 0.0,
30
+ 0.0,
31
+ 0.0,
32
+ 0.0,
33
+ 0.0,
34
+ 0.0
35
+ ],
36
+ "final_stability": 1.0
37
+ },
38
+ {
39
+ "signal": "The contract terminates after 12 months.",
40
+ "deltas": [
41
+ 0.0,
42
+ 0.0,
43
+ 0.0,
44
+ 0.0,
45
+ 0.0,
46
+ 0.0,
47
+ 0.0,
48
+ 0.0,
49
+ 0.0,
50
+ 0.0,
51
+ 0.0
52
+ ],
53
+ "final_stability": 1.0
54
+ },
55
+ {
56
+ "signal": "Files must not exceed 10MB in size.",
57
+ "deltas": [
58
+ 0.0,
59
+ 1.0,
60
+ 1.0,
61
+ 1.0,
62
+ 1.0,
63
+ 1.0,
64
+ 1.0,
65
+ 1.0,
66
+ 1.0,
67
+ 1.0,
68
+ 1.0
69
+ ],
70
+ "final_stability": 0.0
71
+ },
72
+ {
73
+ "signal": "Employees shall work 40 hours per week.",
74
+ "deltas": [
75
+ 0.0,
76
+ 1.0,
77
+ 1.0,
78
+ 1.0,
79
+ 1.0,
80
+ 1.0,
81
+ 1.0,
82
+ 1.0,
83
+ 1.0,
84
+ 1.0,
85
+ 1.0
86
+ ],
87
+ "final_stability": 0.0
88
+ },
89
+ {
90
+ "signal": "Temperature must remain below 25 degrees Celsius.",
91
+ "deltas": [
92
+ 0.0,
93
+ 1.0,
94
+ 1.0,
95
+ 1.0,
96
+ 1.0,
97
+ 1.0,
98
+ 1.0,
99
+ 1.0,
100
+ 1.0,
101
+ 1.0,
102
+ 1.0
103
+ ],
104
+ "final_stability": 0.0
105
+ }
106
+ ],
107
+ "compression": [
108
+ {
109
+ "signal": "Users must change passwords every 90 days.",
110
+ "avg_fidelity": 0.5238095238095238,
111
+ "fidelities": [
112
+ 0.5,
113
+ 0.5,
114
+ 0.5,
115
+ 0.5,
116
+ 1.0,
117
+ 0.14285714285714285
118
+ ]
119
+ },
120
+ {
121
+ "signal": "The contract terminates after 12 months.",
122
+ "avg_fidelity": 0.0,
123
+ "fidelities": [
124
+ 0.0,
125
+ 0.0,
126
+ 0.0,
127
+ 0.0,
128
+ 0.0,
129
+ 0.0
130
+ ]
131
+ },
132
+ {
133
+ "signal": "Files must not exceed 10MB in size.",
134
+ "avg_fidelity": 0.42857142857142855,
135
+ "fidelities": [
136
+ 0.5,
137
+ 0.5,
138
+ 0.5,
139
+ 0.5,
140
+ 0.42857142857142855,
141
+ 0.14285714285714285
142
+ ]
143
+ },
144
+ {
145
+ "signal": "Employees shall work 40 hours per week.",
146
+ "avg_fidelity": 0.5238095238095238,
147
+ "fidelities": [
148
+ 0.5,
149
+ 0.5,
150
+ 0.5,
151
+ 0.5,
152
+ 1.0,
153
+ 0.14285714285714285
154
+ ]
155
+ },
156
+ {
157
+ "signal": "Temperature must remain below 25 degrees Celsius.",
158
+ "avg_fidelity": 0.5238095238095238,
159
+ "fidelities": [
160
+ 0.5,
161
+ 0.5,
162
+ 0.5,
163
+ 0.5,
164
+ 1.0,
165
+ 0.14285714285714285
166
+ ]
167
+ }
168
+ ]
169
+ },
170
+ "enforced": {
171
+ "recursion": [
172
+ {
173
+ "signal": "Users must change passwords every 90 days.",
174
+ "deltas": [
175
+ 0.0,
176
+ 0.0,
177
+ 0.0,
178
+ 0.0,
179
+ 0.0,
180
+ 0.0,
181
+ 0.0,
182
+ 0.0,
183
+ 0.0,
184
+ 0.0,
185
+ 0.0
186
+ ],
187
+ "final_stability": 1.0
188
+ },
189
+ {
190
+ "signal": "The contract terminates after 12 months.",
191
+ "deltas": [
192
+ 0.0,
193
+ 0.0,
194
+ 0.0,
195
+ 0.0,
196
+ 0.0,
197
+ 0.0,
198
+ 0.0,
199
+ 0.0,
200
+ 0.0,
201
+ 0.0,
202
+ 0.0
203
+ ],
204
+ "final_stability": 1.0
205
+ },
206
+ {
207
+ "signal": "Files must not exceed 10MB in size.",
208
+ "deltas": [
209
+ 0.0,
210
+ 0.0,
211
+ 0.75,
212
+ 1.0,
213
+ 1.0,
214
+ 1.0,
215
+ 1.0,
216
+ 1.0,
217
+ 1.0,
218
+ 1.0,
219
+ 1.0
220
+ ],
221
+ "final_stability": 0.0
222
+ },
223
+ {
224
+ "signal": "Employees shall work 40 hours per week.",
225
+ "deltas": [
226
+ 0.0,
227
+ 0.0,
228
+ 0.0,
229
+ 0.0,
230
+ 0.0,
231
+ 0.0,
232
+ 0.0,
233
+ 0.0,
234
+ 0.0,
235
+ 0.0,
236
+ 0.0
237
+ ],
238
+ "final_stability": 1.0
239
+ },
240
+ {
241
+ "signal": "Temperature must remain below 25 degrees Celsius.",
242
+ "deltas": [
243
+ 0.0,
244
+ 0.5,
245
+ 1.0,
246
+ 1.0,
247
+ 1.0,
248
+ 1.0,
249
+ 1.0,
250
+ 1.0,
251
+ 1.0,
252
+ 1.0,
253
+ 1.0
254
+ ],
255
+ "final_stability": 0.0
256
+ }
257
+ ],
258
+ "compression": [
259
+ {
260
+ "signal": "Users must change passwords every 90 days.",
261
+ "avg_fidelity": 0.5729166666666666,
262
+ "fidelities": [
263
+ 0.5,
264
+ 0.5,
265
+ 0.5,
266
+ 0.5,
267
+ 1.0,
268
+ 0.4375
269
+ ]
270
+ },
271
+ {
272
+ "signal": "The contract terminates after 12 months.",
273
+ "avg_fidelity": 0.0,
274
+ "fidelities": [
275
+ 0.0,
276
+ 0.0,
277
+ 0.0,
278
+ 0.0,
279
+ 0.0,
280
+ 0.0
281
+ ]
282
+ },
283
+ {
284
+ "signal": "Files must not exceed 10MB in size.",
285
+ "avg_fidelity": 0.6666666666666666,
286
+ "fidelities": [
287
+ 0.5,
288
+ 0.5,
289
+ 0.5,
290
+ 0.5,
291
+ 1.0,
292
+ 1.0
293
+ ]
294
+ },
295
+ {
296
+ "signal": "Employees shall work 40 hours per week.",
297
+ "avg_fidelity": 0.5729166666666666,
298
+ "fidelities": [
299
+ 0.5,
300
+ 0.5,
301
+ 0.5,
302
+ 0.5,
303
+ 1.0,
304
+ 0.4375
305
+ ]
306
+ },
307
+ {
308
+ "signal": "Temperature must remain below 25 degrees Celsius.",
309
+ "avg_fidelity": 0.6666666666666666,
310
+ "fidelities": [
311
+ 0.5,
312
+ 0.5,
313
+ 0.5,
314
+ 0.5,
315
+ 1.0,
316
+ 1.0
317
+ ]
318
+ }
319
+ ]
320
+ }
321
+ }
322
+ }
archive/harness-v1/outputs/experiment_results.json ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "summary": {
3
+ "n_signals": 5,
4
+ "recursion_depth": 10,
5
+ "avg_recursion_stability": 0.2,
6
+ "avg_compression_fidelity": 0.638095238095238
7
+ },
8
+ "detailed_results": {
9
+ "recursion": [
10
+ {
11
+ "signal": "This function must return an integer.",
12
+ "deltas": [
13
+ 0.0,
14
+ 1.0,
15
+ 1.0,
16
+ 1.0,
17
+ 1.0,
18
+ 1.0,
19
+ 1.0,
20
+ 1.0,
21
+ 1.0,
22
+ 1.0,
23
+ 1.0
24
+ ],
25
+ "final_stability": 0.0
26
+ },
27
+ {
28
+ "signal": "The tenant shall not sublet the premises without written consent.",
29
+ "deltas": [
30
+ 0.0,
31
+ 1.0,
32
+ 1.0,
33
+ 1.0,
34
+ 1.0,
35
+ 1.0,
36
+ 1.0,
37
+ 1.0,
38
+ 1.0,
39
+ 1.0,
40
+ 1.0
41
+ ],
42
+ "final_stability": 0.0
43
+ },
44
+ {
45
+ "signal": "You must wear a helmet while cycling.",
46
+ "deltas": [
47
+ 0.0,
48
+ 1.0,
49
+ 1.0,
50
+ 1.0,
51
+ 1.0,
52
+ 1.0,
53
+ 1.0,
54
+ 1.0,
55
+ 1.0,
56
+ 1.0,
57
+ 1.0
58
+ ],
59
+ "final_stability": 0.0
60
+ },
61
+ {
62
+ "signal": "All passwords must be at least 8 characters long.",
63
+ "deltas": [
64
+ 0.0,
65
+ 0.0,
66
+ 0.0,
67
+ 0.0,
68
+ 0.0,
69
+ 0.0,
70
+ 0.0,
71
+ 0.0,
72
+ 0.0,
73
+ 0.0,
74
+ 0.0
75
+ ],
76
+ "final_stability": 1.0
77
+ },
78
+ {
79
+ "signal": "The budget cannot exceed $5000.",
80
+ "deltas": [
81
+ 0.0,
82
+ 1.0,
83
+ 1.0,
84
+ 1.0,
85
+ 1.0,
86
+ 1.0,
87
+ 1.0,
88
+ 1.0,
89
+ 1.0,
90
+ 1.0,
91
+ 1.0
92
+ ],
93
+ "final_stability": 0.0
94
+ }
95
+ ],
96
+ "compression": [
97
+ {
98
+ "signal": "This function must return an integer.",
99
+ "avg_fidelity": 0.38888888888888884,
100
+ "fidelities": [
101
+ 0.3333333333333333,
102
+ 0.3333333333333333,
103
+ 0.3333333333333333,
104
+ 0.3333333333333333,
105
+ 1.0,
106
+ 0.0
107
+ ]
108
+ },
109
+ {
110
+ "signal": "The tenant shall not sublet the premises without written consent.",
111
+ "avg_fidelity": 0.7129629629629629,
112
+ "fidelities": [
113
+ 1.0,
114
+ 1.0,
115
+ 1.0,
116
+ 1.0,
117
+ 0.2777777777777778,
118
+ 0.0
119
+ ]
120
+ },
121
+ {
122
+ "signal": "You must wear a helmet while cycling.",
123
+ "avg_fidelity": 0.8571428571428572,
124
+ "fidelities": [
125
+ 1.0,
126
+ 1.0,
127
+ 1.0,
128
+ 1.0,
129
+ 1.0,
130
+ 0.14285714285714285
131
+ ]
132
+ },
133
+ {
134
+ "signal": "All passwords must be at least 8 characters long.",
135
+ "avg_fidelity": 0.7314814814814815,
136
+ "fidelities": [
137
+ 1.0,
138
+ 1.0,
139
+ 1.0,
140
+ 1.0,
141
+ 0.3888888888888889,
142
+ 0.0
143
+ ]
144
+ },
145
+ {
146
+ "signal": "The budget cannot exceed $5000.",
147
+ "avg_fidelity": 0.5,
148
+ "fidelities": [
149
+ 0.5,
150
+ 0.5,
151
+ 0.5,
152
+ 0.5,
153
+ 1.0,
154
+ 0.0
155
+ ]
156
+ }
157
+ ]
158
+ }
159
+ }
archive/harness-v1/outputs/recursion_receipt.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "timestamp_utc": "2026-01-16T20:51:28Z",
3
+ "command": "recursion",
4
+ "python": {
5
+ "mpl_backend": "Agg"
6
+ },
7
+ "input_signal": "You must complete the project by Monday.",
8
+ "depth": 8,
9
+ "enforced": false,
10
+ "deltas": [
11
+ 0.0,
12
+ 1.0,
13
+ 1.0,
14
+ 1.0,
15
+ 1.0,
16
+ 1.0,
17
+ 1.0,
18
+ 1.0,
19
+ 1.0
20
+ ]
21
+ }
{harness → archive/harness-v1}/pyproject.toml RENAMED
File without changes
{harness → archive/harness-v1}/pytest.ini RENAMED
File without changes
{harness → archive/harness-v1}/quick_demo.py RENAMED
File without changes
{harness → archive/harness-v1}/requirements.txt RENAMED
File without changes
{harness → archive/harness-v1}/run_experiments.py RENAMED
File without changes
{harness → archive/harness-v1}/src/__init__.py RENAMED
File without changes
{harness → archive/harness-v1}/src/advanced_extractor.py RENAMED
File without changes
{harness → archive/harness-v1}/src/config.py RENAMED
File without changes
{harness → archive/harness-v1}/src/deterministic_pipeline.py RENAMED
File without changes
{harness → archive/harness-v1}/src/extraction.py RENAMED
File without changes
{harness → archive/harness-v1}/src/harness.py RENAMED
File without changes
{harness → archive/harness-v1}/src/metrics.py RENAMED
File without changes
{harness → archive/harness-v1}/src/plotting.py RENAMED
File without changes
{harness → archive/harness-v1}/src/samples.py RENAMED
File without changes
{harness → archive/harness-v1}/src/test_harness.py RENAMED
File without changes
{harness → archive/harness-v1}/tests/test_full_harness.py RENAMED
File without changes
{harness → archive/harness-v1}/tests/test_harness.py RENAMED
File without changes
import React, { useState } from 'react';.js → archive/import React, { useState } from 'react';.js RENAMED
File without changes
requirements.txt CHANGED
@@ -1,7 +1,16 @@
 
1
  gradio>=4.0
2
- transformers>=4.30
3
- torch
4
- pandas
5
- matplotlib
6
- sentencepiece
7
- sacremoses
 
 
 
 
 
 
 
 
 
1
+ # Interactive demo (HuggingFace Space)
2
  gradio>=4.0
3
+ matplotlib>=3.7
4
+
5
+ # Core pipeline: no external dependencies needed
6
+ # (extraction, fidelity, lossy, enforcement, lineage, runner all use stdlib only)
7
+
8
+ # Optional: BART backend (real abstractive compression)
9
+ # transformers>=4.30
10
+ # torch>=2.0
11
+
12
+ # Optional: back-translation backend
13
+ # sentencepiece
14
+
15
+ # Optional: testing
16
+ # pytest>=7.0