interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

tests: report freestanding OM-2 checks in the selected execution mode

merged 9a4a6819c17c9b92 #61 · opened 2026-11-05 13:08 UTC · closed 2026-11-06 13:36 UTC · merged 2026-11-06 13:36 UTC

Imported from GitHub aien-dev/omega-bridge#61, by drakestapleton

Base 29d9cff72676bcef41a067bdcf4d8b0711042bcd · Head 1bba6706d00c18c19c73f408d86e0c3f1b728452

Merged on GitHub as daa736c29bd4392c24e292380d471c0d6aee7f1d; reachable from main 0138839cc3e7aef1c77230505f757372b8ae6ad5 (observed 2026-11-18T16:39:54Z)

drakestapleton wrote on 2026-11-05 13:08 UTC

Evidence

Local host-only checks at 3a655311e2900e6f39440b1efe3b5a5a2e0011e0, Linux x86-64. No Omega compiler, target caller, emulator or hardware experiment was run.

  • python3 tests/native/x86/test_mode_labels.py: exit 0, 4 tests pass. Covers native and emulated PASS/FAIL diagnostics, all three old-label negative controls, and direct/QEMU guest command selection.
  • The same regression against unmodified main 4ad48c456de95cacd6250295ce9a092537fc9643: exit 1, both native PASS and FAIL label cases fail. Emulated labels remain unchanged.
  • python3 -m py_compile tests/native/x86/suite.py tests/native/x86/test_mode_labels.py, sh -n tools/test.sh, and git diff --check: exit 0.
  • crumb verify .: exit 0, 4 crumbs current. Generated with the unmodified crumb tool at aien-architecture-mv main 12e8c7de510f85c61ae8809a9b15467c51233783; no checker or pin change.
  • Independent read-only review found no draft-PR blocker, verified the old-label failures, unchanged acceptance predicates and matching evidence hashes.

Red/green logs: evidence/native-x86-mode-labels-{red,green}.log. They record diagnostic-only evidence, not native ABI execution.

Defect and repair

After #45 and #60 were integrated, freestanding_om2_x86 executes through guest() in either mode but its three diagnostics still end with the literal EMULATED. In native mode this misreports the execution path.

Use self.how for those three suffixes, matching the other checks. All acceptance predicates and execution commands are unchanged. The new host-only test evaluates the actual diagnostic expressions and calls the real Suite.check; it does not run the ABI checks. tools/test.sh invokes it so normal CI covers the regression.

Limits

Local sh tools/test.sh runs the new regression successfully, then exits 1 at seed fingerprint mismatch because build/bootstrap/omc is absent. The required AArch64 bootstrap and full suites are NOT_RUN locally; the normal hosted CI suites are now green (details below). Native ABI, physical x86 and GPU qualification are not established by this change. Historical receipts are unchanged.

Tracking: DRA-104. Narrow claim posted there after checking for an existing fix. Draft for maintainer review, no merge or deployment.

Exact-head CI

All reported checks pass at 3a655311e2900e6f39440b1efe3b5a5a2e0011e0:

The full native ABI suite and physical qualification remain outside these CI workflows. Draft remains open for maintainer review.

Landing refresh 2026-11-06

Head 1bba6706d00c18c19c73f408d86e0c3f1b728452, base main; merged main 29d9cff7 without rewriting pinned history. All commands used bwrap device isolation, taskset 10-14, nice10, env -i with explicit HOME/PATH/LANG/compiler and required oracle variables.

Baseline build + freest_views + tools/test: rc=0, FREEST-VIEWS PASS; ALL SUITES RC=0. Mode-label regression: four tests OK including old-label mutants. Full x86 suite with explicit Zig/Go and QEMU10: rc=0, NATIVE-X86 EMULATED PASS (six languages built and run; native x86 NOT_RUN).

Full exact-head CI SUCCESS; ready for review. Landable: yes, local gates and all CI green; merge authority remains with Main. No merge or deployment performed. Physical x86, driver and GPU qualification NOT_RUN.

Exact-head CI

