vQbitPrimitive ABI — Swift M⁸¶
The vQbitPrimitive is the unit of sovereign state in the M⁸ manifold. It carries one prim's eight-dimensional coordinates and is transported as a fixed-size wire message over the embedded NATS bus.
Patents: USPTO 19/460,960 | USPTO 19/096,071 — © 2026 Richard Gillespie
Swift struct definition¶
// Sources/GaiaFTCLCore/VQbitPrimitive.swift
public struct VQbitPrimitive: Sendable, Codable {
/// S⁴ — structural dimensions
public var s1_structural: Float32
public var s2_temporal: Float32
public var s3_spatial: Float32
public var s4_observable: Float32
/// C⁴ — constitutional dimensions
public var c1_trust: Float32
public var c2_identity: Float32
public var c3_closure: Float32
public var c4_consequence: Float32
/// Prim identity
public var primID: UUID
public var domain: String
public var timestampUTC: String
}
S4DeltaWire — transport format (53 bytes, frozen)¶
Each structural measurement travels as a 53-byte S4DeltaWire on subject gaiaftcl.substrate.s4.delta. The codec size is locked at 53 bytes by IQ-007.
| Byte range | Field | Size |
|---|---|---|
| 0..15 | primID (UUID bytes) |
16 B |
| 16 | dimension (s1=0, s2=1, s3=2, s4=3) |
1 B |
| 17..20 | value (Float32) |
4 B |
| 21..28 | tauBlockHeight (UInt64) |
8 B |
| 29..52 | timestampUTC (24-byte ISO-8601 string) |
24 B |
| Total | 53 B |
The VM accumulates deltas per prim via a 4-bit dimension mask (0x0F = all four S4 dimensions present). Only when the mask is saturated does the full M⁸ pipeline fire.
C4ProjectionWire — constitutional output (53 bytes, frozen)¶
After the Bell/CHSH gate and constitutional invariants pass, VQbitVM publishes a C4ProjectionWire on gaiaftcl.substrate.c4projection. Same 53-byte budget, different field layout (c1–c4 Float32 values instead of a single dimension value).
Both wires share the same byte-count frozen by IQ-007 and S4DeltaWire.byteCount.
Colour mapping (RealityKit S4 projection)¶
When C4ProjectionSystem renders entity state, constitutional health maps to colour:
// Sources/GaiaFTCLScene/C4ProjectionSystem.swift
let r = Float(state.c1_trust) // trust → red channel
let g = Float(state.c2_identity) // identity → green channel
let b = Float(state.c3_closure) // closure → blue channel
let a = Float(state.c4_consequence) // consequence → alpha
All values are clamped to [0, 1] by VQbitUIValidator before any render tick.
Regression guards (Tests/GAMP5/IQ/)¶
These run on every swift test pass. A failure blocks IQ and the entire qualification chain.
| Test | Assertion | Failure implication |
|---|---|---|
| IQ-007 | S4DeltaWire.byteCount == 53 |
Wire format changed; mesh desync |
| FUI-001 | One authoritative Franklin.usda |
Scene data integrity violated |
| IQ-SCHEMA-* | SwiftData schema migrations pass | ClosureReceiptRecord audit trail broken |
Configuration management¶
S4DeltaWire and C4ProjectionWire are controlled items CI-007 and CI-008. Any change to field types, sizes, or byte offsets requires:
- Updating both
S4DeltaCodecandC4ProjectionCodecencode/decode paths - Bumping the codec version byte (reserved, currently 0x01)
- Re-running the full 156-test GAMP5 suite
- Re-running in-app IQ/OQ/PQ qualification (18/18 CALORIE required)
Federation-cosigned
This page's source is sealed in the GaiaFTCL federation manifest — page SHA-256 6b62c7869e4413ab…, manifest witness a090592e0609adc8…, signed 2026-06-02T18:58:22Z by cell gaiaftcl-mac-cell. Verify with gaiaftcl wiki sign --all and compare wiki-all-signatures.json.