|
| 1 | +# Test suite index |
| 2 | + |
| 3 | +**65 test files, 997 `fn test_*` functions, all green under `omnimcode-standalone --test FILE`.** |
| 4 | + |
| 5 | +This is a map of what's covered, organized by surface area — not an |
| 6 | +exhaustive doc. Run any file with `--test FILE` to see the actual |
| 7 | +assertions. |
| 8 | + |
| 9 | +## Quick categories |
| 10 | + |
| 11 | +| Surface area | Files | ~tests | |
| 12 | +|---|---|--:| |
| 13 | +| Substrate primitives & arrays | substrate_primitives, substrate_extras, substrate_more, substrate_array | 108 | |
| 14 | +| Substrate codec, messaging, canonical | codec, compressed_messaging, substrate_messaging, canonical, canonical_extras, find_similar, tokenizer, tokenizer_extras | 96 | |
| 15 | +| Code intelligence, introspection, LLM workflow | code_intel, code_intel_extras, code_intel_more, introspection, introspection_extras, introspection_helpers, llm_workflow, workflow_extras, error_catalog, session_memory | 152 | |
| 16 | +| Core language | core_features, classes (×3), exceptions (×2), typed_exceptions, generators (×3), lazy_generators, fstrings (×2), regex (×2), json (×2) | 195 | |
| 17 | +| ML / autograd / numerics | autograd (×2), reverse_autograd (×2), broadcasting (×2), matmul, linalg_extras, ml_kernels (×2), math_extras | 137 | |
| 18 | +| Stdlib / utility | arr_extras, str_extras, dict_extras, stdlib (×2) | 104 | |
| 19 | +| Harmonic libraries | harmonic_libs | 18 | |
| 20 | +| ONN / geodesic | onn, geodesic | 24 | |
| 21 | +| Self-healing pass | heal_pass | 16 | |
| 22 | +| Parametric / mega-coverage | parametric (×4), mega_parametric | 59 | |
| 23 | +| Misc / kitchen-sink | new_builtins | 70 | |
| 24 | + |
| 25 | +Numbers are `grep -c '^fn test_'` per file. Some parametric tests |
| 26 | +exercise many sub-assertions inside one `test_*` body, so the |
| 27 | +*assertion* count is much higher than 997. |
| 28 | + |
| 29 | +## File-by-file |
| 30 | + |
| 31 | +### Substrate codec, messaging, canonical (the LLM-channel layer) |
| 32 | +| File | Tests | Purpose | |
| 33 | +|---|--:|---| |
| 34 | +| `test_codec.omc` | 7 | `omc_codec_encode/decode_lookup` — alpha-rename invariant library recovery + inline error-hint UX check | |
| 35 | +| `test_compressed_messaging.omc` | 6 | `omc_msg_sign_compressed/recover` — substrate-signed wire payloads carrying codec output, JSON round-trip | |
| 36 | +| `test_substrate_messaging.omc` | 10 | The base substrate-signed messaging protocol (pre-codec) — `omc_msg_sign / verify / serialize` | |
| 37 | +| `test_canonical.omc` | 15 | AST canonicalization — the LLM-reach-for semantic-equivalence layer | |
| 38 | +| `test_canonical_extras.omc` | 11 | More canonical / structural-equivalence cases | |
| 39 | +| `test_find_similar.omc` | 8 | Substrate-distance code retrieval — content-addressed code search | |
| 40 | +| `test_tokenizer.omc` | 15 | Substrate-token adapter — LLM compression / semantic-distance layer | |
| 41 | +| `test_tokenizer_extras.omc` | 20 | Additional tokenizer + canonical + code_intel coverage | |
| 42 | + |
| 43 | +### Substrate primitives & arrays |
| 44 | +| File | Tests | Purpose | |
| 45 | +|---|--:|---| |
| 46 | +| `test_substrate_primitives.omc` | 57 | The O(log_phi_pi_fibonacci N) primitive family — `substrate_search`, `substrate_lower_bound`, Zeckendorf, etc. | |
| 47 | +| `test_substrate_extras.omc` | 25 | Additional substrate-primitive coverage | |
| 48 | +| `test_substrate_more.omc` | 11 | More substrate-primitive coverage | |
| 49 | +| `test_substrate_array.omc` | 15 | Substrate-typed array library — MVP | |
| 50 | + |
| 51 | +### Code intel, introspection, LLM workflow |
| 52 | +| File | Tests | Purpose | |
| 53 | +|---|--:|---| |
| 54 | +| `test_code_intel.omc` | 20 | The LLM-iteration primitives layered on top of canonical form | |
| 55 | +| `test_code_intel_extras.omc` | 14 | Diff + metrics | |
| 56 | +| `test_code_intel_more.omc` | 10 | Yet more | |
| 57 | +| `test_introspection.omc` | 13 | Built-in introspection — what LLMs need to know what OMC can do | |
| 58 | +| `test_introspection_extras.omc` | 20 | Additional introspection / discoverability coverage | |
| 59 | +| `test_introspection_helpers.omc` | 14 | Helper builtins | |
| 60 | +| `test_llm_workflow.omc` | 14 | End-to-end LLM workflow primitives | |
| 61 | +| `test_workflow_extras.omc` | 22 | More workflow / introspection tests | |
| 62 | +| `test_error_catalog.omc` | 7 | `omc_explain_error` pattern-matches runtime errors | |
| 63 | +| `test_session_memory.omc` | 18 | Session memory + token introspection + substrate scoring builtins | |
| 64 | + |
| 65 | +### Core language |
| 66 | +| File | Tests | Purpose | |
| 67 | +|---|--:|---| |
| 68 | +| `test_core_features.omc` | 13 | Control flow, recursion, lambdas | |
| 69 | +| `test_classes.omc` / `_extras` / `_more` | 11/11/11 | Minimum-viable class system + inheritance | |
| 70 | +| `test_exceptions.omc` / `_extras` | 8/11 | throw, try/catch, finally | |
| 71 | +| `test_typed_exceptions.omc` | 9 | Typed exception hierarchies (Track 1) | |
| 72 | +| `test_generators.omc` / `_extras` / `_more` | 8/14/10 | Eager-list generator MVP | |
| 73 | +| `test_lazy_generators.omc` | 12 | Streaming yield via callback | |
| 74 | +| `test_fstrings.omc` / `_extras` | 10/10 | `f"..."` interpolation | |
| 75 | +| `test_regex.omc` / `_extras` | 10/10 | `re_match`, `re_find`, `re_find_all`, `re_replace`, `re_split` | |
| 76 | +| `test_json.omc` / `_extras` | 17/14 | `json_parse` / `json_stringify` | |
| 77 | + |
| 78 | +### ML / autograd / numerics |
| 79 | +| File | Tests | Purpose | |
| 80 | +|---|--:|---| |
| 81 | +| `test_autograd.omc` / `_extras` | 17/22 | Substrate-aware forward-mode autograd via dual numbers (Track 2) | |
| 82 | +| `test_reverse_autograd.omc` / `_extras` | 12/10 | Reverse-mode autograd — the real ML training engine | |
| 83 | +| `test_broadcasting.omc` / `_extras` | 9/10 | 2D-aware broadcasting on `arr_add/sub/mul` | |
| 84 | +| `test_matmul.omc` | 9 | 2D arrays + matrix multiplication | |
| 85 | +| `test_linalg_extras.omc` | 11 | Linalg / matmul / transpose coverage | |
| 86 | +| `test_ml_kernels.omc` / `_extras` | 16/13 | Native-Rust ML primitives keeping inner loops out of OMC | |
| 87 | +| `test_math_extras.omc` | 36 | Math builtin coverage | |
| 88 | + |
| 89 | +### Stdlib / utility |
| 90 | +| File | Tests | Purpose | |
| 91 | +|---|--:|---| |
| 92 | +| `test_arr_extras.omc` | 38 | `arr_*` builtin coverage | |
| 93 | +| `test_str_extras.omc` | 24 | `str_*` builtin coverage | |
| 94 | +| `test_dict_extras.omc` | 16 | `dict_*` builtin coverage | |
| 95 | +| `test_stdlib.omc` / `_extras` | 12/14 | Hashing, base64, datetime | |
| 96 | + |
| 97 | +### Harmonic libraries / ONN / heal |
| 98 | +| File | Tests | Purpose | |
| 99 | +|---|--:|---| |
| 100 | +| `test_harmonic_libs.omc` | 18 | `harmonic_anomaly`, `harmonic_clustering`, `harmonic_recommend` | |
| 101 | +| `test_onn.omc` | 14 | ONN / self-instantiation / context-compression | |
| 102 | +| `test_geodesic.omc` | 10 | ChildFold / geodesic-expand (Sovereign Lattice port) | |
| 103 | +| `test_heal_pass.omc` | 16 | Self-healing compiler heal classes + per-class pragmas | |
| 104 | + |
| 105 | +### Parametric / mega-coverage |
| 106 | +| File | Tests | Purpose | |
| 107 | +|---|--:|---| |
| 108 | +| `test_parametric.omc` | 13 | Table-driven, several inputs/properties per test | |
| 109 | +| `test_parametric_2.omc` | 8 | More table-driven coverage | |
| 110 | +| `test_parametric_3.omc` | 12 | Many sub-assertions per test | |
| 111 | +| `test_parametric_4.omc` | 13 | Yet more table-driven assertions | |
| 112 | +| `test_mega_parametric.omc` | 13 | Max-coverage table-driven tests (~900 atomic sub-assertions) | |
| 113 | + |
| 114 | +### Misc / kitchen-sink |
| 115 | +| File | Tests | Purpose | |
| 116 | +|---|--:|---| |
| 117 | +| `test_new_builtins.omc` | 70 | Coverage for the steady stream of new builtins — should be triaged into topical files over time | |
| 118 | + |
| 119 | +## Known gaps & overlap |
| 120 | + |
| 121 | +- **`test_new_builtins.omc` (70 tests)** is a kitchen-sink that's |
| 122 | + grown across many sessions. Worth splitting into topical files — |
| 123 | + but only when it's the actual blocker for a change. |
| 124 | +- **`test_substrate_messaging.omc` vs `test_compressed_messaging.omc`**: |
| 125 | + no overlap. The former covers raw substrate-signed messaging |
| 126 | + (pre-codec); the latter covers the codec-augmented variant. Both |
| 127 | + stay. |
| 128 | +- **`test_classes*.omc` (3 files)** and **`test_parametric*.omc` |
| 129 | + (4 files)**: these accumulated by-session, not by-topic. Worth |
| 130 | + a one-shot consolidation pass when convenient. |
| 131 | +- **No top-level test runner** that exercises every file in |
| 132 | + sequence. `omnimcode-standalone --test FILE` is per-file; a |
| 133 | + `scripts/run_all_tests.sh` (or a Cargo test that shells out) |
| 134 | + would prevent regression-by-omission. |
| 135 | + |
| 136 | +## Run anything |
| 137 | + |
| 138 | +```bash |
| 139 | +omnimcode-standalone --test examples/tests/test_codec.omc |
| 140 | +omnimcode-standalone --test examples/tests/test_substrate_primitives.omc |
| 141 | +# ... |
| 142 | +``` |
0 commit comments