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

Reject inverted buffer lifetimes that hide memory-capacity overflow in offline DAG certificates

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

Imported from GitHub aien-dev/omega-mv#705, 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 the offline planning evaluator, 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 masking counterexample and correctness acceptance below. Invalid capacity certificates cannot qualify decisions, but direct hardware measurements and independently checked evidence can proceed. The seeded .om replacement requirement remains.


Problem and scope

The offline DAG evaluator in PR #590 can report OK for a model whose valid buffers exceed its memory capacity. An invalid buffer lifetime is allowed to contribute negative live bytes, hiding the overflow. This is a capacity-certificate correctness bug in the implementation under #583, separate from future scheduling optimization.

Evidence: reproduced on an ordinary host from the unchanged PR #590 commit 3bd56731c5517e2a9c8f195955c71e73dc6f9269 on 2026-10-24. All quantities in the reproducer are synthetic. No GPU was executed and no hardware performance claim follows from this reproduction.

Pinned implementation evidence

Self-contained historical reproduction

Use an isolated checkout at 3bd56731c5517e2a9c8f195955c71e73dc6f9269. These commands reproduce the pinned C implementation as historical evidence; retaining it in the final active implementation is not the delivery target.

cc -std=gnu11 -O2 -Isrc -Itools/dagsim \
  tools/dagsim/dagsim.c tools/dagsim/dagsim_cli.c \
  src/runtime/rx_costmodel.c src/sha256.c \
  -lm -o /tmp/dagsim-capacity-repro

cat > /tmp/dagsim-negative-masks-overflow.oev <<'OEV'
oev version=1
machine id=toy soc=toy cores=1 mem_bytes=100 prov=synthetic src=analytical-fixture
build repo=omega-mv sha=3bd56731c5517e2a9c8f195955c71e73dc6f9269
resource id=cpu kind=compute slots=1 prov=synthetic src=analytical-fixture
resource id=mem kind=capacity cap=100 prov=synthetic src=analytical-fixture
op id=A kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
op id=B kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
op id=C kind=compute engine=cpu t_ns=10 prov=synthetic src=analytical-fixture
buffer id=inverted bytes=80 cap=mem first=C last=A
buffer id=real1 bytes=80 cap=mem first=B last=B
buffer id=real2 bytes=80 cap=mem first=B last=B
energy instrument=none
OEV

/tmp/dagsim-capacity-repro eval \
  /tmp/dagsim-negative-masks-overflow.oev \
  --asof 2026-10-24

The single compute slot schedules A at 0-10 ns, B at 10-20 ns, and C at 20-30 ns. inverted is therefore freed at 10 ns but not allocated until 20 ns. Its -80 B contribution offsets the two valid 80 B buffers during B.

Observed result, process exit status 0:

{
  "status": "OK",
  "makespan_ns": {"nominal": 30},
  "peak_live_bytes": {"mem": {"bytes": 80, "at_ns": 10, "cap": 100}}
}

The valid buffers alone require 160 B during B, above the 100 B capacity. Removing the two valid buffers also makes the malformed 80 B lifetime appear to have a zero-byte peak. Neither result is a valid capacity certificate.

Required behavior

Validate resolved lifetimes before allowing them into any capacity calculation or candidate ranking. Refuse an end time earlier than its start, name the buffer and endpoint operations, and report their resolved times. Specify the interval and zero-duration convention; do not let same-time event ordering introduce negative occupancy. A malformed lifetime must never subtract capacity from another buffer.

Keep the existing chosen-schedule semantics and legitimate reuse of memory at completion boundaries. This issue does not add a scheduler, optimality oracle, or runtime authority.

Acceptance

  • The full fixture above is rejected for its inverted lifetime before a feasible-capacity certificate or ranking is emitted.
  • A lone inverted buffer is rejected rather than accepted with peak 0 B.
  • Removing the malformed buffer from the fixture yields REFUSED_CAPACITY for the two valid overlapping 80 B buffers.
  • A valid non-overlapping pair still fits, including a completion/allocation tie under the documented interval convention.
  • Explicit coverage includes zero-duration operations/buffers, omitted first/last, and deterministic rejection details. Do not apply a transient negative-ledger assertion that conflicts with the chosen zero-duration convention.
  • No accepted lifetime ledger has negative live capacity or permits malformed lifetimes to offset valid allocations. An independent reviewer reproduces the regression and correction.
  • Record the source, seed/compiler, generated binary, fixture, command, output, and qualification identities. Keep host reproduction, chip qualification, and measured performance statuses separate.

Delivery and ownership

Coordinate PR #590 and #583 with the existing #599 replacement owner. Implement and qualify the correction and all project-owned regression logic in the seeded .om first-party toolchain. Switch the existing consumers to the qualified replacement, then delete superseded first-party implementations, test logic, wrappers, fallbacks, and obsolete build dependencies from the active tree. C above is pinned historical evidence only, not a retained reference path. Non-executable OEV fixtures and immutable historical receipts may remain as data.

Follow the governing .om correction in #583, architecture #300 deletion/dependency evidence, repository instructions, and the existing PR desk. No new optimizer service, GPU execution path, or runtime scheduling authority is introduced by this fix.

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

Recovered GitHub comment. Original issue #705 ยท posting receipt 59829d017a77a046f8b9804d75b83cf769024ea926cf1b8626f160aedc85b25b

Verified at main d3d1b1bc7e3b970016a2176435f78c8f0251bad1. #937 merged by train r1 (#971, f56a372a). nice -n 19 taskset -c 0-9,15-19 make test-dagsim -> dagsim_unit 203 checks 0 failed; run_cli: inverted lifetime exits 1 with REFUSED_LIFETIME, lone inverted lifetime exits 1, overlap is REFUSED_CAPACITY, tie OK peak 80, inverted row refused not ranked OK, valid row still ranked. Negative control: mutant killed: inverted_lifetime_masks_overflow. Half-open [start,end) convention documented in spec/offline-evidence-v1.md. Reproduced independently by sweep lane I2 on Spark aarch64; host only, no chip claim. The .om replacement of dagsim.c is tracked by #726.

Sign in to comment