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
omega-mv / spec / r1-object-world-merge.md
| 1 | # R1 merge: one resident object world |
| 2 | |
| 3 | Status: the host CPU join is implemented. A semantic object may have no |
| 4 | physical window. See `docs/rx-r1-world-unification.md`. |
| 5 | The qualification receipt is what claims R1 and R2. No graphics-chip run is claimed. |
| 6 | The native capability root is not claimed. See `spec/r7-aienos-authority-mapping.md`. |
| 7 | |
| 8 | The two layouts below are the ones in the tree today. They are not two |
| 9 | permanent worlds. The later edit merges them. It does not land on the |
| 10 | `m20-shared-world` branch and it does not touch that branch's unfinished |
| 11 | worker. |
| 12 | |
| 13 | ## What exists |
| 14 | |
| 15 | Host reaction world (`src/runtime/rx_world.h`, `RxObject`): |
| 16 | |
| 17 | - identity is a slot id plus a generation, never an address |
| 18 | - type, persistence class (ephemeral / resident / durable), and a resource id |
| 19 | - one version for the object and a version per field |
| 20 | - field values, and the causal id of the last writer of each field |
| 21 | - a content digest of type and fields |
| 22 | - wakes come from a side index: object id, generation, field mask, reaction id |
| 23 | - publication is the atomic field update plus that causal record |
| 24 | |
| 25 | Coherent world (`OMEGA_SHARED_WORLD_V1`, `OmegaSharedWorldObject` in the |
| 26 | physics `m20-shared-world` tree, not in this branch): |
| 27 | |
| 28 | - identity is again object id plus generation |
| 29 | - state is active or revoked |
| 30 | - permissions are read/write bits stored in the object itself |
| 31 | - `region_offset` and `size_bytes` locate the bytes inside the coherent region |
| 32 | - the header stores byte offsets of rings and the table, not pointers |
| 33 | - a ring slot names `object_id`, `object_generation`, `object_offset`, |
| 34 | `object_length`, plus a sequence and a checksum |
| 35 | - capacity is 64 objects; the host world allows 256 |
| 36 | |
| 37 | The resident GPU worker on that same branch is not qualified. Building the |
| 38 | worker returns `OMEGA_SW_ERR_WORKER_INCOMPLETE` and clears the sketch. |
| 39 | `omega_sw_run_campaign` returns failure and sets `silicon_observed` to 0. |
| 40 | Address arithmetic and scheduling words are not finished. Do not treat a host |
| 41 | build as a chip result. |
| 42 | |
| 43 | ## One record |
| 44 | |
| 45 | The canonical object is the host record, extended only where the coherent |
| 46 | world has a real requirement: |
| 47 | |
| 48 | | Field | Source | Rule | |
| 49 | | --- | --- | --- | |
| 50 | | id, generation | both | This is the only identity. A raw pointer or a GPU address is never an id. | |
| 51 | | type, version, per-field version and last writer | host | Semantic change metadata. | |
| 52 | | persistence class | host | Ephemeral reaction traffic is not durable belief. | |
| 53 | | capability reference | host root | `{cap_id, generation}` only. The shared record's permission word stays in the frozen 32 bytes, is written as zero, and is not the authority check. | |
| 54 | | publication | host | The visible bytes change together with the version and the causal id, or not at all. | |
| 55 | | dependency | host side index | Kept beside the object, addressed by id, generation, and field mask. Not a scan of every reaction. | |
| 56 | | region offset and length | coherent world | Realization only. Both processors turn that offset into their own mapping. The offset is not the object's name. | |
| 57 | |
| 58 | `OmegaSharedWorldHeader` already stores substructure locations as offsets from |
| 59 | the region base. That stays. GPU virtual addresses stay in the launcher's |
| 60 | private arguments, as `OmegaSwWorkerParams` already says, and are not written |
| 61 | into the shared record. |
| 62 | |
| 63 | ## Rings |
| 64 | |
| 65 | Rings stay transport for wake, claim, and publication notices. A slot already |
| 66 | carries a typed message, a monotonic sequence, an epoch, and a bounded window |
| 67 | into an object. That is enough for: |
| 68 | |
| 69 | - no pointer as identity |
| 70 | - stale generation refused (`OMEGA_SW_FAULT_STALE_GEN` already exists) |
| 71 | - hostile descriptor rejected (magic, version, message type, checksum) |
| 72 | - window rejected when offset and length leave the object |
| 73 | - replay refused when the sequence is not the next one |
| 74 | - torn payload rejected by the sequence handshake plus the checksum |
| 75 | - authority checked by validating the capability reference, not by trusting a bit in the descriptor |
| 76 | |
| 77 | Rings do not become a general request/response call mechanism. The bytes of |
| 78 | the object are the shared state. A transform request that copies a whole |
| 79 | object out and back is the thing this merge removes, not the pattern to grow. |
| 80 | |
| 81 | ## What the merge must not do |
| 82 | |
| 83 | - keep `RxWorld` and `OMEGA_SHARED_WORLD_V1` as two resident universes |
| 84 | - store a CPU pointer or a GPU address as identity |
| 85 | - put a writable permission flag in the shared object |
| 86 | - treat a capability id copied out of the table as authority by itself |
| 87 | - raise the worker's failure return into a success without a real GB10 run |
| 88 | - change the frozen 128-byte descriptor layout in the same step as the host admission work |
| 89 | |
| 90 | ## Order |
| 91 | |
| 92 | 1. Agree this record. (This file, originally.) |
| 93 | 2. Host CPU: one `RxObject`, projected into the 32-byte record. Done in the reaction runtime. The permission word is ignored. The graphics-processor branch was not edited. |
| 94 | 3. Finish the resident worker against that same identity, and only count a real graphics-processor run. |
| 95 | 4. Native capability root is a separate step. It is not this one. |