CheckVerdictEvidence
testSUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222656703/job/127908234308
Analyze (actions)SUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222650560/job/127908222177
portable-behaviorSUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222656721/job/127908234194
Analyze (c-cpp)SUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222650560/job/127908222191
Analyze (go)SUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222650560/job/127908221951
Analyze (python)SUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222650560/job/127908222339
Analyze (rust)SUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222650560/job/127908222328
sbomSUCCESShttps://github.com/aien-dev/omega-bridge/actions/runs/42222656703/job/127908233927
Cursor Approval Agent: Pull Request Router and ApproverNEUTRALhttps://cursor.com/agents/bc-2e04a5f3-6b26-4806-9a5c-f6caced3b3db
Cursor Security Agent: Security ReviewerNEUTRALhttps://cursor.com/agents/bc-92028a98-0904-40e9-8ddf-18c13ce75ba0
CodeQLSUCCESShttps://github.com/aien-dev/omega-bridge/runs/127913973339

Fetch it

A git bundle of the pull request's head, 5776 bytes.

curl -fsSL https://interplane.io/drakestapleton/omega-bridge/patches/9a4a6819c17c9b92.bundle -o 9a4a6819c17c9b92.bundle
git fetch 9a4a6819c17c9b92.bundle refs/pull/61/head

Raw bundle · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/omega-bridge
61
1bba6706d00c18c19c73f408d86e0c3f1b728452
{"kind":"github-import","owner":"aien-dev","repo":"omega-bridge","number":61,"url":"https://github.com/aien-dev/omega-bridge/pull/61","export_sha256":"4437ac3fc1482693a79ee39d37851494fabbe28ae00418da79120f49debe1d7b","imported_utc":"2026-11-18T16:39:54Z"}

Changes

diff --git a/.crumb b/.crumb
index 662f516..db6b4ef 100644
--- a/.crumb
+++ b/.crumb
@@ -4,7 +4,7 @@
       "children": [
         {
           "digest": "2fef3d6de87d55fe49b144a65ae78e2d3e9351653ede054fe6f7a4b795c72b74",
-          "last_commit": "bb3a8ae",
+          "last_commit": "4ad48c4",
           "name": "docs",
           "purpose": "Native ABI contracts and qualification boundaries"
         },
@@ -16,19 +16,19 @@
         },
         {
           "digest": "d0cef16228dbf8c832aa03ae707b96169067aa2c4a976726d092ee01eee86be2",
-          "last_commit": "30fba61",
+          "last_commit": "",
           "name": "evidence/native-freestanding-f32",
           "purpose": "Private FP32 no-libc native profile, raw hosted differential, whole attention-plan composition a"
         },
         {
           "digest": "f22dd9fdf5af0a51a8676baa3520e594715a2f4362f682130214a07425d23fd0",
-          "last_commit": "12f8132",
+          "last_commit": "",
           "name": "evidence/native-freestanding-om2-nolibc",
           "purpose": "Device-free host and emulated receipts for pure OM2 arrays, private f64 and six-unit no-libc com"
         },
         {
           "digest": "5c547f5fa713650855d8c5a5ba21273086c987609351ddb42c652a444c279e46",
-          "last_commit": "dead63c",
+          "last_commit": "",
           "name": "evidence/native-x86-aien-abi1",
           "purpose": "Device-free CPU qualification of exact ABI1 plus hosted-x86 native bridge; no chip run"
         },
