interplane.Get Omega
Read in your language

omega-bridge

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

Brought by drakestapleton

ggml: add seeded strict placement admission primitives (host-reference only)

closed 1709d9cb5fe9a0f8 #11 · opened 2026-10-25 00:46 UTC · closed 2026-10-29 19:00 UTC

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

Base 247bcb154c9fca0451de47124402a858d07d20f3 · Head c6ec916473ae61ddc585a208d0f010f2e2f42559

drakestapleton wrote on 2026-10-25 00:46 UTC

Scope

Refs https://github.com/aien-dev/omega-bridge/issues/10. This is stacked on #9, not main, and does not close Bridge #10.

Adds two bounded, handwritten seeded .om placement primitives: selected-node role/op/subtype/backend admission and nonempty count/graph-generation/residency-generation consistency. This is not a loaded GGML backend, operator implementation, or proof of actual whole-graph/GPU/model placement. Roles and generations must be derived by the future trusted frontend adapter; caller labels are not self-authorizing.

Reviewed source and publication identity

  • Exact #9 base: 247bcb154c9fca0451de47124402a858d07d20f3 (feat/native-bindings).
  • Reviewed local head: 0891577d3caabef69ec280d9c0009e72173ae845 (original implementation 3432356 plus reviewed transitive-header correction).
  • Published remote head: c6ec916473ae61ddc585a208d0f010f2e2f42559.
  • Identical final tree: 32a9c91ad17e88ed01555180c62c61f1b8a4eb86.
  • Local git-format mailbox patch SHA-256: 33a2e8ce3e1b1ece846fca7ba0301040a5b0d675668b50090695492378f4c422.

The connected GitHub contents API published the 24 new UTF-8, mode-100644 files as individual commits because this cloud shell has no HTTPS Git push credentials. Commit identities therefore differ; the original reviewed commits remain intact locally. The remote branch was fetched and its complete tree compared byte-for-byte and mode-for-mode with reviewed 0891577: git diff --exit-code 0891577 origin/feat/ggml-strict-placement-v1 passed. All inherited #8/#9 files are unchanged. No force update or history rewrite was performed.

Actual validation — host reference only

OMEGA_REFERENCE_SOURCE=/path/to/pinned/reference/source sh tests/ggml/run-controls.sh
  • PASS: 59 first-party .om assertions.
  • PASS: 8/8 policy mutants caught by exact assertion IDs, not arbitrary failures.
  • PASS: 2/2 tampered interpreter/transitive-header provenance controls refuse before any compiler invocation.
  • PASS: independent final-source review, spec and code quality, including the transitive-header correction.
  • PASS: exact 31/31 local reference C/header dependency closure, artifact hashes, shell syntax and whitespace checks.

Reference source is Omega 697539a577ee7594ba12d905062f2e09cb9cc77c; osc_interp.c SHA-256 3a77128f2cf04670a41c103c8593dd48d052add4b5f804cbc181fe9bf07df26b. The older bounded integer Omegese/OSC parser and C interpreter are explicitly disclosed test oracles, not seeded native execution or a production fallback. Evidence is the actual host run of the identical reviewed tree, not a fabricated run on a different publication commit.

NOT_RUN / remaining prerequisites

  • Seeded native compiler acceptance/execution and native binding calls: NOT_RUN on this x86_64 host; tests/ggml/run-native.sh exits 77. Existing native pin in tools/native is 734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61; no new compiler/credential/package/emulator was installed.
  • Original aggregate/native suites: NOT_RUN before execution because their existing pinned compiler artifacts are absent.
  • GGML retained callback/context/load-unload ABI, the trusted complete prelaunch/reuse frontend hook, device/real operators/model/numerics/hardware/performance: NOT_RUN/BLOCKED, not PASS.
  • Consume the existing Omega #636/#637 and Bridge #8/#9 ABI owners; do not infer retained GGML callbacks from borrowed leaf calls. Reuse Omega #674/#644 descriptor ownership, CUDApp #75 operator closure and benchmarks-mv #42 real-model qualification.

This draft is published under the user's newer explicit implementation-takeover authorization. Required real-pipeline enrollment and native qualification remain pending; no gate waiver, main merge, auto-merge, deployment, driver/firmware or live-service change is requested or claimed. See docs/GGML-PLACEMENT.md and evidence/ggml-placement-v1/.

drakestapleton wrote on 2026-10-29 19:00 UTC

Closing in org cleanup (Drake, 2026-10-29): abandoned: base branch feat/native-bindings closed without merge in PR #9 (superseded by #15 on main), no activity in 4 days with obsolete base. Reopen if still needed.

Apply it

git checkout -b patch-1709d9cb5fe9a0f8 247bcb154c9fca0451de47124402a858d07d20f3
curl -fsSL https://interplane.io/drakestapleton/omega-bridge/patches/1709d9cb5fe9a0f8.patch | git am

Raw patch (mbox) · 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
11
c6ec916473ae61ddc585a208d0f010f2e2f42559
{"kind":"github-import","owner":"aien-dev","repo":"omega-bridge","number":11,"url":"https://github.com/aien-dev/omega-bridge/pull/11","export_sha256":"4437ac3fc1482693a79ee39d37851494fabbe28ae00418da79120f49debe1d7b","imported_utc":"2026-11-18T16:39:55Z"}

Changes

