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 / bench / omc_efficiency / PROTOCOL-4.md
| 1 | # OMC-EFF-4: Omega drivers and two corrected checks (additive) |
| 2 | |
| 3 | Status: frozen in the commit that adds this file. `PROTOCOL.md`, `PROTOCOL-2.md`, `PROTOCOL-3.md` and their |
| 4 | evidence are not edited. Arms, rounds, warm-ups, seeds, metrics, statistics, validity rules, the |
| 5 | PROTOCOL-2 section 4 thresholds and the PROTOCOL-3 profile apply unchanged. This file replaces the two |
| 6 | shell drivers with Omega programs and corrects two checks that could pass when they should fail. |
| 7 | |
| 8 | ## 1. Findings corrected |
| 9 | |
| 10 | 1. **A control was credited without an output mismatch.** `conductor.om` counted a negative control as |
| 11 | detected whenever its run was not ok, which includes a control that crashed, exited nonzero or printed no |
| 12 | runtime line. Such a run proves nothing about the output check. A control is now detected only when the |
| 13 | run is valid (status 0 and, for timed runs, exactly one runtime line) and its output differs from |
| 14 | `want/`. A control that does not run validly counts as a failed run (`fail=` in the `S` row), never as a |
| 15 | detection. |
| 16 | 2. **The coordinator dropped conductor failures.** `run.sh` ran the conductor and exited 0 whatever the |
| 17 | conductor returned, so a run with failed rows looked like a clean run to any caller. `run.om` records |
| 18 | every conductor exit status in `provenance.txt` (`build_rc`, `build_B_rc`, `build_C_rc`, `run_rc`) and |
| 19 | exits 1 when any of them is nonzero. |
| 20 | |
| 21 | ## 2. Counters |
| 22 | |
| 23 | The conductor reads `/proc/sys/kernel/perf_event_paranoid`. When it is above 2 an unprivileged `perf stat` |
| 24 | cannot count user-space instructions and cycles; the conductor then writes no `P` rows and its `H` row says |
| 25 | `counters=off`. With counters off, instruction ratios are NOT_RUN, never zero and never a pass. |
| 26 | |
| 27 | ## 3. Drivers |
| 28 | |
| 29 | `run.sh` and `selftest.sh` are removed. Their Omega ports are built by the omc under test (or the pinned |
| 30 | omc) and take absolute paths or paths relative to the working directory: |
| 31 | |
| 32 | ```sh |
| 33 | omc < bench/omc_efficiency/run.om > run && chmod +x run |
| 34 | ./run [--profile om1|om2] HERE OMC OUTDIR [CPU] |
| 35 | ./run [--profile om1|om2] --ab HERE BASE CAND SEED OUTDIR [CPU] |
| 36 | omc < bench/omc_efficiency/selftest.om > selftest && chmod +x selftest |
| 37 | ./selftest OMC HERE SCRATCH |
| 38 | ``` |
| 39 | |
| 40 | `HERE` is `bench/omc_efficiency`. Every step of `run.sh` is kept with the same files, names, commands and |
| 41 | arguments: provenance, `inputs.sha256`, the PROTOCOL-3 om2 check, the seven mutants, the arm builds, |
| 42 | `disasm-c/`, `arms.sha256`, `om1-identity.txt`, `sizes.txt`, the conductor build and run pinned with |
| 43 | `taskset -c CPU nice -n 19`. The differences: |
| 44 | |
| 45 | - `inputs.sha256` lists `run.om` and `selftest.om` in place of the two scripts, and every `PROTOCOL*.md`. |
| 46 | - `provenance.txt` adds `protocol4_sha256`. |
| 47 | - Paths are made absolute against the working directory; symbolic links are not resolved. |
| 48 | - Exit status: 0, 1 (a conductor invocation failed, section 1.2), 64 bad usage, 70 a setup step failed. |
| 49 | |
| 50 | `selftest` keeps every check of `selftest.sh` and adds two control checks: a control whose output equals |
| 51 | `want/` but prints no runtime line, and a control that crashes, are each a failed run with |
| 52 | `ctl_detected=0`. Against the conductor before this change both checks fail (`ctl_detected=1`). |
| 53 | |
| 54 | ## 4. Evidence |
| 55 | |
| 56 | `evidence/OMC-EFF-4/`: `selftest` output against the corrected conductor and against the previous one, and |
| 57 | a `run` smoke on a non-timing core showing the files above and the exit status on a forced conductor |
| 58 | failure. No timing claim is made from these runs. |