@@ -40,38 +40,38 @@
         },
         {
           "digest": "ed236e744dc942696b18451c368100565d5c8b00e1a0696880d54b42249e6e25",
-          "last_commit": "bb3a8ae",
+          "last_commit": "9629242",
           "name": "src",
           "purpose": "Seeded native bridge generator and strict compiler pins"
         },
         {
           "digest": "3a1409c71ed647da0ae7dae923a033cdc8d6eeaf653a57775d3e460c136ce381",
-          "last_commit": "6a8f009",
+          "last_commit": "",
           "name": "tests/native/freestanding",
           "purpose": "Pure no-libc OM2 fixtures with integer public ABI and private floating point"
         },
         {
           "digest": "eaf4b68cbe6feb6e4236ccc49de28597dc6776a9cbf21392ea59d0d19fd51d86",
-          "last_commit": "c1282b2",
+          "last_commit": "",
           "name": "tests/native/v2/dev",
           "purpose": "Bounded CPU-only device-word controls; no device opens"
         },
         {
-          "digest": "27fc2d7c2f74f02b1d3eed8c4c4b75d607c9bf8ce1598c90338b347070be0f2c",
-          "last_commit": "30fba61",
+          "digest": "c05117a5ef1852f3d16215fce4a3585c78a5573baf14c0af8645ffe3043a3ad7",
+          "last_commit": "3a65531",
           "name": "tests/native/x86",
           "purpose": "Cross-toolchain ABI v2 qualification under qemu-x86_64; never native hardware evidence"
         }
       ],
-      "children_root": "sha256:a6c5dad65c27bac8fd70fb7f3f7b50a2c54cae48e051726c6a6ee779d41ac30b",
-      "compiled_at": "2026-11-06T12:31:28Z",
+      "children_root": "sha256:5eab88f95411addc0b0f6f7c70d257a87cd18a6a58376b1a486c63cc7680edeb",
+      "compiled_at": "2026-11-06T13:03:52Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:70ce26464ab04185981565b4538bc22c13dae36c22fea344d25f036670957ff5",
-      "evidence_files": 575,
-      "evidence_root": "sha256:7f9eaf762cd584b76eb06e200b64a679de635e9f4979ad39fb5708ee60f74ab5",
-      "files": 930,
-      "generated_at_commit": "bb3a8ae10d940d82f14c41cd8f0f1c32021545f0",
-      "source_tree": "sha256:69db6e6121dff1572dfce10cf2b5a740f506cf9536546673b3d72e73f57e5ded"
+      "digest": "sha256:11a16710e37fd5489a4ae0bcbeecba69d1bfbe5d692f0e2cfbd0f38219de53f7",
+      "evidence_files": 597,
+      "evidence_root": "sha256:28876b93736b9a574cc7d3aae93c29ff74bbb875f461bbf10b46f7509ca32b95",
+      "files": 955,
+      "generated_at_commit": "3a655311e2900e6f39440b1efe3b5a5a2e0011e0",
+      "source_tree": "sha256:80224a1dc1655a45962319d8b3d4da0d99d09e3d323123f57e1bac8de9c546b8"
     }
   },
   "name": "BridgeHostAienX86",
