interplane.Get Omega
Read in your language

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

[Cost model] Refuse unsupported operation IDs before prediction or learning

Closed · #704 · open 2026-10-24 18:11 UTC · closed 2026-11-05 01:48 UTC (reason completed)

Imported from GitHub aien-dev/omega-mv#704, by drakestapleton

drakestapleton wrote on 2026-10-24 18:11 UTC

Priority correction: parallel planning-tool lane

Drake's correction, 2026-10-24: this reproduced defect is in planning/modeling tooling, off the current token execution path. Fix it in its existing lane; it is not a prerequisite for measuring or improving live 35B token speed and no token-latency gain is claimed for the fix.

Serving-speed order: (1) measure and qualify cached scratch on the live 35B path, (2) measure fusion against that qualified baseline, (3) implement and qualify the 8-bit output head. Omega #704/#705 are a parallel planning-tool lane and do not block these direct measurements.

Keep the reproduction and correctness acceptance below. Until corrected, affected model outputs must not be used to certify decisions; direct measurements and independently checked evidence can proceed. The seeded .om replacement requirement remains.


Problem and owner

The current cost-model API can report a learned, known prediction for a semantic operation it does not support, and can fold observations of that operation into the matvec model. This is a concrete domain-validation prerequisite for the existing operation-family expansion in #522 and DAG composition in #583, not a new predictor or runtime selector.

Inspected and locally reproduced at public Omega commit 046cc9d2369951f484930be7a28f35fa9ab3b20b. The header declares RX_CM_OPS = 1, matvec only, and describes op as a semantic operation class. rx_cm_cell clamps every out-of-range operation to RX_CM_OPS - 1, currently matvec. Prediction and observation do not reject the unsupported operation before accessing that cell.

This differs from an explicitly declared OTHER core class or saturated pressure bucket. An unknown semantic operation has no established relationship to the last supported operation family.

Reproduction on the unchanged historical API

A transient host-only harness linked the pinned src/runtime/rx_costmodel.c and src/sha256.c with the system C compiler (-std=gnu11 -O2 -lm). It made these calls:

  1. rx_cm_init(model, 1).
  2. Zero-initialize features, then set op=RX_CM_OP_MATVEC, M=N=64, state_bytes=(64*64+64+64)*8, cache_bytes=1048576, core=RX_CM_CORE_X925, eligible=1, need_evidence=1; pressure remains 0.
  3. Call rx_cm_observe(model, features, arm=0, {ps_per_call=1000000, failed=0}) 20 times.
  4. Copy features and change only op to UINT32_MAX.
  5. Predict both feature sets, then observe the unsupported set once.

Actual output:

valid_op=0 cell=0 known=1 samples=20 mean_log2_ps=19.931568195374
unsupported_op=4294967295 cell=0 known=1 samples=20 mean_log2_ps=19.931568195374
unknown_observation_return=0
same_cell_training_samples_after=21

The observation times are synthetic API fixtures, not measured execution times. This proves aliasing and model mutation at the API boundary. It does not establish that the current serving path submits unknown operation IDs. PR #590's current adapter explicitly constructs MATVEC features; this finding must not be described as proof that its existing valid matvec fixture has the wrong operation.

Required behavior

  • Validate semantic operation identity before cell lookup, prediction, decision or training. Unknown IDs produce an explicit unmodeled/refused outcome; no confidence or speed ranking may be borrowed from another operation.
  • Reject unsupported observations before any sufficient statistics, trial/failure counts, exploration counters or durable model state change. Include both successful-looking and failed observations in negative cases.
  • Define safe behavior for the exposed cell-index helper and all its callers; an invalid sentinel must never be used as an array index.
  • Cover the first unsupported ID RX_CM_OPS, UINT32_MAX, valid matvec, pressure residuals and each decision mode. A frozen model has identical serialized state before and after rejected observations.
  • Keep intended OTHER-core and pressure-bucket behavior explicit and separately tested. Do not accidentally turn unsupported semantic operations into a catch-all learned family.
  • Bind operation IDs, feature definitions and model serialization versions when #522 adds a family. Incompatible/stale blobs and unsupported domain combinations refuse; existing valid predictions remain equivalent under the declared numerical contract.

Delivery and evidence

Implement the guard and project-owned regression fixtures in the qualified seeded .om successor under #599. Reconcile PR #696 and current owners before editing. Qualify, migrate consumers, then remove superseded first-party implementation/tests and obsolete dependencies from the active tree. The pinned C API and transient reproduction above are historical migration evidence, not a request to retain a parallel C predictor or test oracle.

Status at filing: HOST_REPRODUCED for the API defect; fix NOT_IMPLEMENTED, GPU execution/performance NOT_RUN. Preserve the failing and corrected outputs with exact source, seed/compiler and fixture identities.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:40 UTC

Recovered GitHub comment. Original issue #704 ยท posting receipt d196e1054f59dc89b62e14c1f7569eb14433d581cc0a9ec46a7dba504a8aeb65

Verified at main d3d1b1bc7e3b970016a2176435f78c8f0251bad1. #934 merged by train r1 (#971, f56a372a). nice -n 19 taskset -c 0-9,15-19 make test-costmodel -> checks 127 failures 0; rx_cm_cell returns RX_CM_CELL_NONE for RX_CM_OPS and UINT32_MAX (tests/runtime/rx_costmodel_unit.c:122-126), predict/observe return RX_CM_ERR_UNSUPPORTED, frozen-model serialized state unchanged after refused observations, blob version/truncation refused, OTHER core and pressure saturation tested separately. Negative control: mutant restore-op-clamp: killed by unsupported-op-not-aliased-to-matvec; make test-dagsim mutant_predict killed. Binding of new operation families is #522's obligation when it adds one; the .om replacement of rx_costmodel.c is tracked by #726. Closed by sweep lane I2 (P-DRA-9).

Sign in to comment