omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / docs / migration / C-TO-OM-INVENTORY.md
| 1 | # Remaining C → Om inventory |
| 2 | |
| 3 | Snapshot: `aien-dev/omega-mv` main **d863780eb42bd940349eba61a3d1c78b0b819941**, inspected 2026-10-24. [Exact-path CSV](C-TO-OM-INVENTORY.csv). |
| 4 | |
| 5 | Rechecked 2026-11-10 at main `a59a425b`: the totals below and the CSV are the 2026-10-24 snapshot and I have not re-triaged them per file. The tree now tracks **899 `.c` + 359 `.h` = 1,258** paths and **1,629 `.om`** (`git ls-files '*.c' | wc -l` and the same for `*.h`, `*.om`), so "no tracked `.om`" no longer holds. 568 of the `.c`/`.h` paths are under `src/` and 159 under `evidence/`. Subsystem rows changed only in two places: `src/` root files 195 -> 236, remaining families 78 -> 79 (`src/synapse` 1 is new). Every other row in the subsystem table matches today's count. |
| 6 | |
| 7 | Rechecked 2026-11-19 at main `100a9a914`: the tree now tracks **910 `.c` + 362 `.h` = 1,272** paths (568 under `src/` and 163 under `evidence/`) and **5,421 `.om`** paths (including the integrated pure-Omega Sovereign Intelligence layers `gpu/`, `aienux/`, `apps/`, `bridge/`, `core/`, `protocol/`, `si/`, and `train/`). The per-file role triage below remains the historical 2026-10-24 snapshot. |
| 8 | |
| 9 | Updated 2026-11-22 with the OM waves 29 to 36 change: the 48 CSV rows of C/H paths that change deletes (it deletes 49; `tools/gen/retrieval/genret.c` postdates the snapshot and has no row) (the Visor and language lanes, `tools/omega.c`, c2sat, the PD-0 planner, the TURING qrecord/qcont/PRD readers, `est_fit`/`est_eval` and their tests) now carry category `retired`, no build mention, and the pure OM-2 file that replaced each. They are no longer part of what is left. The role-triage totals below are still the 2026-10-24 snapshot and count them. |
| 10 | |
| 11 | Updated 2026-11-23 with Wave 37 (EXP-001 lane A): cut over `mk/turing_exp001_a.mk` (`turing-cal-candidates` and `power-simulation`) to pure seeded OM-2 (`tools/turing_cal_dev.om`, `tools/turing_cal_candidates.om`, `calibration/scripts/power_simulation.om`), retiring and deleting 5 C/H files (`src/turing/ty_profile.c`, `src/turing/ty_record.c`, `src/turing/ty_record.h`, `tools/turing_cal_candidates.c`, `tools/turing_cal_dev.h`; `calibration/scripts/power_simulation.c` stays on disk as `migration_reference` solely because frozen EXP-001/EXP-001R `candidate_manifest.json` pins its SHA-256). |
| 12 | |
| 13 | Updated 2026-11-24 with Wave 38 (GEN-3 validator & corpus oracle): cut over `mk/gen-abstract.mk` (`recheck` and `oracle`) to pure seeded OM-2 (`tools/gen/abstract/recheck.om` with `seed/ng/sha256.om`, and `tests/one_layer/generalization/corpus/oracle.om`) and added `test-gen-abstract-parity` (byte-exact vs C across fixtures, all 58 committed records, 35 format/schema/receipt mutants, all 49 corpus tasks, `--bound`, and usage/error cases). `tools/gen/abstract/recheck.c` and `tests/one_layer/generalization/corpus/oracle.c` remain on disk because committed GEN receipts (`tests/one_layer/generalization/records/receipts/*`) and `mk/gen-retrieval.mk` pin their SHA-256 digests. |
| 14 | |
| 15 | This is an inventory and cutover backlog, **not a retirement or deployment claim**. The main tree contains **674 `.c` + 331 `.h` = 1,005 tracked paths**, and no tracked `.om`. Candidate branches already contain seeded Om; main alone does not describe the whole programme. Counts cover this repository, not external PHYSICS/NVIDIA dependencies, other extensions, assembly or shell/Python automation. |
| 16 | |
| 17 | ## Role triage |
| 18 | |
| 19 | | Role | `.c` | `.h` | Total | |
| 20 | |---|---:|---:|---:| |
| 21 | | Active-source candidates under `src/`, excluding explicit cases below | 268 | 250 | 518 | |
| 22 | | Tools, tests, benchmarks, research and calibration | 339 | 50 | 389 | |
| 23 | | Explicit reference/model code | 4 | 3 | 7 | |
| 24 | | Historical evidence copies and audit baseline | 63 | 27 | 90 | |
| 25 | | Confirmed generated header | 0 | 1 | 1 | |
| 26 | | **Total** | **674** | **331** | **1,005** | |
| 27 | |
| 28 | These categories are conservative **triage**, not complete per-file production reachability. A file under `src/` is not automatically deployed; a tool can be a production consumer. Conversely, absence from a literal Makefile search does not prove a file unused: variable expansion, wildcards, scripts, includes and external consumers matter. The CSV records literal references in `Makefile` and `mk/*.mk`, not a fully expanded dependency graph. No production or hardware tests were run for this inventory. |
| 29 | |
| 30 | ### What the build establishes |
| 31 | |
| 32 | - Root `Makefile` defaults to `all`, which builds the C `omegatool`; `SRCS` explicitly includes core, codec, realization, CPU/GPU code, `tools/omegatool.c`, and external PHYSICS `m16_native.c`/`nvrm.c`. Active C is not merely a Linguist artefact. |
| 33 | - `-include mk/*.mk` adds independent compiler, checker, runtime, tensor, tool and test targets. `mk/compiler.mk` builds `src/compiler/*.c` through `OSC_LIB`; its model and model-generator sources are independent test machinery. “gen” in `osc_model_gen.c` means a handwritten sequence generator, **not generated source**. |
| 34 | - `src/runtime/rx_seq_reference.{c,h}` explicitly identifies the R15 reference oracle, with Makefile R15 consumers. `src/turing/field_select_v0_retired.c` reproduces the recorded kill-test failure and remains in `TURING_SRCS`. These are active reference dependencies, not removable merely because their names say reference/retired. |
| 35 | - Only `src/osh/osh_layout.h` is classified generated here: its header names `src/osh/osh_gen.sh` and `osh_layout.lst`, and `mk/osh.mk` wires regeneration/checking. Generation does not make its active ABI dependency disappear. `src/omega_numeric_transc_tables.h` is frozen shared constants moved verbatim from source; it is **not** classified generated. |
| 36 | - **89 paths under `evidence/` are immutable historical evidence and excluded from this deletion backlog.** The additional historical path is `docs/osc/audit/baseline/shim.c`. Preserve original evidence bytes/provenance; do not alter historical receipts to improve language percentages. No blanket generated/vendor classification is applied, and no tracked vendored C was established by this inspection. |
| 37 | |
| 38 | The 389 support paths break down as: tests 273, tools 61, research 47, bench 7, calibration 1. A replacement must include first-party tests/build automation too; this grouping is not an exemption from the destination-language policy. |
| 39 | |
| 40 | ## Subsystems and existing work |
| 41 | |
| 42 | Counts below include both C source and headers, before role exclusions. They locate work; issue links identify existing coordination, not newly assigned ownership. |
| 43 | |
| 44 | | Subsystem | Paths | Existing coordination / consumer gate | |
| 45 | |---|---:|---| |
| 46 | | `src/` root: core, CPU/GPU, numeric, hashing | 195 | [#599 programme](https://github.com/aien-dev/omega-mv/issues/599), [#638 seeded CPU→GPU](https://github.com/aien-dev/omega-mv/issues/638), [#661 end-to-end model](https://github.com/aien-dev/omega-mv/issues/661); retain CUDApp canonical runtime ownership and live-service boundaries | |
| 47 | | `src/runtime` | 65 | [#651 reuse lifecycle](https://github.com/aien-dev/omega-mv/issues/651), [#649 lifecycle](https://github.com/aien-dev/omega-mv/issues/649), [#659 recovery](https://github.com/aien-dev/omega-mv/issues/659); durable identities, restart/revocation and single authoritative writer must survive cutover | |
| 48 | | `src/compiler` | 31 | [#621 source-aware Om](https://github.com/aien-dev/omega-mv/issues/621), [#650 compiler correspondence](https://github.com/aien-dev/omega-mv/issues/650); inspect existing seeded compiler, do not build another | |
| 49 | | `src/checker2` | 11 | [#623 checked lowering](https://github.com/aien-dev/omega-mv/issues/623), [#647 verifier worklist](https://github.com/aien-dev/omega-mv/issues/647); preserve receipt trust boundary and refusal behavior | |
| 50 | | `src/tensor`, `src/autodiff`, `src/train` | 8 + 2 + 4 | [#663 tensor](https://github.com/aien-dev/omega-mv/issues/663), [#664 autodiff](https://github.com/aien-dev/omega-mv/issues/664), [#665 graph/compiler](https://github.com/aien-dev/omega-mv/issues/665); qualify actual inference/training consumers | |
| 51 | | `src/searchtrace` | 11 | [#607 tracing](https://github.com/aien-dev/omega-mv/issues/607), [#608 archive](https://github.com/aien-dev/omega-mv/issues/608); observational trace archive must not become Cortex's authoritative writer | |
| 52 | | `src/osh`, `src/visor`, `src/language` | 23 + 21 + 6 | [#635 native command retirement](https://github.com/aien-dev/omega-mv/issues/635), [#637 attachment](https://github.com/aien-dev/omega-mv/issues/637), [#667 tooling](https://github.com/aien-dev/omega-mv/issues/667); preserve external command/stream/error contracts | |
| 53 | | `src/physics0`, `src/turing` | 36 + 35 | [#599](https://github.com/aien-dev/omega-mv/issues/599), [#522 measured realization](https://github.com/aien-dev/omega-mv/issues/522); retain measurement validity and sealed evidence | |
| 54 | | Remaining `src/` families | 78 | algebra 19, estimation 10, polyglot 9, crumbline 8, dual 8, fabric 8, dual_experiment 5, reservoir 4, ans 3, allen 2, path 2; reconcile exact owner through #599 before implementing | |
| 55 | |
| 56 | ## Small bounded cutover candidates—not claims of readiness |
| 57 | |
| 58 | 1. **One hashing consumer, not the global hash ABI.** `migration/osc-to-seeded-omega` at `9b072eb492e106d23f7eed984c5645251601adee` contains `seed/native/sha256.om` and `tests/seed-migration/sha256.py`, with boundary/fragmentation/closed-input cases. The Om program accepts stdin up to 8 MiB and emits hex after EOF. Current `src/sha256.{c,h}` exposes incremental `sha256_init/update/final` used throughout the C tree. First select one compatible byte-stream consumer; qualify exact framing, size/refusal/exit behavior, seed/binary provenance and independent controls; switch that consumer and remove only its superseded implementation/dependency. This CLI is **not ABI-compatible** and does not authorize deleting shared SHA C. Reuse #635/#667 and the compiler owner. |
| 59 | 2. **One legacy compiler command consumer.** Existing successor source is `seed/omc/omc.om` on `seed/omega-in-omega` at `57f5f4258cebf3d5b2c22853cd062e351265c525`, also present on the inspected migration branch. Map a specific caller of `src/compiler/oscc_main.c` before changing it. `.osc` and `.om` are not interchangeable semantic profiles; migrate source and diagnostics/receipt expectations explicitly, run #621/#623/#624 conformance and #650 provenance checks, then remove the now-unused C entry point/dependencies. The inspected migration branch still contains the legacy compiler and C default build; branch presence alone is not cutover evidence. |
| 60 | 3. **Reference-test retirement only with an Om test successor.** `src/runtime/rx_seq_reference.{c,h}` and the frozen Turing selector have narrow named consumers, but this inspection did **not** establish qualified Om replacements. Preserve failure receipts; replace and qualify the test/oracle behavior before removing active source. Do not claim these are safe deletions today. |
| 61 | |
| 62 | The inspected `seed/retirement-integration` branch at `12251e3403d42931ada27dc1c54b3b610954be5d` contains `seed/retirement/trn1/trn1.om`, but its own `docs/retirement/README.md` explicitly reports **zero verified production retirements**: the framed native utility does not migrate the original Rust library ABI/callers. It is useful qualification precedent, not proof that remaining C has already been replaced. |
| 63 | |
| 64 | ## Acceptance for each implementation PR |
| 65 | |
| 66 | Link the existing issue/owner, name exact C paths and Om successor pins, inventory all callers/build dependencies, qualify equivalence and negative controls, switch real consumers, remove superseded active implementation and obsolete dependencies, and read back the final source/CI evidence. Keep unrun platform/hardware gates explicitly NOT_RUN. Do not merge/delete based on filename counts, author PASS, a wrapper, or a side-branch demonstration. Historical evidence remains intact. |