diff --git a/evidence/native-x86-mode-labels-green.log b/evidence/native-x86-mode-labels-green.log
new file mode 100644
index 0000000..0b0b610
--- /dev/null
+++ b/evidence/native-x86-mode-labels-green.log
@@ -0,0 +1,16 @@
+HOST-ONLY diagnostic regression, no compiler/caller/emulator execution.
+Base: 4ad48c456de95cacd6250295ce9a092537fc9643 plus the three self.how suffix changes.
+Command: python3 tests/native/x86/test_mode_labels.py
+1b18d520f169a8f2c70c12eb43d1c2c28e18bfed8e05b69672b75357ca0d0464  tests/native/x86/suite.py
+cb9e5bdc503d29f9794afe8a93b5552d333fff6a5e7a43302600192430f5f987  tests/native/x86/test_mode_labels.py
+test_each_old_label_mutant_is_detected (__main__.ModeLabelTests.test_each_old_label_mutant_is_detected) ... ok
+test_emulated_labels_unchanged (__main__.ModeLabelTests.test_emulated_labels_unchanged) ... ok
+test_guest_selection (__main__.ModeLabelTests.test_guest_selection) ... ok
+test_native_labels (__main__.ModeLabelTests.test_native_labels) ... ok
+
+----------------------------------------------------------------------
+Ran 4 tests in 0.004s
+
+OK
+
+exit=0
diff --git a/evidence/native-x86-mode-labels-red.log b/evidence/native-x86-mode-labels-red.log
new file mode 100644
index 0000000..09161cd
--- /dev/null
+++ b/evidence/native-x86-mode-labels-red.log
@@ -0,0 +1,81 @@
+HOST-ONLY diagnostic regression, no compiler/caller/emulator execution.
+Base: 4ad48c456de95cacd6250295ce9a092537fc9643 (unmodified suite.py)
+Command: python3 tests/native/x86/test_mode_labels.py
+Log normalization: repository path replaced by <repo>; trailing spaces removed.
+test_each_old_label_mutant_is_detected (__main__.ModeLabelTests.test_each_old_label_mutant_is_detected) ... ok
+test_emulated_labels_unchanged (__main__.ModeLabelTests.test_emulated_labels_unchanged) ... ok
+test_guest_selection (__main__.ModeLabelTests.test_guest_selection) ... ok
+test_native_labels (__main__.ModeLabelTests.test_native_labels) ...
+  test_native_labels (__main__.ModeLabelTests.test_native_labels) (ok=True) ... FAIL
+  test_native_labels (__main__.ModeLabelTests.test_native_labels) (ok=False) ... FAIL
+
+======================================================================
+FAIL: test_native_labels (__main__.ModeLabelTests.test_native_labels) (ok=True)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "<repo>/tests/native/x86/test_mode_labels.py", line 60, in test_native_labels
+    self.assert_labels("NATIVE", ok)
+  File "<repo>/tests/native/x86/test_mode_labels.py", line 53, in assert_labels
+    self.assertEqual(output.getvalue().splitlines(),
+AssertionError: Lists differ: ['PAS[90 chars]eads EMULATED', 'PASS freestanding x86 OM-2 fa[157 chars]TED'] != ['PAS[90 chars]eads NATIVE', 'PASS freestanding x86 OM-2 fapi[151 chars]IVE']
+
+First differing element 0:
+'PASS[40 chars]s, bad-arg and trap leave out untouched, four threads EMULATED'
+'PASS[40 chars]s, bad-arg and trap leave out untouched, four threads NATIVE'
+
+  ['PASS freestanding x86 OM-2 FIPS 180-4 digests, bad-arg and trap leave out '
+-  'untouched, four threads EMULATED',
+?                           ^^^^   -
+
++  'untouched, four threads NATIVE',
+?                           ^  ++
+
+   'PASS freestanding x86 OM-2 fapic wrapper traps (SIGILL) on a nonzero status '
+-  'EMULATED',
++  'NATIVE',
+   'PASS freestanding x86 OM-2 copy-back-dropped mutant leaves the pre-call fill '
+-  'in every digest EMULATED']
+?                   ^^^^   -
+
++  'in every digest NATIVE']
+?                   ^  ++
+
+
+======================================================================
+FAIL: test_native_labels (__main__.ModeLabelTests.test_native_labels) (ok=False)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "<repo>/tests/native/x86/test_mode_labels.py", line 60, in test_native_labels
+    self.assert_labels("NATIVE", ok)
+  File "<repo>/tests/native/x86/test_mode_labels.py", line 53, in assert_labels
+    self.assertEqual(output.getvalue().splitlines(),
+AssertionError: Lists differ: ['FAI[90 chars]eads EMULATED', 'FAIL freestanding x86 OM-2 fa[157 chars]TED'] != ['FAI[90 chars]eads NATIVE', 'FAIL freestanding x86 OM-2 fapi[151 chars]IVE']
+
+First differing element 0:
+'FAIL[40 chars]s, bad-arg and trap leave out untouched, four threads EMULATED'
+'FAIL[40 chars]s, bad-arg and trap leave out untouched, four threads NATIVE'
+
+  ['FAIL freestanding x86 OM-2 FIPS 180-4 digests, bad-arg and trap leave out '
+-  'untouched, four threads EMULATED',
+?                           ^^^^   -
+
++  'untouched, four threads NATIVE',
+?                           ^  ++
+
+   'FAIL freestanding x86 OM-2 fapic wrapper traps (SIGILL) on a nonzero status '
+-  'EMULATED',
++  'NATIVE',
+   'FAIL freestanding x86 OM-2 copy-back-dropped mutant leaves the pre-call fill '
+-  'in every digest EMULATED']
+?                   ^^^^   -
+
++  'in every digest NATIVE']
+?                   ^  ++
+
+
+----------------------------------------------------------------------
+Ran 4 tests in 0.006s
+
+FAILED (failures=2)
+
+exit=1
diff --git a/tests/native/x86/.crumb b/tests/native/x86/.crumb
index fecca11..06be425 100644
--- a/tests/native/x86/.crumb
+++ b/tests/native/x86/.crumb
@@ -3,14 +3,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-11-06T07:56:53Z",
+      "compiled_at": "2026-11-06T13:03:52Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:27fc2d7c2f74f02b1d3eed8c4c4b75d607c9bf8ce1598c90338b347070be0f2c",
+      "digest": "sha256:c05117a5ef1852f3d16215fce4a3585c78a5573baf14c0af8645ffe3043a3ad7",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 14,
-      "generated_at_commit": "12f8132c2fe0ad240430583c85e0d9c4f7bd1c33",
-      "source_tree": "sha256:77999c0b010c3d628bfe7a1744ee5b0ab664cdd3113e45f135c35ed480e16466"
+      "files": 15,
+      "generated_at_commit": "3a655311e2900e6f39440b1efe3b5a5a2e0011e0",
+      "source_tree": "sha256:c08ec160e07e268e8e241abe9cccbd359ec1f05a4255c2ce28a09a5c71fa62dd"
     }
   },
   "layer": "tests",