diff --git a/adapters/ggml/strict_node.om b/adapters/ggml/strict_node.om
new file mode 100644
index 0000000..6c45b94
--- /dev/null
+++ b/adapters/ggml/strict_node.om
@@ -0,0 +1,45 @@
+note bridge-strict-v1 selected-node placement policy, GGML API 3 at d327bf1f.
+note Inputs are trusted adapter-derived facts, never self-authorizing labels.
+note role: 1 metadata, 2 token embedding, 3 transformer including internal gathers.
+note backend: 1 declared CPU, 2 exact qualified Omega device; all others refused.
+note detail: GLU subtype (SWIGLU=2), otherwise zero. Returns 0 admit, 1 role,
+note 2 op, 3 detail, 4 placement. Admission is NOT operator implementation support.
+fn strictnode role ulong op ulong detail ulong backend ulong to ulong
+if or lt role 1 gt role 3
+ret 1
+end
+allowed = bool false
+if eq role 1
+allowed = or eq op 0 or eq op 36 or eq op 37 or eq op 38 eq op 39
+end
+if eq role 2
+allowed = eq op 40
+end
+if eq role 3
+allowed = or eq op 2 or eq op 7 or eq op 25 or eq op 29 or eq op 35 or eq op 40 or eq op 42 or eq op 46 or eq op 48 eq op 101
+end
+if not allowed
+ret 2
+end
+if eq op 101
+if ne detail 2
+ret 3
+end
+else
+if ne detail 0
+ret 3
+end
+end
+if eq role 1
+if and ne backend 1 ne backend 2
+ret 4
+end
+end
+if and eq role 2 ne backend 1
+ret 4
+end
+if and eq role 3 ne backend 2
+ret 4
+end
+ret 0
+end
diff --git a/adapters/ggml/strict_snapshot.om b/adapters/ggml/strict_snapshot.om
new file mode 100644
index 0000000..ae4ed80
--- /dev/null
+++ b/adapters/ggml/strict_snapshot.om
@@ -0,0 +1,19 @@
+note bridge-strict-v1 snapshot consistency only. Counts and nonzero generation
+note tokens come from the trusted future whole-graph adapter/manifest owner.
+note Returns 0 admit, 1 empty, 2 missing/extra nodes, 3 stale graph, 4 stale storage.
+note Equal tokens do not authenticate topology, coverage, lifetime or placement.
+fn strictsnapshot observed ulong expected ulong graph ulong currentgraph ulong residency ulong currentresidency ulong to ulong
+if or eq observed 0 eq expected 0
+ret 1
+end
+if ne observed expected
+ret 2
+end
+if or eq graph 0 ne graph currentgraph
+ret 3
+end
+if or eq residency 0 ne residency currentresidency
+ret 4
+end
+ret 0
+end
diff --git a/docs/GGML-PLACEMENT.md b/docs/GGML-PLACEMENT.md
new file mode 100644
index 0000000..13aebb4
--- /dev/null
+++ b/docs/GGML-PLACEMENT.md
@@ -0,0 +1,170 @@
+# GGML strict placement primitives (not a backend)
+
+Refs [Bridge #10](https://github.com/aien-dev/omega-bridge/issues/10).
+These two stateless, handwritten seeded `.om` units implement a bounded part of
+`bridge-strict-v1`. They do not register a GGML backend, execute an operator,
+authenticate a graph, or enforce placement in llama.cpp yet.
+
+## Trust boundary
+
+The future pinned frontend adapter must derive **structural roles**, selected
+nodes, exact backend identity, complete expected node identities, and current
+graph/storage generation tokens from independently validated state. These
+inputs are **trusted facts**, not permissions a caller can grant itself. No
+node name or substring is an input. A caller relabeling an internal gather as
+an embedding can fool this primitive; it must not be exposed as a security or
+whole-graph attestation API.
+
+The hook must see the complete post-allocation graph, before input setting or
+any launch, and repeat admission on reuse/branch/shape/buffer changes. A plugin
+sees only its partition and cannot supply that proof. Count equality alone
+does not prove complete, unique node coverage. Equal generation tokens do not
+prove that the owner correctly invalidated a changed graph or storage object.
+
+## Selected-node API
+
+`strict_node.om` exports one function:
+
+```
+strictnode(role: ulong, op: ulong, detail: ulong, backend: ulong) -> ulong
+```
+
+Only selected nodes enter this function. Selection and input/output/transfer
+accounting remain the future whole-graph adapter's responsibility. File I/O,
+tokenization, host input preparation and sampling are retained frontend work,
+not arbitrary additional GGML compute roles authorized by this function.
+
+| Role | Allowed GGML op values | Placement |
+| --- | --- | --- |
+| 1: metadata/leaf | NONE=0, RESHAPE=36, VIEW=37, PERMUTE=38, TRANSPOSE=39 | CPU=1 or qualified Omega=2 |
+| 2: token-embedding gather | GET_ROWS=40 only | CPU=1 only |
+| 3: transformer/internal/output computation | ADD=2, MUL=7, RMS_NORM=25, MUL_MAT=29, CONT=35, GET_ROWS=40, SET_ROWS=42, SOFT_MAX=46, ROPE=48, GLU=101 | qualified Omega=2 only |
+
+`detail` is the GLU subtype: only `GGML_GLU_OP_SWIGLU=2` is admitted for GLU.
+For every other op it must be zero. This does **not** validate tensor types,
+layouts, dimensions, RoPE/attention/precision parameters, split input arity or
+kernel availability. Those remain separate exact operator/descriptor gates
+under CUDApp #75 and the existing Omega owners. A policy-admitted operation
+must never be advertised as implemented merely because it passes this check.
+
+Unknown roles, operations, subtypes and placements fail closed. Backend value
+2 means the future adapter has already verified the exact available Omega
+device/context; writing the number 2 is not device discovery or authentication.
+
+Return order is stable: 0 = admit; 1 = unknown role; 2 = op not allowed for
+role; 3 = wrong detail; 4 = wrong/missing/foreign backend. The consumer retains
+the node ID and inputs for a node-specific diagnostic. No pointer is retained,
+no allocation occurs, and a refusal does not poison subsequent calls.
+
+## Snapshot API
+
+`strict_snapshot.om` exports one function:
+
+```
+strictsnapshot(observed, expected, graph, currentgraph,
+               residency, currentresidency: ulong) -> ulong
+```
+
+The expected count comes from the separately validated selected-node manifest,
+not from recounting the same untrusted list. Generation tokens are nonzero,
+owner-issued tokens; zero is reserved for unavailable/uninitialized state.
+The caller must supply the live owner tokens, not reuse cached values twice.
+
+Return order: 0 = consistent header; 1 = either count zero; 2 = missing/extra
+node count; 3 = zero/stale graph token; 4 = zero/stale residency token. Counts
+are not capped to a toy graph size. This header check does not replace exact
+node-set comparison, topology/profile hashing, buffer validation or lifetime
+ownership. Use the existing descriptor implementation, not another one here.
+
+## Source and test provenance
+
+The op/subtype numbers above come from llama.cpp
+`d327bf1f0780f87b8c01b367b61853b0c291d7c4`, `ggml/include/ggml.h`, SHA-256
+`2b4dd92fa992cb4ef484917a6c62fef5097698744160ccc09214fd0c459c92c7`.
+API version 3 alone does not qualify another header revision. This is the
+source-derived dense F16 profile, **not an executed model graph census**.
+No model/GGUF hash is invented or frozen by this increment.
+
+First-party policy assertions are in `tests/ggml/placement.om`: 59 executed
+assertions on the successful path (53 distinct failure IDs, with two assertions
+repeated over four metadata ops). They cover intentional CPU embedding versus
+forbidden CPU internal GET_ROWS, missing/foreign devices, CONT versus metadata,
+unsupported ops/subtypes, empty/incomplete snapshots, stale graph/storage and
+valid admission after refusals. Numeric expectations are literal fixtures, not
+computed by the production functions.
+
+An explicit **external C reference-only** route uses the existing Omega
+Omegese frontend, OSC IR emitter and interpreter at
+`697539a577ee7594ba12d905062f2e09cb9cc77c`. Required source hashes and the exact
+compiler-library build inputs are pinned by `reference-source.sha256`.
+The manifest includes the transitive `src/compiler/model/osc_model.h` header;
+compiler dependency-only output confirms 31 local reference C/header inputs,
+with none outside the manifest.
+The interpreter source `src/compiler/osc_interp.c` SHA-256 is
+`3a77128f2cf04670a41c103c8593dd48d052add4b5f804cbc181fe9bf07df26b`.
+`reference_main.c` only loads IR and invokes that existing interpreter: it has
+no policy or expected-answer implementation. Shell coordinates compilation,
+concatenation, note-line removal, and execution. Neither this reference route
+nor a generated C/Python policy is a production runtime fallback.
+
+The reference frontend is an older bounded integer Omegese/OSC subset, not the
+current seeded compiler. It cannot qualify seeded-only facilities, globals,
+host syscalls, pointers, callbacks or floating point. The runner strips only
+whole `note` comment lines before parsing. An initially untyped `false` local
+was refused by that frontend; the shared valid spelling `bool false` is used
+explicitly. All final policy/tests fit its integer, comparison, boolean,
+bounded-for and function-call subset. Reference success does not establish
+native seed acceptance, code generation or native calling-convention behavior.
+
+```
+OMEGA_REFERENCE_SOURCE=/path/to/exact/reference/source sh tests/ggml/run-controls.sh
+```
+
+This command has no download/install/bootstrap/hardware behavior. It runs the
+real `.om` assertions through the reference interpreter, then eight IR-compiled
+policy mutants. First it also checks two source-provenance controls (interpreter
+source and its transitive model header): each must fail its exact hash check
+before a compiler can be invoked. A policy mutant is caught only by its exact expected assertion ID
+with interpreter trap=0 and process exit 1; parse/build failures, traps, signals
+and arbitrary nonzero exits cannot masquerade as successful controls.
+
+For an already authorized Linux AArch64 host with the existing compiler pinned
+by `tools/native`:
+
+```
+OMEGA_NATIVE_OMC=/path/to/existing/qualified/omc sh tests/ggml/run-native.sh
+```
+
+This runs the same combined `.om` test program through the seeded compiler.
+Elsewhere it reports NOT_RUN and exits 77, never silently using the reference
+route. This script has **not** been qualified on AArch64 in this increment.
+The units fit native call v1's one-function-per-unit, up-to-six-ulong-arguments,
+ulong-result surface, but native binding execution remains separately unrun.
+The original `tools/test.sh` suite is unchanged; run both test routes explicitly
+when the corresponding tools are available. No CI or production hook is added.
+
+## Remaining gates and ownership
+
+- Bridge #8/#9 and their native ABI/bindings are reused unchanged; this branch
+  is stacked on #9 head `247bcb154c9fca0451de47124402a858d07d20f3`.
+- Omega #674 owns tensor metadata/lifetime admission. No duplicate validator,
+  allocator, compiler or runtime is implemented here.
+- Omega #636/#637, L481/L484/L410 retain native attachment and callback/lifetime
+  ownership. The existing borrowed-call ABI is not qualified retained GGML
+  context/callback support. No `libggml-omega.so` is fabricated here.
+- The trusted whole-graph prelaunch/reuse hook remains absent. No foreign
+  forwarding edit is made or implicitly authorized by this component.
+- CUDApp #75 owns real operator closure; benchmarks-mv #42 owns real-model and
+  physical qualification. GB10, full model, numerical quality, ABI/DSO loading,
+  actual placement and performance remain NOT_RUN/BLOCKED, not PASS.
+
+Host-reference test success cannot close Bridge #10 or these dependency gates.
+
+## Publication
+
+Bridge #10 routes publication through the existing desk. The consumed Omega
+#637 rules name Renda/L708 as the PR/merge/release desk. This work may be kept on
+an isolated local branch for review; starting implementation is not permission
+to bypass that desk, push a new remote branch or directly open a draft PR. Hand
+the exact reviewed commit and evidence to the existing desk. No publication,
+upstream outreach, merge, release or live-machine change is performed here.
diff --git a/evidence/ggml-placement-v1/README.md b/evidence/ggml-placement-v1/README.md
new file mode 100644
index 0000000..397b43e
--- /dev/null
+++ b/evidence/ggml-placement-v1/README.md
@@ -0,0 +1,67 @@
+# Placement primitive evidence
+
+This is HOST_REFERENCE_ONLY evidence, not native seed, GGML integration, GPU,
+model or hardware qualification. See docs/GGML-PLACEMENT.md for the trust boundary.
+
+Recorded on x86_64 Linux with cc (Debian 14.2.0-19) 14.2.0. Reference source is
+Omega commit 697539a577ee7594ba12d905062f2e09cb9cc77c, materialized separately from
+its exact Git archive. tests/ggml/reference-source.sha256 pins every required
+reference C/header input. No downloaded executable, package, emulator, seed or
+hardware command was used. Shell/C code here is test coordination/reference
+invocation only; production policy and assertions are handwritten .om.
+
+Commands (from repository root):
+
+- `OMEGA_REFERENCE_SOURCE=<pinned source> sh tests/ggml/run-reference.sh`
+  - Node RED: both production units were accepting stubs (`ret 0`), result=2,
+    exit 1: forbidden CPU internal GET_ROWS was admitted.
+  - Snapshot RED: real node policy plus accepting snapshot stub, result=41,
+    exit 1: empty snapshot was admitted.
+  - GREEN: real units and the same assertions, trap=0 result=0, exit 0.
+- `OMEGA_REFERENCE_SOURCE=<pinned source> sh tests/ggml/run-controls.sh`
+  - Final gate includes 2/2 source-provenance controls before compilation, then
+    host assertions pass; 8/8 mutants caught by exact expected assertion
+    IDs with trap=0 and exit 1, not arbitrary process/compiler failures.
+- `OMEGA_REFERENCE_SOURCE=<copied source with one comment appended to osc_interp.c> sh tests/ggml/run-reference.sh`
+  - Source-pin control: exit 1 before compilation; exact changed file FAILED.
+    The modified copy is a controlled test input, not a new trusted reference.
+- `sh tests/ggml/run-native.sh`
+  - Exit 77, NOT_RUN: this host is not Linux AArch64. No native fallback.
+- `sh tools/test.sh`
+  - Exit 1 before original suites: build/bootstrap/omc missing, fingerprint
+    mismatch. Original aggregate suite is NOT_RUN, not a policy regression PASS.
+- `sh tests/native/run.sh`
+  - Exit 2 before execution: required OMEGA_NATIVE_OMC absent. Inherited native
+    ABI qualification is NOT_RUN, not rerun or inherited from author evidence.
+- `sh -n tests/ggml/*.sh` and `git diff --check`: exit 0.
+
+The original untyped `allowed = false` spelling was initially refused by the
+bounded reference frontend (line 5, type unknown); `bool false` fixes that
+reference parsing issue. It is not counted as a semantic test failure or PASS.
+
+Raw output logs and identity.txt record the actual stages. files.sha256 binds
+this increment's source/docs/test inputs and evidence; it excludes itself.
+
+Independent parent review remains pending. No push, PR, merge, installation,
+service modification or issue closure is claimed. Publication goes through the
+existing desk, not directly from this implementation task.
+
+## Independent review correction
+
+The original 30-entry reference manifest omitted transitive
+src/compiler/model/osc_model.h (included by osc_check.h). The source bytes
+matched the pinned repository; this was incomplete reusable gate coverage,
+not evidence of tampering. Before the fix, appending a harmless comment to
+that header still allowed the reference suite to PASS. A new regression
+control also reached the forbidden compiler marker (exit 99), so arbitrary
+build failure was not mistaken for a caught tampered-header input.
+
+The final 31-entry manifest pins that header at SHA-256
+4b59786ec57a7cd9ffa6d99845158d4593ed07c95cdc6be04e6b57143d7920c8.
+Dependency-only cc -MM output confirms 31/31 local C/header inputs, no missing
+or extra files. run-controls.sh now includes run-source-controls.sh: tampered
+interpreter source AND tampered transitive header each must produce the exact
+failed-file hash diagnostic, exit 1 and no compiler invocation. The final
+host-reference.log records 2/2 provenance controls plus the unchanged 59 .om
+assertions and 8/8 policy mutants. Historical red logs remain separate.
+No production .om semantics changed in this correction.
diff --git a/evidence/ggml-placement-v1/files.sha256 b/evidence/ggml-placement-v1/files.sha256
new file mode 100644
index 0000000..66ac86c
--- /dev/null
+++ b/evidence/ggml-placement-v1/files.sha256
@@ -0,0 +1,23 @@
+78d13dc460e0d6c7dbb4d55e94523161db004daa81fb49105a9f30aa670ac6f3  adapters/ggml/strict_node.om
+cf5d2365f7864295b55842ae51b9d97842b07cc119eb9e7fac2e7ab174bdac8f  adapters/ggml/strict_snapshot.om
+509d08804f59669c84f229a3e28257fe11979ba72b452a2948cf7e21b44443cf  evidence/ggml-placement-v1/README.md
+665fe6480faac445f35d432e1f03e28f2968caba055aad0a9b4555a06b8875cc  evidence/ggml-placement-v1/host-reference.log
+53e339ec32c9f7b95152b1cb353ffe85867763c4628b732d4116e7cc7a601d9d  evidence/ggml-placement-v1/identity.txt
+94819db92b9503955a13956a5084eb91d4a4f8008791b3f54ac98e2220ec7f38  evidence/ggml-placement-v1/inherited-native-not-run.log
+946041c10caaebac738b003a8cd9ad539f09e0c6fb5981cb2a5cab0a2c724422  evidence/ggml-placement-v1/inherited-suite-not-run.log
+4f23f51f1d570abfef82560ac69ab8d22f50463f4fc0a3556b33bdf242e8f90e  evidence/ggml-placement-v1/native-not-run.log
+3d3f0005109e7f3352b4794fe80740dd4af80f95e9b76c20ac56b53f4deb4f10  evidence/ggml-placement-v1/node-red.log
+740618c6f0c9772b1350cb2db9543c465ab382628eca027d741de49bf6c3da02  evidence/ggml-placement-v1/reference-input-closure.txt
+a1fbf830d4246d870e4ce789841ab601acd25fd8b7791d0dd8bf2dc7a5f5fc1f  evidence/ggml-placement-v1/snapshot-red.log
+3fa8a70a387c4c74a569a5c0866eb054bbfed921a0c56351da1ff08c3ff6ef3a  evidence/ggml-placement-v1/source-controls-red.log
+c21162752e0e9447063c54afadaabcd769aa943d1dc1e9641847e990d83020b9  evidence/ggml-placement-v1/source-pin-control.log
+0f953a5def57953f06c37ef95074f39ba51321772571d4ab30a39d79f2b750d5  evidence/ggml-placement-v1/source-pin-failure-detail.log
+5cc01cde9d4b67be10d78c8d303ede7f68335614f5c50981f3a306efab782c25  evidence/ggml-placement-v1/transitive-header-red.log
+79362bb17b538e8541b170110a23a4969da93a9e7b8be03df3c8183d81047158  tests/ggml/placement.om
+1cd216096dd6ffc2034164e451fd21a01f24e8f619456bf3250855e4f397ade5  tests/ggml/reference-source.sha256
+7f356730b5463059e0aaa846393dbcbfde2a4e71cf8856c8208f0db04d544d2d  tests/ggml/reference_main.c
+f69285cdb6073e9686d1f0bc5ac56cbb5cfb376de26057048a62f7962ee6835b  tests/ggml/run-controls.sh
+28137dd011880bee6da4a3a76f812a7cd1eecef47eed3da280663cc63ec43293  tests/ggml/run-native.sh
+f4b7c202bc938d26e4a1aa84091480813ad0f500fb3badde7919afcb3ec175eb  tests/ggml/run-reference.sh
+e0b8cfa5a326502edc0f169e4966fdb2c67540fa756b32ebf8c4fbde17e41865  tests/ggml/run-source-controls.sh
+e8a3b1890247c7c1a4264bf8664a9f62d79c3fed3ece0976b2ea9f9daa237a69  docs/GGML-PLACEMENT.md
diff --git a/evidence/ggml-placement-v1/host-reference.log b/evidence/ggml-placement-v1/host-reference.log
new file mode 100644
index 0000000..3c88ab2
--- /dev/null
+++ b/evidence/ggml-placement-v1/host-reference.log
@@ -0,0 +1,16 @@
+CAUGHT tampered src/compiler/osc_interp.c: exact hash refusal before compiler
+CAUGHT tampered src/compiler/model/osc_model.h: exact hash refusal before compiler
+PASS 2/2 source-provenance controls; no native/hardware qualification
+OK bytes=5120 functions=3
+reference trap=0 result=0
+PASS GGML placement policy: host reference only
+NOT_RUN seeded native compilation/execution, GGML callbacks/hook, GPU/model/hardware
+CAUGHT broad-get-rows: assertion 2 (host reference only)
+CAUGHT cpu-transformer: assertion 2 (host reference only)
+CAUGHT cont-as-metadata: assertion 52 (host reference only)
+CAUGHT wrong-glu-subtype: assertion 14 (host reference only)
+CAUGHT missing-nodes: assertion 44 (host reference only)
+CAUGHT stale-graph: assertion 46 (host reference only)
+CAUGHT stale-residency: assertion 48 (host reference only)
+CAUGHT empty-graph: assertion 41 (host reference only)
+PASS 8/8 host-reference controls; no native/hardware qualification
diff --git a/evidence/ggml-placement-v1/identity.txt b/evidence/ggml-placement-v1/identity.txt
new file mode 100644
index 0000000..7ade982
--- /dev/null
+++ b/evidence/ggml-placement-v1/identity.txt
@@ -0,0 +1,17 @@
+reference-source-commit=697539a577ee7594ba12d905062f2e09cb9cc77c
+bridge-base=247bcb154c9fca0451de47124402a858d07d20f3
+host=x86_64-linux
+cc=Debian 14.2.0-19
+claimed-status=HOST_REFERENCE_ONLY
+node-red-exit=1 result=2
+snapshot-red-exit=1 result=41
+host-reference-exit=0 controls=8/8
+new-native-exit=77 NOT_RUN
+inherited-suite-exit=1 NOT_RUN missing original pinned seed
+inherited-native-exit=2 NOT_RUN missing OMEGA_NATIVE_OMC
+cc-sha256=a23ecab8ff08f09ad8c80602c2c5df7f49e09c25905cb8975902e101bf72635f
+reference-interpreter-source-sha256=3a77128f2cf04670a41c103c8593dd48d052add4b5f804cbc181fe9bf07df26b
+reference-local-input-closure=31/31 no missing or extra local files
+source-provenance-controls=2/2 exact hash refusals before compiler
+review-fix-base=3432356654813c31bc24dbd8d81f2698a720fb8e
+review-fix=pin transitive osc_model.h; production semantics unchanged
diff --git a/evidence/ggml-placement-v1/inherited-native-not-run.log b/evidence/ggml-placement-v1/inherited-native-not-run.log
new file mode 100644
index 0000000..851435b
--- /dev/null
+++ b/evidence/ggml-placement-v1/inherited-native-not-run.log
@@ -0,0 +1 @@
+tests/native/run.sh: 13: OMEGA_NATIVE_OMC: set OMEGA_NATIVE_OMC to the seeded omc (omega seed/out/omc, sha256 734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61)
diff --git a/evidence/ggml-placement-v1/inherited-suite-not-run.log b/evidence/ggml-placement-v1/inherited-suite-not-run.log
new file mode 100644
index 0000000..64685c6
--- /dev/null
+++ b/evidence/ggml-placement-v1/inherited-suite-not-run.log
@@ -0,0 +1,2 @@
+sha256sum: build/bootstrap/omc: No such file or directory
+seed fingerprint mismatch
diff --git a/evidence/ggml-placement-v1/native-not-run.log b/evidence/ggml-placement-v1/native-not-run.log
new file mode 100644
index 0000000..dd9047f
--- /dev/null
+++ b/evidence/ggml-placement-v1/native-not-run.log
@@ -0,0 +1 @@
+NOT_RUN seeded GGML policy: requires Linux AArch64; no emulation fallback
diff --git a/evidence/ggml-placement-v1/node-red.log b/evidence/ggml-placement-v1/node-red.log
new file mode 100644
index 0000000..f9f9766
--- /dev/null
+++ b/evidence/ggml-placement-v1/node-red.log
@@ -0,0 +1,2 @@
+OK bytes=3773 functions=3
+reference trap=0 result=2
diff --git a/evidence/ggml-placement-v1/reference-input-closure.txt b/evidence/ggml-placement-v1/reference-input-closure.txt
new file mode 100644
index 0000000..e02119a
--- /dev/null
+++ b/evidence/ggml-placement-v1/reference-input-closure.txt
@@ -0,0 +1,2 @@
+REFERENCE_LOCAL_DEPENDENCIES 31 PINNED 31 MISSING [] EXTRA []
+PASS exact transitive local dependency closure
diff --git a/evidence/ggml-placement-v1/snapshot-red.log b/evidence/ggml-placement-v1/snapshot-red.log
new file mode 100644
index 0000000..5834983
--- /dev/null
+++ b/evidence/ggml-placement-v1/snapshot-red.log
@@ -0,0 +1,2 @@
+OK bytes=4878 functions=3
+reference trap=0 result=41
diff --git a/evidence/ggml-placement-v1/source-controls-red.log b/evidence/ggml-placement-v1/source-controls-red.log
new file mode 100644
index 0000000..33b12ce
--- /dev/null
+++ b/evidence/ggml-placement-v1/source-controls-red.log
@@ -0,0 +1,2 @@
+CAUGHT tampered src/compiler/osc_interp.c: exact hash refusal before compiler
+INVALID/UNCAUGHT tampered src/compiler/model/osc_model.h: rc=99 (hash refusal before compiler required)
diff --git a/evidence/ggml-placement-v1/source-pin-control.log b/evidence/ggml-placement-v1/source-pin-control.log
new file mode 100644
index 0000000..9202a40
--- /dev/null
+++ b/evidence/ggml-placement-v1/source-pin-control.log
@@ -0,0 +1 @@
+sha256sum: WARNING: 1 computed checksum did NOT match
diff --git a/evidence/ggml-placement-v1/source-pin-failure-detail.log b/evidence/ggml-placement-v1/source-pin-failure-detail.log
new file mode 100644
index 0000000..17a34d7
--- /dev/null
+++ b/evidence/ggml-placement-v1/source-pin-failure-detail.log
@@ -0,0 +1,30 @@
+src/compiler/osc_a64.c: OK
+src/compiler/osc_a64.h: OK
+src/compiler/osc_alloc.c: OK
+src/compiler/osc_alloc.h: OK
+src/compiler/osc_cg.c: OK
+src/compiler/osc_cg.h: OK
+src/compiler/osc_check.c: OK
+src/compiler/osc_check.h: OK
+src/compiler/osc_diag.c: OK
+src/compiler/osc_diag.h: OK
+src/compiler/osc_front.c: OK
+src/compiler/osc_front.h: OK
+src/compiler/osc_interp.c: FAILED
+src/compiler/osc_interp.h: OK
+src/compiler/osc_ir.c: OK
+src/compiler/osc_ir.h: OK
+src/compiler/osc_lex.c: OK
+src/compiler/osc_lex.h: OK
+src/compiler/osc_lower.c: OK
+src/compiler/osc_lower.h: OK
+src/compiler/osc_native.c: OK
+src/compiler/osc_native.h: OK
+src/compiler/osc_parse.c: OK
+src/compiler/osc_parse.h: OK
+src/compiler/osc_rt.c: OK
+src/compiler/osc_rt.h: OK
+tools/omegese/omegese.c: OK
+tools/omega_emit/omega_emit.c: OK
+src/sha256.c: OK
+src/sha256.h: OK
diff --git a/evidence/ggml-placement-v1/transitive-header-red.log b/evidence/ggml-placement-v1/transitive-header-red.log
new file mode 100644
index 0000000..b979a52
--- /dev/null
+++ b/evidence/ggml-placement-v1/transitive-header-red.log
@@ -0,0 +1,4 @@
+OK bytes=5120 functions=3
+reference trap=0 result=0
+PASS GGML placement policy: host reference only
+NOT_RUN seeded native compilation/execution, GGML callbacks/hook, GPU/model/hardware
diff --git a/tests/ggml/placement.om b/tests/ggml/placement.om
new file mode 100644
index 0000000..976c1d3
--- /dev/null
+++ b/tests/ggml/placement.om
@@ -0,0 +1,172 @@
+note Literal GGML API-3 op values from ggml.h at d327bf1f. Each nonzero
+note return identifies the first failed assertion. No implementation helpers
+note derive expected answers. Only selected GGML nodes enter strictnode.
+fn main to int
+if ne strictnode 2 40 0 1 0
+ret 1
+end
+if ne strictnode 3 40 0 1 4
+ret 2
+end
+if ne strictnode 3 40 0 2 0
+ret 3
+end
+if ne strictnode 2 40 0 2 4
+ret 4
+end
+if ne strictnode 2 2 0 1 2
+ret 5
+end
+if ne strictnode 1 40 0 1 2
+ret 6
+end
+if ne strictnode 1 35 0 1 2
+ret 52
+end
+if ne strictnode 1 34 0 1 2
+ret 53
+end
+if ne strictnode 3 2 0 1 4
+ret 7
+end
+if ne strictnode 3 42 0 3 4
+ret 8
+end
+if ne strictnode 3 29 0 0 4
+ret 9
+end
+if ne strictnode 0 40 0 1 1
+ret 10
+end
+if ne strictnode 4 40 0 1 1
+ret 11
+end
+if ne strictnode 18446744073709551615 40 0 1 1
+ret 12
+end
+if ne strictnode 3 101 2 2 0
+ret 13
+end
+if ne strictnode 3 101 0 2 3
+ret 14
+end
+if ne strictnode 3 101 3 2 3
+ret 15
+end
+if ne strictnode 3 92 10 2 2
+ret 16
+end
+if ne strictnode 3 74 0 2 2
+ret 17
+end
+if ne strictnode 3 34 0 2 2
+ret 18
+end
+if ne strictnode 3 30 0 2 2
+ret 19
+end
+if ne strictnode 3 102 0 2 2
+ret 20
+end
+if ne strictnode 3 18446744073709551615 0 2 2
+ret 21
+end
+if ne strictnode 3 2 1 2 3
+ret 22
+end
+if ne strictnode 1 0 1 1 3
+ret 23
+end
+if ne strictnode 2 40 1 1 3
+ret 24
+end
+if ne strictnode 1 0 0 0 4
+ret 25
+end
+if ne strictnode 1 36 0 3 4
+ret 26
+end
+if ne strictnode 3 2 0 18446744073709551615 4
+ret 27
+end
+note Every admitted metadata operation on both permitted backends.
+if ne strictnode 1 0 0 1 0
+ret 28
+end
+if ne strictnode 1 0 0 2 0
+ret 29
+end
+for op ulong 4
+x = add op 36
+if ne strictnode 1 x 0 1 0
+ret 30
+end
+if ne strictnode 1 x 0 2 0
+ret 31
+end
+end
+note Every source-derived transformer compute family, no capability claim.
+if ne strictnode 3 2 0 2 0
+ret 32
+end
+if ne strictnode 3 7 0 2 0
+ret 33
+end
+if ne strictnode 3 25 0 2 0
+ret 34
+end
+if ne strictnode 3 29 0 2 0
+ret 35
+end
+if ne strictnode 3 35 0 2 0
+ret 36
+end
+if ne strictnode 3 42 0 2 0
+ret 37
+end
+if ne strictnode 3 46 0 2 0
+ret 38
+end
+if ne strictnode 3 48 0 2 0
+ret 39
+end
+note Snapshot reuse and complete-node-count admission (not authentication).
+if ne strictsnapshot 1000 1000 7 7 11 11 0
+ret 40
+end
+if ne strictsnapshot 0 0 7 7 11 11 1
+ret 41
+end
+if ne strictsnapshot 0 1000 7 7 11 11 1
+ret 42
+end
+if ne strictsnapshot 1000 0 7 7 11 11 1
+ret 43
+end
+if ne strictsnapshot 999 1000 7 7 11 11 2
+ret 44
+end
+if ne strictsnapshot 1001 1000 7 7 11 11 2
+ret 45
+end
+if ne strictsnapshot 1000 1000 8 7 11 11 3
+ret 46
+end
+if ne strictsnapshot 1000 1000 0 0 11 11 3
+ret 47
+end
+if ne strictsnapshot 1000 1000 7 7 12 11 4
+ret 48
+end
+if ne strictsnapshot 1000 1000 7 7 0 0 4
+ret 49
+end
+note Refusal does not poison later admission; revalidated new generations.
+if ne strictsnapshot 1000 1000 8 8 12 12 0
+ret 50
+end
+if ne strictnode 3 40 0 2 0
+ret 51
+end
+ret 0
+end
diff --git a/tests/ggml/reference-source.sha256 b/tests/ggml/reference-source.sha256
new file mode 100644
index 0000000..b26bf92
--- /dev/null
+++ b/tests/ggml/reference-source.sha256
@@ -0,0 +1,31 @@
+fd260777424f59e88d88c51c84ef65d595b4dbd28a6486894dc6229a1f91cd27  src/compiler/osc_a64.c
+974d3af2e134238bd9379f8bc97cb3bfc6c0f1a7fdf6849b9a42aef6aee0f744  src/compiler/osc_a64.h
+fc23d7e46aa9516d1dbe83843faec0f8011b95fa0f098aae93cd2b0da44935d3  src/compiler/osc_alloc.c
+3bfd5dbd110a6fccaae0f2c2e777e641832c407d264a457bf36f27fa37d18ed7  src/compiler/osc_alloc.h
+8a51ba40e318df4b9e96d948537927e6153961343fdc68b8391570802ff5e96c  src/compiler/osc_cg.c
+aa005a48711b639147078ba69248383f2f932715a13b5dfbcbecd8a8c9b9adfc  src/compiler/osc_cg.h
+906745e5bb2e05704ca773be0e2bf43f97d60b2aea1afe13f4db1721b471538a  src/compiler/osc_check.c
+781f0156d3b6d3eee2b17618a6c980008635ed1cb60d291f409d37dc078787e4  src/compiler/osc_check.h
+525c0655942efbd3d52da1147f0d5c65602a2a623eac4b9d4e59efbaf7ce61bc  src/compiler/osc_diag.c
+c885c369c077f47b7ae6a684c4ce6d2e5a733527690d500d8e6a746c209b7296  src/compiler/osc_diag.h
+2f4fd632916ed035ad27f270e17d9a3299cd8250df7c9392ac4f1d8630b7a5dc  src/compiler/osc_front.c
+1d0926ea344985d4d7426f272edc986ee283a9f14508168937d1169e811ca513  src/compiler/osc_front.h
+3a77128f2cf04670a41c103c8593dd48d052add4b5f804cbc181fe9bf07df26b  src/compiler/osc_interp.c
+fd04c88fe9a63578ee471532c8304fce764a80a769e4017dae8e35e4c109c4f9  src/compiler/osc_interp.h
+02739492b9c9c1c0ea153ad1f166e48c5ff98e0f36fff45edde7e2aa8518237a  src/compiler/osc_ir.c
+a1bc6b8524c58d67bf7f3ce762070c9a2891c46b12a10c4bba15718f5b50ce27  src/compiler/osc_ir.h
+0d150434c2e0fd51c49d46bc3a6df82c3a9b17c9d89bca26eb605c7d00b0e12c  src/compiler/osc_lex.c
+8b3bcfddf3a8eab115abed7ca26b4afb5086866a07732da78d32e85925800114  src/compiler/osc_lex.h
+10782f70625a7124d62149471986eaeb58da72606aa4467cc7b3aa7d0397ad26  src/compiler/osc_lower.c
+0ab100acae1d1015aeed91606964155e58d79f16b5a428b89966c6a559d81c9b  src/compiler/osc_lower.h
+304372ca64fbc3a4fcfb1957aee13a36e4533a94e207a56f7fd3ecc58d6ad43c  src/compiler/osc_native.c
+fccfdbc158a2fdedf6cfc6d74306f75abacb87e5dbe85c3ca6af32594c7c6f49  src/compiler/osc_native.h
+66088d7df339bd488213094c42822e87c46c7e97eb4393e16c5df90964b15646  src/compiler/osc_parse.c
+e652106f697d111246f21044e3dd07c7660b9aafebdeb877eb94a427e4ba2bbd  src/compiler/osc_parse.h
+5d8df7134b898596335cd8691708f4ab74bcf69e38632ec47521fe9e31047faa  src/compiler/osc_rt.c
+0033cf5389260a38f0e05e4f09bdd6b16de2e6f5922f802a7070c640e6cd8023  src/compiler/osc_rt.h
+4b59786ec57a7cd9ffa6d99845158d4593ed07c95cdc6be04e6b57143d7920c8  src/compiler/model/osc_model.h
+dff57b53d24e56bcc92945ec92520c5ef3149ef562916bf09d2f89b4f26afa4d  tools/omegese/omegese.c
+173399dfd9c2160d5c153cea9b6e6eee6390bd20190e08977cbc6dc140136245  tools/omega_emit/omega_emit.c
+a8fb88611e68ea5a876ee1658e1665994a03bfbed215983618d769f0e7205473  src/sha256.c
+2e6d473170f4d2d2ce90c64a2c930648f2e12cceda0af676c98528bd64b4879f  src/sha256.h
diff --git a/tests/ggml/reference_main.c b/tests/ggml/reference_main.c
new file mode 100644
index 0000000..e355dab
--- /dev/null
+++ b/tests/ggml/reference_main.c
@@ -0,0 +1,33 @@
+/* Test-only adapter to the existing, separately pinned Omega C reference
+ * interpreter. No placement policy or expected answers live here. This is
+ * not the seeded compiler, native Omega execution, or a production runtime. */
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "osc_interp.h"
+
+int main(int argc, char **argv) {
+    if (argc != 2) return 2;
+    FILE *f = fopen(argv[1], "rb");
+    if (!f) return 2;
+    if (fseek(f, 0, SEEK_END)) return 2;
+    long size = ftell(f);
+    if (size <= 0 || size > 16777216 || fseek(f, 0, SEEK_SET)) return 2;
+    unsigned char *bytes = malloc((size_t)size);
+    OscUnit *unit = calloc(1, sizeof *unit);
+    OscRt *rt = calloc(1, sizeof *rt);
+    if (!bytes || !unit || !rt) return 2;
+    if (fread(bytes, 1, (size_t)size, f) != (size_t)size || fclose(f)) return 2;
+    if (osc_ir_decode(bytes, (size_t)size, unit)) return 2;
+    int entry = -1;
+    for (unsigned i = 0; i < unit->nfuncs; i++)
+        if (!strcmp(unit->funcs[i].name, "main")) entry = (int)i;
+    if (entry < 0) return 2;
+    osc_rt_init(rt);
+    uint64_t result = UINT64_MAX;
+    int trap = osc_interp_run(unit, entry, NULL, 0, rt, &result);
+    printf("reference trap=%d result=%" PRIu64 "\n", trap, result);
+    free(bytes); free(unit); free(rt);
+    return trap == 0 && result == 0 ? 0 : 1;
+}
diff --git a/tests/ggml/run-controls.sh b/tests/ggml/run-controls.sh
new file mode 100644
index 0000000..0cc4873
--- /dev/null
+++ b/tests/ggml/run-controls.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# IR/reference-only policy mutants. A build failure, trap, signal, or arbitrary
+# nonzero status is INVALID, never a caught control. Expected case IDs are
+# independent literal assertions in placement.om.
+set -eu
+ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
+sh "$ROOT/tests/ggml/run-source-controls.sh"
+sh "$ROOT/tests/ggml/run-reference.sh"
+OUT=$ROOT/build/ggml-reference
+mkdir -p "$OUT/controls"
+control() {
+    name=$1 want=$2 unit=$3 expression=$4
+    dir=$OUT/controls/$name
+    mkdir -p "$dir"
+    sed "$expression" "$ROOT/adapters/ggml/$unit.om" > "$dir/mutant.om"
+    if cmp -s "$dir/mutant.om" "$ROOT/adapters/ggml/$unit.om"; then
+        echo "INVALID $name: source unchanged" >&2; exit 1
+    fi
+    if [ "$unit" = strict_node ]; then
+        cat "$dir/mutant.om" "$ROOT/adapters/ggml/strict_snapshot.om" "$ROOT/tests/ggml/placement.om"
+    else
+        cat "$ROOT/adapters/ggml/strict_node.om" "$dir/mutant.om" "$ROOT/tests/ggml/placement.om"
+    fi | sed '/^note /d' > "$dir/placement.om"
+    "$OUT/omegese" emit "$dir/placement.om" "$dir/placement.json" > "$dir/build.log"
+    "$OUT/omega_emit" emit "$dir/placement.json" "$dir/placement.oscir" >> "$dir/build.log"
+    rc=0
+    "$OUT/reference" "$dir/placement.oscir" > "$dir/run.log" 2>&1 || rc=$?
+    if [ "$rc" != 1 ] || [ "$(cat "$dir/run.log")" != "reference trap=0 result=$want" ]; then
+        echo "INVALID/UNCAUGHT $name: rc=$rc, expected assertion $want" >&2
+        cat "$dir/run.log" >&2; exit 1
+    fi
+    echo "CAUGHT $name: assertion $want (host reference only)"
+}
+control broad-get-rows 2 strict_node '/^fn strictnode /a\
+if eq op 40\
+ret 0\
+end'
+control cpu-transformer 2 strict_node 's/^if and eq role 3 ne backend 2$/if bool false/'
+control cont-as-metadata 52 strict_node 's/allowed = or eq op 0 /allowed = or eq op 35 or eq op 0 /'
+control wrong-glu-subtype 14 strict_node 's/^if ne detail 2$/if bool false/'
+control missing-nodes 44 strict_snapshot 's/^if ne observed expected$/if bool false/'
+control stale-graph 46 strict_snapshot 's/^if or eq graph 0 ne graph currentgraph$/if eq graph 0/'
+control stale-residency 48 strict_snapshot 's/^if or eq residency 0 ne residency currentresidency$/if eq residency 0/'
+control empty-graph 41 strict_snapshot 's/^if or eq observed 0 eq expected 0$/if bool false/'
+echo 'PASS 8/8 host-reference controls; no native/hardware qualification'
diff --git a/tests/ggml/run-native.sh b/tests/ggml/run-native.sh
new file mode 100644
index 0000000..8eb50f3
--- /dev/null
+++ b/tests/ggml/run-native.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Standalone seeded .om qualification, only on an already authorized AArch64 host.
+# No installation, hardware command, DSO/callback qualification, or oracle fallback.
+set -eu
+ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
+if [ "$(uname -s):$(uname -m)" != Linux:aarch64 ]; then
+    echo 'NOT_RUN seeded GGML policy: requires Linux AArch64; no emulation fallback'
+    exit 77
+fi
+PIN=$(sed -n 's/^PIN=//p' "$ROOT/tools/native")
+OMC=${OMEGA_NATIVE_OMC:?set OMEGA_NATIVE_OMC to the existing pinned seeded compiler}
+[ "$(sha256sum < "$OMC" | cut -d' ' -f1)" = "$PIN" ] || {
+    echo 'FAIL seeded compiler fingerprint mismatch' >&2; exit 1;
+}
+OUT=$ROOT/build/ggml-native
+mkdir -p "$OUT"
+cat "$ROOT/adapters/ggml/strict_node.om" "$ROOT/adapters/ggml/strict_snapshot.om" \
+    "$ROOT/tests/ggml/placement.om" > "$OUT/placement.om"
+"$OMC" < "$OUT/placement.om" > "$OUT/placement.tmp"
+file "$OUT/placement.tmp" | grep -q 'ELF 64-bit.*ARM aarch64'
+chmod +x "$OUT/placement.tmp"
+mv "$OUT/placement.tmp" "$OUT/placement"
+"$OUT/placement"
+echo 'PASS standalone seeded GGML policy program'
+echo 'NOT_RUN GGML callback ABI, whole-graph hook, GPU/model/hardware'
diff --git a/tests/ggml/run-reference.sh b/tests/ggml/run-reference.sh
new file mode 100644
index 0000000..329b3e4
--- /dev/null
+++ b/tests/ggml/run-reference.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Explicit external C reference route only. Never an automatic native fallback.
+# OMEGA_REFERENCE_SOURCE is source from omega-mv 697539a577ee7594ba12d905062f2e09cb9cc77c.
+# No network, install, opaque executable, seed bootstrap, or GPU command here.
+set -eu
+ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
+SRC=${OMEGA_REFERENCE_SOURCE:?set OMEGA_REFERENCE_SOURCE to the pinned Omega reference source}
+SRC=$(CDPATH= cd -- "$SRC" && pwd)
+OUT=$ROOT/build/ggml-reference
+mkdir -p "$OUT"
+(cd "$SRC" && sha256sum -c "$ROOT/tests/ggml/reference-source.sha256") > "$OUT/source-check.log"
+CC=${CC:-cc}
+"$CC" -std=gnu11 -O2 -Wall -Wextra -Werror -D_GNU_SOURCE \
+    "$SRC/tools/omegese/omegese.c" -o "$OUT/omegese"
+# Freeze the compiler-library list from Omega mk/omega-emit.mk in the manifest.
+# Do not compile additional unpinned .c files merely because they are present.
+# No generated C/Python translation of the policy is used.
+set --
+for file in $(sed -n 's/^[0-9a-f]*  \(src\/compiler\/.*\.c\)$/\1/p' "$ROOT/tests/ggml/reference-source.sha256"); do
+    set -- "$@" "$SRC/$file"
+done
+"$CC" -std=gnu11 -O2 -Wall -Wextra -Werror -D_GNU_SOURCE \
+    -I"$SRC/src" -I"$SRC/src/compiler" "$SRC/tools/omega_emit/omega_emit.c" \
+    "$@" "$SRC/src/sha256.c" -lm -o "$OUT/omega_emit"
+"$CC" -std=gnu11 -O2 -Wall -Wextra -Werror -D_GNU_SOURCE \
+    -I"$SRC/src" -I"$SRC/src/compiler" "$ROOT/tests/ggml/reference_main.c" \
+    "$@" "$SRC/src/sha256.c" -lm -o "$OUT/reference"
+cat "$ROOT/adapters/ggml/strict_node.om" "$ROOT/adapters/ggml/strict_snapshot.om" \
+    "$ROOT/tests/ggml/placement.om" | sed '/^note /d' > "$OUT/placement.om"
+"$OUT/omegese" emit "$OUT/placement.om" "$OUT/placement.json"
+"$OUT/omega_emit" emit "$OUT/placement.json" "$OUT/placement.oscir"
+"$OUT/reference" "$OUT/placement.oscir"
+echo 'PASS GGML placement policy: host reference only'
+echo 'NOT_RUN seeded native compilation/execution, GGML callbacks/hook, GPU/model/hardware'
diff --git a/tests/ggml/run-source-controls.sh b/tests/ggml/run-source-controls.sh
new file mode 100644
index 0000000..84dd98a
--- /dev/null
+++ b/tests/ggml/run-source-controls.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Reference source-provenance controls, including a transitive local header.
+# Both must fail at the hash gate, before invoking any C compiler.
+set -eu
+ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
+SRC=${OMEGA_REFERENCE_SOURCE:?set OMEGA_REFERENCE_SOURCE to the pinned reference source}
+SRC=$(CDPATH= cd -- "$SRC" && pwd)
+mkdir -p "$ROOT/build"
+OUT=$(mktemp -d "$ROOT/build/ggml-source-controls.XXXXXXXX")
+mkdir -p "$OUT/source"
+# Include the known transitive header explicitly so this regression also runs
+# against the defective 30-entry manifest rather than failing from missing C types.
+for file in $(sed 's/^[0-9a-f]*  //' "$ROOT/tests/ggml/reference-source.sha256") src/compiler/model/osc_model.h; do
+    mkdir -p "$OUT/source/$(dirname "$file")"
+    cp "$SRC/$file" "$OUT/source/$file"
+done
+cat > "$OUT/deny-cc" <<'SCRIPT'
+#!/bin/sh
+: > "${GGML_CC_MARKER:?}"
+exit 99
+SCRIPT
+chmod +x "$OUT/deny-cc"
+for file in src/compiler/osc_interp.c src/compiler/model/osc_model.h; do
+    cp "$SRC/$file" "$OUT/source/$file"
+    printf '\n/* deliberate source-provenance control */\n' >> "$OUT/source/$file"
+    rm -f "$OUT/compiler-invoked"
+    rc=0
+    GGML_CC_MARKER="$OUT/compiler-invoked" CC="$OUT/deny-cc" \
+        OMEGA_REFERENCE_SOURCE="$OUT/source" sh "$ROOT/tests/ggml/run-reference.sh" \
+        > "$OUT/$(basename "$file").log" 2>&1 || rc=$?
+    if [ "$rc" != 1 ] || [ -e "$OUT/compiler-invoked" ] || \
+        ! grep -Fx "$file: FAILED" "$ROOT/build/ggml-reference/source-check.log" > /dev/null; then
+        echo "INVALID/UNCAUGHT tampered $file: rc=$rc (hash refusal before compiler required)" >&2
+        exit 1
+    fi
+    cp "$ROOT/build/ggml-reference/source-check.log" "$OUT/$(basename "$file").hash.log"
+    cp "$SRC/$file" "$OUT/source/$file"
+    echo "CAUGHT tampered $file: exact hash refusal before compiler"
+done
+echo 'PASS 2/2 source-provenance controls; no native/hardware qualification'