Reproduced code-backed gap
omega_discovery.c::omega_refactor_program copies orig->realization.code_bytes to out_refactored->realization.code_bytes, keeps code_len unchanged and only subtracts match_len_insns-1 from cost.insn_count. That does not compress the final executable! Closed historical M11 #17 remains an authentic prior qualification; do not rewrite it or label it a measured byte reduction.
Goal
Implement a new seeded .om lowering for a small exact, side-effect-free, typed profile such that a repeated semantic subroutine is stored once and actual bytes emitted for calls + body + tables are fewer where economically beneficial. Preserve the original semantic identity and tie each machine-code realization to a distinct realization identity.
Delivery
- Freeze one legal original pure-u64 program set (>=10 examples and deliberately bad cases); choose a repeated 4-15-op slice with varying parameters, alongside an exact duplicate control. Align current seeded AArch64 function-call ABI with Omega #636 and #621; no new foreign compiler.
- Implement real code emission through the current compiler owner: one procedure body, bounded actual call instructions, typed bound constants, linker/relocation where required. No "estimated" code size masquerading as physical size; return original when factoring costs more or correctness unsupported.
- Independently inspect emitted binary lengths/opcode structure and execution outputs on public held-out inputs, including aliasing, overflow-wrap, error/refusal, recursion limit and cross-program collisions where applicable. Test out-of-range calls, malformed ID, stale body, wrong parameter.
- Charge dictionary size, code/metadata/alignment, branch/call, register spill/clobber, verifier/runtime overhead, cold compile/setup amortization, and cache footprint. Compare stored archive bytes, emitted executable bytes, dynamic instructions, and actual latency separately, never equate these.
- Preserve body/contract semantic ID, compute new separate realization ID. Verify source-to-binary under existing #623 validation; no fake proof from hash equality.
- Follow upstream SEM-1 local codebook contract (link exact child once created). Coordinate active GEN-3 #478, but this is binary lowering, not the GEN records/extraction owner.
Gates
- G0 reproducible before-graph and before-binary identity and exact baseline bytes.
- G1 native .om candidate produces actually fewer executable bytes on a positive repeated fixture, same outputs; nonbeneficial shape refuses or keeps original; unexpected no-op replacement fails gate.
- G2 negative tests for semantic differences, arithmetic, effects, alias, bad refs and stale bindings.
- G3 cold/warm total costs and break-even n > definition+setup / per-use savings, no fabricated time gains.
- G4 independent review/receipt; GB10 performance NOT_RUN until an authorized chip test.
Ownership: bounded executable factoring and controlled compiler-lowering integration via the current seed owner. Do not overwrite active seed/compiler changes.
Delivery protocol
Issue-first under https://github.com/aien-dev/aien-architecture-mv/issues/315, PLAN_AUTHORITY, CURRENT_EXECUTION_PLAN, owner AGENTS/.crumb, existing Honeycomb claims and issue-first delivery. New first-party executable work, tooling, tests and successor are seeded .om, not a permanent .osc/C/Rust/Python runtime. Independent third-party oracle allowed outside runtime, with provenance. Exclusive file owner and reviewed isolated PR; preserve private serving/GPU lease. Attach exact source, seed, binary, commands, output, independent reviewer and explicit PASS/FAIL/INCONCLUSIVE/NOT_RUN. No automatic release/merge.