diff --git a/tests/native/x86/suite.py b/tests/native/x86/suite.py
index 75b577e..64b3990 100755
--- a/tests/native/x86/suite.py
+++ b/tests/native/x86/suite.py
@@ -765,18 +765,18 @@ class Suite:
             lines = result.stdout.decode().splitlines()
             got = dict(l.split() for l in lines if l.split() and l.split()[0] in om2.WANT)
             if source is good:
-                self.check("freestanding x86 OM-2 FIPS 180-4 digests, bad-arg and trap leave out untouched, four threads EMULATED",
+                self.check("freestanding x86 OM-2 FIPS 180-4 digests, bad-arg and trap leave out untouched, four threads " + self.how,
                            result.returncode == 0 and got == om2.WANT and "badarg 32 1" in lines
                            and "outok 0 2 7 1" in lines and "outtrap 5 1" in lines
                            and "threads 1" in lines and "floatbits 1" in lines)
                 # The fapic wrapper's __builtin_trap() is ud2 on x86-64: SIGILL, and the call never returns.
                 result = self.call(self.guest(tree / "fsom2", "trap"))
-                self.check("freestanding x86 OM-2 fapic wrapper traps (SIGILL) on a nonzero status EMULATED",
+                self.check("freestanding x86 OM-2 fapic wrapper traps (SIGILL) on a nonzero status " + self.how,
                            result.returncode == -4 and not result.stdout)
             else:
                 # Every digest must be the caller's untouched 0xa5 pre-call fill, so a crash or a
                 # partial run cannot pass as the mutant being caught.
-                self.check("freestanding x86 OM-2 copy-back-dropped mutant leaves the pre-call fill in every digest EMULATED",
+                self.check("freestanding x86 OM-2 copy-back-dropped mutant leaves the pre-call fill in every digest " + self.how,
                            result.returncode == 0 and got == om2.MUTANT)
 
     def freestanding_f32_x86(self):
diff --git a/tests/native/x86/test_mode_labels.py b/tests/native/x86/test_mode_labels.py
new file mode 100644
index 0000000..3bac79f
--- /dev/null
+++ b/tests/native/x86/test_mode_labels.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python3
+"""Host-only regression for the freestanding OM-2 diagnostic labels.
+
+Evaluate the real check-name expressions and use Suite.check to print them.
+No acceptance predicate, compiler, caller or emulator is executed here. This
+tests reporting and command selection, not native ABI or hardware behavior.
+"""
+
+import ast
+import contextlib
+import inspect
+import io
+import os
+import textwrap
+import unittest
+from unittest.mock import patch
+
+from suite import Suite
+
+
+PREFIXES = (
+    "freestanding x86 OM-2 FIPS 180-4 digests, bad-arg and trap leave out untouched, four threads ",
+    "freestanding x86 OM-2 fapic wrapper traps (SIGILL) on a nonzero status ",
+    "freestanding x86 OM-2 copy-back-dropped mutant leaves the pre-call fill in every digest ",
+)
+
+
+class ModeLabelTests(unittest.TestCase):
+    @classmethod
+    def setUpClass(cls):
+        source = textwrap.dedent(inspect.getsource(Suite.freestanding_om2_x86))
+        cls.labels = []
+        for node in ast.walk(ast.parse(source)):
+            if (isinstance(node, ast.Call) and isinstance(node.func, ast.Attribute)
+                    and isinstance(node.func.value, ast.Name)
+                    and node.func.value.id == "self" and node.func.attr == "check"):
+                label = node.args[0]
+                if any(isinstance(part, ast.Constant) and isinstance(part.value, str)
+                       and part.value.startswith("freestanding x86 OM-2 ")
+                       for part in ast.walk(label)):
+                    cls.labels.append(compile(ast.Expression(label), "<check-name>", "eval"))
+        if len(cls.labels) != len(PREFIXES):
+            raise AssertionError("expected all three freestanding OM-2 diagnostic expressions")
+
+    def assert_labels(self, how, ok, expressions=None):
+        runner = Suite.__new__(Suite)
+        runner.how, runner.failed = how, []
+        output = io.StringIO()
+        with contextlib.redirect_stdout(output):
+            for label in self.labels if expressions is None else expressions:
+                runner.check(eval(label, {"self": runner}), ok)
+        verdict = "PASS " if ok else "FAIL "
+        self.assertEqual(output.getvalue().splitlines(),
+                         [verdict + prefix + how for prefix in PREFIXES])
+        self.assertEqual(runner.failed, [] if ok else [prefix + how for prefix in PREFIXES])
+
+    def test_native_labels(self):
+        for ok in (True, False):
+            with self.subTest(ok=ok):
+                self.assert_labels("NATIVE", ok)
+
+    def test_emulated_labels_unchanged(self):
+        for ok in (True, False):
+            with self.subTest(ok=ok):
+                self.assert_labels("EMULATED", ok)
+
+    def test_each_old_label_mutant_is_detected(self):
+        for i, prefix in enumerate(PREFIXES):
+            with self.subTest(label=prefix):
+                mutant = list(self.labels)
+                mutant[i] = compile(repr(prefix + "EMULATED"), "<old-label-mutant>", "eval")
+                with self.assertRaises(AssertionError):
+                    self.assert_labels("NATIVE", True, mutant)
+
+    def test_guest_selection(self):
+        runner = Suite.__new__(Suite)
+        runner.qemu, runner.sysroot = ["qemu-x86_64"], "/guest-root"
+        with patch.dict(os.environ, {}, clear=True):
+            runner.native = True
+            self.assertEqual(runner.guest("caller", "trap"), ["caller", "trap"])
+            runner.native = False
+            self.assertEqual(runner.guest("caller", "trap"),
+                             ["qemu-x86_64", "-L", "/guest-root", "caller", "trap"])
+
+
+if __name__ == "__main__":
+    unittest.main(verbosity=2)
diff --git a/tools/test.sh b/tools/test.sh
index fad898b..8b6c381 100755
--- a/tools/test.sh
+++ b/tools/test.sh
@@ -2,6 +2,7 @@
 set -eu
 cd "$(dirname "$0")/.."
 # Invoke with quiet-build tools/test.sh on a shared build host.
+python3 tests/native/x86/test_mode_labels.py
 tools/build.sh
 python3 tests/differential.py
 python3 tests/refusals.py