OM-3 function-mode mapping context: bridge native run (Om3BridgeRun, ham lane, 2026-11-10)
Question: omega-mv QUESTIONS 2026-11-09T06:45Z (L835 OM-3 review), option 2: approve the context ABI only after the bridge native runner executes a function-mode unit against the mapping table once, including a failed bind. This is that run. CPU only (anonymous maps, a PROT_NONE reservation at 2^36, memfds); no device, no GPU. Host: Spark, aarch64, cc 13.3.0, Python 3.12.3, pool-10-11 lock, taskset 10-11.
Inputs
- omega-bridge Radicle main a52c35dd (this branch ham/om3-fnmode-run is cut from it).
- omega-mv Radicle main a59a425b, compiler
seed/out/omc6d1b1cf5a44803389a831b67f750ea4cd1c9f53edfde9d6d9241d7352887f1f8 (fixpoint rechecked: main omc compiles mainseed/omc/omc.omto itself, cmp equal). - Bridge pinned context compiler b8f8f1371bc0303f8da02db8b754e085d5dd852620c8d8d676c5769c233d9195
(omega-mv dbedb2ca, tag bridge74-device-omc-dbedb2ca;
src/native.omline 42mappin). - Generator compiler OMEGA_NATIVE_OMC 734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61.
- Spec text: omega-mv
spec/omegese-om3.mdsection 1 at review head 77b58f5e (patch 8d54f60); bridge textdocs/NATIVE-ABI.md"Explicit mapping contexts". - Unit:
tests/native/v2/om3/fnmap.om(new, 40 lines, src sha256 32fcfb5dc2943d7a67528eb40a81e64e971f707b8d2a5338ef39a73fe1e7ddda): an OM-2 function unit, nine exports, uses only mapnew mapdrop mapread mapwrite mapaddr mapget mapset maphold mapbind. - Callers: the existing
tests/native/v2/dev/context.candcleanup.c, unchanged, linked against the librarytools/native --hostgenerated from fnmap.om (export names match).
Run A: bridge as on main, pinned compiler b8f8f137
tools/native --host OUT tests/native/v2/om3/fnmap.om -> rc 0, library b3df81b9...
tools/native OUT2 tests/native/v2/om3/fnmap.om (no --host) -> rc 110, nothing installed
context (context.c on fnmap) -> rc 0, logs/A-pinned-fnmap-context.log
tools/native --host with main omc 6d1b1cf5 as OMEGA_NATIVE_OMC2 -> rc 110 (fingerprint refused)
python3 tests/native/v2/dev/run.py (existing gate) -> rc 0, NATIVE-DEVICE-QUAL PASS, 11 mutants killed
Run B: the compiler on omega-mv main (6d1b1cf5)
The bridge on main refuses that compiler (Run A line 4), so Run B used a scratch worktree with
two pin lines changed and nothing else (mainpin-scratch.diff: src/native.om mappin and
tests/native/v2/run.sh DEVICE_OMC2_PIN). That diff is NOT committed to this branch.
tools/native --host OUT tests/native/v2/om3/fnmap.om -> rc 0, library a10da251...
context (context.c on fnmap) -> rc 0, logs/B-main-fnmap-context.log
tools/native --host with old omc b8f8f137 -> rc 110 (fingerprint refused)
python3 tests/native/v2/dev/run.py (existing gate) -> rc 0, NATIVE-DEVICE-QUAL PASS, 11 mutants killed
Failed bind with failed cleanup (quarantine) on fnmap.om: main seed/omc/omc.om with the one
cleanup munmap (hsys 215 after the access-4 store, line 7420) replaced by getpid (hsys 172),
the same forcing run.py uses (forced-compiler.diff). Compiled by main omc to
0125b53c594d8855a9b3798c68158cee1cb23ce044b3fa51891ece09166464ac; a second scratch worktree
pins that sha (forced-scratch.diff, not committed).
tools/native --host OUT tests/native/v2/om3/fnmap.om -> rc 0, library 48209e67...
cleanup (cleanup.c on forced fnmap) -> rc 0, NATIVE-CLEANUP PASS
NEGCTL cleanup.c on unforced main fnmap library -> rc 134, cleanup.c:22 attach==3 assertion fails
Output lines (both runs identical)
PASS context capacity4098, exhaustion, reuse, cross-context and live-destroy controls
PASS owned fixed bind, foreign/data-map refusal, failed-bind retirement and cleanup controls
NATIVE-CONTEXT PASS capacity4098, owned fixed bind, retirement, context ownership and concurrent contexts
NATIVE-CLEANUP PASS quarantine refuses bind/read/write, busy destroy, retry drop then destroy
NATIVE-DEVICE-QUAL PASS (15 word controls, 2 ABI controls, 5 ioctl controls, 3-unit shared-context fixture, cleanup-failure control, 11 mutants; chip NOT_RUN)
Negative controls
- Stale handle from another generation: context.c
stale(a, bh),stale(b, ah)(handle of the other context) andstale(a, old)(slot 0 reused, same low 13 bits, older generation): mapaddr, mapbind and mapdrop all return bridge status 3 and leave the result untouched. Gate mutantcontext-generation(every context gets ID 1) killed rc -6 on both compilers. - Caller that ignores quarantine: cleanup.c keeps calling mapbind, mapread, mapget, mapwrite and
mapset on the quarantined handle; every call is refused with status 3 and no result write. Gate
mutants
quarantine-bind(rc -6) andquarantine-read(rc -11), which delete the guards, are killed on both compilers. The unforced library fails cleanup.c at its first quarantine assertion (rc 134), so the control distinguishes quarantine from plain retirement. - Capacity: create(0) and create(4099) return OMEGA_BAD_ARG; 4098 live slots succeed (slot index
4097 is the last); the 4099th mapnew returns -24 (EMFILE) with status 0. Gate mutants
context-capacity(4098 -> 128) andhandle-slot-bits(8191 -> 255) killed. - Fingerprint: pinned bridge refuses main omc (110), repinned bridge refuses old omc (110), gate
line
PASS incompatible mapping-compiler format refusedon both.
Not run
Physical device, GPU, NVIDIA driver, x86-64 (native or QEMU), program-mode raw128 tables, and the clause "an absent table pointer may fault" (the entry31 gate mutant is killed by an abort in dcall.c, not observed as a fault). Linux gap-after-MAP_FIXED is not provoked; the run observed the reservation unmapped after successful cleanup (mincore ENOMEM).