5 Commits
Author SHA1 Message Date
Claude 4f7521290a ADR rulings 4: a word's logical identity is its capsule (content hash) + its name
Build / Image RASPI (push) Successful in 3m42s
Build / Image MILKV (push) Successful in 3m58s
Build / v4 tests (32- and 64-bit cells) (push) Successful in 13m55s
Build / Image PC (push) Successful in 3m57s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 14:37:55 +00:00
Claude e6addc73b7 ADR rulings 3: Artemis owns persistent memory; run-time memory stays the kernel's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 14:37:12 +00:00
Claude 8dd1129ff0 ADR rulings 2: Hermes is the messaging role, not a VM (in v4, the fabric's wires and routing)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 14:36:24 +00:00
Claude d06a16f869 ADR rulings 1: compiled F18 artifacts allowed beside the ROM ("ADR supersedes"); MACHINE.md 1 and 5 corrected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 14:35:47 +00:00
Claude d93e985794 ADR 2026-11-19: F18 binary artifacts, ABI/API and live runtime updates -- recorded as given (Captain Bob)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-19 14:34:02 +00:00
3 changed files with 212 additions and 2 deletions
+181
View File
@@ -0,0 +1,181 @@
# StarshipOS Architectural Design Decision
<!-- Recorded verbatim as given by Captain Bob, 2026-11-19. The conflicts it raises with the existing record
are put to him one at a time, and ruled in docs/v4.0.0/plans/2026-11-19-f18-artifacts.md. -->
## F18 Binary Artifacts, ABI/API, and Live Runtime Updates
Status: ACCEPTED — Immediate Design Decision
Date: 2026-11-19
Scope: F18 build system, LithosAnanke, StarshipOS runtime
Priority: Architectural foundation
---
### 1. Decision
StarshipOS shall establish a canonical binary artifact format for compiled F18 code, supported by a minimal, formally specified Application Binary Interface (ABI) and Application Programming Interface (API).
The ABI shall operate at the word and capsule levels:
- Words are the units of interface and access control.
- Capsules are the units of packaging, distribution, and deployment.
The implementation shall preserve the existing StarshipOS architecture without introducing conventional dynamic linking, shared-library infrastructure, or unnecessary runtime machinery.
### 2. Motivation
This decision supports four primary objectives:
1. Performance: Eliminate redundant compilation, dependency resolution, and other avoidable work from build and startup paths.
2. Verification: Provide immutable binary artifacts suitable for Isabelle/HOL verification and reproducible-build validation.
3. Authenticity and provenance: Establish traceability between source, build configuration, compiler, binary artifact, and formal verification evidence.
4. Live updates: Permit verified binary components to be staged and activated within a running StarshipOS instance without requiring a complete system restart.
Performance improvements must be measured. Binary artifact creation alone does not guarantee reduced startup latency.
### 3. Architectural Contract
#### 3.1 F18 Binary Artifacts
The build system shall compile F18 source into a canonical, versioned binary artifact representation.
An artifact shall provide sufficient information to establish:
- Artifact identity and integrity.
- Source and build provenance.
- Target architecture and compatibility constraints.
- Exported and imported word identities.
- Word-level interface contracts.
- Dependencies and required capabilities.
- Verification status and associated proof identity.
The format may contain individually addressable compiled units.
Artifacts shall remain independent of final deployment decisions. A compiled unit may be incorporated into kernel ROM or distributed as a runtime-consumable capsule.
Source files, compiled binaries, and supporting documentation shall retain their individual provenance.
#### 3.2 Application Binary Interface (ABI)
The ABI shall define the minimum binary-level contract necessary for independently compiled components to interoperate.
It shall address:
- Word identity and resolution.
- Calling conventions and stack effects.
- Memory ownership and access constraints.
- Entry points and dependencies.
- Capability and ACL requirements.
- Binary compatibility.
- Activation and retirement semantics.
The F18 hardware execution contract and the StarshipOS artifact interoperability contract shall remain conceptually distinct.
Logical word identity shall not depend on physical memory addresses or processor placement.
Local execution may resolve to physical addresses. Inter-core communication shall continue to use the established message architecture.
#### 3.3 Application Programming Interface (API)
The API shall expose the minimum operations necessary for artifact discovery, verification, staging, activation, retirement, and recovery.
These operations should be implemented through existing StarshipOS facilities wherever practical.
They shall not automatically require new kernel primitives.
The API shall preserve the existing responsibilities of:
- Hera: System ownership, component creation, and coordination.
- Hermes: Messaging, routing, and communication.
<!-- Ruled 2026-11-19 ("The messaging role"): Hermes names the role, not a VM. In v4 it is the fabric's wires
and routing (MESH.md), and kernel-Hermes on v3; no Hermes node is brought back. -->
- Artemis: Memory, persistence, and recovery.
<!-- Ruled 2026-11-19 ("Persistent memory"): Artemis owns what is kept -- persistent storage, staged artifacts,
recovery copies (FABRIC-3.5 XIV.3). Run-time memory stays the kernel's: the Stadium allocates it, and the
kernel serves blocks. -->
Specific API word names and signatures remain implementation decisions.
### 4. Live Runtime Updates
StarshipOS shall support the architectural capability to introduce verified replacement artifacts into a running system.
The intended lifecycle is:
1. Build the replacement artifact.
2. Verify integrity, compatibility, and applicable formal properties.
3. Distribute and stage the artifact.
4. Establish a safe activation boundary.
5. Activate the replacement.
6. Retire the previous implementation when safe.
7. Preserve recovery or rollback capability where applicable.
Heartbeat boundaries may provide logical activation points, but safe replacement must account for outstanding execution, messages, dependencies, and persistent state.
Multiple artifact versions may coexist during transitions.
Live replacement shall not violate existing runtime invariants or word-level ACL guarantees.
### 5. Formal Verification
The ABI and artifact format shall be suitable for specification in Isabelle/HOL.
Verification objectives include:
- Artifact structural validity.
- Interface and stack-effect compatibility.
- Dependency satisfaction.
- Memory and capability constraints.
- Safe activation and retirement.
- Preservation of established invariants across compatible replacements.
Proof evidence shall be associated with the exact artifact and its applicable assumptions.
Cryptographic integrity and authenticity shall be distinguished from functional correctness. Hashes alone do not establish correctness or authorship.
A verified replacement shall not be considered universally compatible merely because its individual components have been verified.
### 6. Explicit Non-Goals
This decision does not authorize introducing:
- ELF-style dynamic linking or shared libraries.
- A conventional process loader.
- A centralized runtime linker.
- A global executable address space.
- A conventional scheduler or memory manager.
- A new execution model.
- Mandatory inclusion of all compiled artifacts in kernel ROM.
- Unnecessary kernel primitives or additional abstraction layers.
The existing asynchronous, message-driven architecture remains authoritative.
### 7. Implementation Direction
Implementation shall proceed incrementally:
1. Define and document the minimal ABI contract.
2. Establish the canonical binary artifact representation.
3. Integrate artifact production into the existing build system.
4. Add integrity, provenance, and reproducibility checks.
5. Formalize applicable ABI properties in Isabelle/HOL.
6. Implement minimal artifact API operations.
7. Validate staged and live replacement using controlled experiments.
8. Measure build time, startup latency, runtime overhead, and replacement correctness.
Existing build, POST, CI, and verification gates shall remain in force unless explicitly superseded by independently validated equivalents.
### 8. Governing Principle
Words define interfaces. Capsules define deployment. Artifacts establish identity and provenance. The ABI guarantees interoperability. The API exposes operations. Isabelle/HOL verifies the applicable contracts.
No additional machinery shall be introduced without demonstrated necessity.
The machine remains the machine.
---
Decision: ACCEPTED
Implementation: Pending incremental design and experimental validation
Architectural impact: Foundational — F18 toolchain, capsule infrastructure, formal verification, and live deployment.
+5 -2
View File
@@ -26,7 +26,10 @@ machine and a ROM.
| **Trailer** | Source, as named blobs. `.f18` is F18 assembler. `.4th` is FORTH. The blob's name gives its type. | The capsule directory (`capsules/`) |
The ROM is the only binary. It runs the same on the C engine and on the FPGA: one binary, the
same behaviour. Assemble FORTH from the trailer and the node is a FORTH machine. Assemble Lisp
same behaviour. **Superseded in part, 2026-11-19** (Captain Bob, "ADR supersedes";
`ADR-2026-11-19-F18-ARTIFACTS.md`): the build may also compile F18 into binary artifacts, with their
identity, provenance and interface. An artifact is a choice, not a requirement: the ROM still
assembles source at boot. Assemble FORTH from the trailer and the node is a FORTH machine. Assemble Lisp
and it would be a Lisp machine. The engine and the ROM do not change.
### 1.1 What it is for
@@ -204,7 +207,7 @@ streams the ROM instead.
| Today | Becomes |
|---|---|
| `v4/capsule/*.v4`, 14 files, 311 words, assembled on the build machine | `.f18` blobs under `capsules/v4/`, assembled by the ROM at boot |
| `v4/tools/mkimage.c` → `nucleus-64.f18`, a prebuilt dictionary | Builds the ROM only. The nucleus binary is gone. |
| `v4/tools/mkimage.c` → `nucleus-64.f18`, a prebuilt dictionary | Builds the ROM only. The nucleus binary is gone. (2026-11-19: compiled F18 artifacts are allowed beside the ROM, `ADR-2026-11-19-F18-ARTIFACTS.md`.) |
| `v4/src/text.c`, the assembler in C | The ROM's assembler is F18 code. `text.c` builds the ROM, as the first assembler builds the next. |
| `forth79.4th`: `U*`, `U/MOD` only | Every FORTH-79 word that is not an opcode, a register or the FORTH machinery (`NUCLEUS.md` 4, rule 1). It moves group by group, with POST after each (`NUCLEUS.md` 8, step 3). |
| `boot_capsules[]` in `v4/system/boot.c` | The system list (step 2, then step 3) is the loader's. Everything after POST is `init.4th`'s. |
@@ -0,0 +1,26 @@
# F18 binary artifacts, ABI/API, live updates -- the rulings
The decision is `docs/v4.0.0/ADR-2026-11-19-F18-ARTIFACTS.md`, recorded as given. This file records each
conflict between it and the existing record, put to Captain Bob one at a time, and his ruling.
**Nothing is built.** The ADR's §7 order is followed; step 1 is the minimal ABI contract.
## The conflicts, one at a time
1. **"The ROM is the only binary"** (MACHINE.md §1, §5, ruled 2026-10-15) against compiled F18 artifacts.
**Ruled: "ADR supersedes".** MACHINE.md §1 and §5 now say that compiled artifacts are allowed beside the
ROM. An artifact is a choice, not a requirement: the ROM still assembles source at boot.
2. **"Hermes: Messaging, routing, and communication"** (ADR §3.3) against the record. The Hermes VM was
removed (FABRIC-3.5/3.6, 2026-09-22), and v4's messages travel on the fabric's wires and routes.
**Ruled: "The messaging role".** Hermes names the role, not a VM: in v4 the fabric's wires and routing,
and on v3 kernel-Hermes. No Hermes node is brought back. The ADR carries a note saying so.
3. **"Artemis: Memory, persistence, and recovery"** (ADR §3.3) against the record. Artemis is the persistence
path (FABRIC-3.5 XIV.3), and memory is the kernel's. **Ruled: "Persistent memory".** Artemis owns what is
kept: persistent storage, staged artifacts and recovery copies. Run-time memory stays the kernel's: the
Stadium allocates it, and the kernel serves blocks. The ADR carries a note saying so.
4. **A word's logical identity** (ADR §3.2: not addresses or placement). Today v4 has three identities: the
word ID (assigned in order, given back by FORGET), `ACL-WORD-ID` (its address) and the kernel's table of
entries (addresses). **Ruled: "Capsule + name".** A word's identity is its defining artifact's identity,
the content hash, plus the word's name. It is stable across builds of the same source and independent of
where the word loads. Addresses and word IDs stay as local resolution only.