diff --git a/docs/v4.0.0/ARTIFACT.md b/docs/v4.0.0/ARTIFACT.md index 74fb7dc5..76048714 100644 --- a/docs/v4.0.0/ARTIFACT.md +++ b/docs/v4.0.0/ARTIFACT.md @@ -9,14 +9,14 @@ ruled: - imports name the exact build; - the source travels by reference. -**Nothing here is built.** The choices left open are numbered in §8. +**Nothing here is built.** The choices in §8 are ruled (2026-11-19). ## 1. Units, order, width - **The unit is a 32-bit word**, stored little-endian, low byte first, as v4's blocks are (`blocks.h`: "four bytes to a cell, the first lowest"). Every record is a whole number of units, so the records read the same at either cell width. -- **The code is cells of the build's width.** A 32-bit engine and a 64-bit engine are two artifacts: the +- **The code is cells of the build's width**, each stored low byte first (choice 5). A 32-bit engine and a 64-bit engine are two artifacts: the header says which, and placement refuses the wrong one. - **A 64-bit value**, such as a capsule's hash, is two units, low unit first. - **A SHA-512 hash** (choice 2) is 16 units: its 64 bytes in their order, packed four to a unit, low byte @@ -139,5 +139,11 @@ about the format: derives it from the code: a port opcode sets the bit, and each kernel request the word reaches goes in its list. Compatibility refuses a replacement that needs one the old did not (`ABI.md` §7). The list is a count unit then that many request numbers (§7). -5. **Endianness for the code cells:** as the golden model stores them (host order), or fixed low-first like - the records? +5. ~~Endianness for the code cells~~ **Ruled 2026-11-19: "Low-first, like the records".** Every byte of + the artifact has one order, low byte first, so its hashes and signature are the same whichever host + built it. A big-endian host swaps the bytes when it places the code. + +## 9. Status + +All five choices are ruled. This is the artifact layout, the ADR's step 2, as ruled. The next step is the +ADR's step 3: artifact production in the build (the host tool), designed for ruling before any code.