ichor(D2): fix package docstrings so it compiles; verify green

Pony allows one package docstring per package — collapse the four secondary
files' leading docstrings to // comments. ichor now compiles on ponyc 0.64.0
and the smoke wiring runs green (internal perfused, external rejected at D1,
cross-organ delivered). Update README + D2 status to reflect it builds; ignore
build/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hmgREHNsxYCuim33yUF2c
This commit is contained in:
Claude 2026-06-18 14:32:38 +00:00
parent 786d4662c9
commit b82e4e9833
No known key found for this signature in database
7 changed files with 38 additions and 40 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Pony build output (ichor)
build/

View File

@ -6,8 +6,8 @@ explicit that organs communicate by **perfusion, not direct wiring**; this is th
**unnamed and unimplemented**. **unnamed and unimplemented**.
## 2. Status / certainty ## 2. Status / certainty
SCAFFOLD · named **Ichor**, Pony starting scaffold at `src/ichor/` (envelope + broker + D1 barrier + SCAFFOLD · named **Ichor**, Pony scaffold at `src/ichor/` (envelope + broker + D1 barrier + C seam).
C seam). Not yet compiled here (no `ponyc` in-env). Backing/transport now C3. **Compiles & runs** on ponyc 0.64.0 (smoke wiring green). Backing/transport now C3.
## 3. Language & location ## 3. Language & location
**Pony** (`src/ichor/`) — actor-model broker; capabilities give data-race-free sends. Transport split: **Pony** (`src/ichor/`) — actor-model broker; capabilities give data-race-free sends. Transport split:

View File

@ -22,15 +22,19 @@ seam (`ichor_ada_shim.c`) is where it crosses into the Ada border.
reject an unscreened external payload, perfuse organ→organ. reject an unscreened external payload, perfuse organ→organ.
- `ichor_ada_shim.c` — the C/Fortran binding seam to the Ada D1 border (stub). - `ichor_ada_shim.c` — the C/Fortran binding seam to the Ada D1 border (stub).
## Build / run (needs ponyc — NOT installed in this env) ## Build / run
``` ```
ponyc src/ichor -o build # compile the package ponyc src/ichor -o build # compile the package (built clean on ponyc 0.64.0)
./build/ichor # run the smoke wiring ./build/ichor # run the smoke wiring
``` ```
Expected output: internal secretion soul→brain perfused, external→brain rejected
at D1, brain→soul cross-perfused. Install ponyc via `ponyup` if absent (the env
is ephemeral, so the toolchain is per-session).
To wire the real Ada border: build `ichor_ada_shim.c` into `libichor_ada`, enable To wire the real Ada border: build `ichor_ada_shim.c` into `libichor_ada`, enable
`use "lib:ichor_ada"` + the `admit_via_ada` body in `barrier.pony`, and point the `use "lib:ichor_ada"` + the `admit_via_ada` body in `barrier.pony`, and point the
shim at an Ada `Trust_Guard.Screen_Inbound` export. shim at an Ada `Trust_Guard.Screen_Inbound` export.
## Status ## Status
Starting scaffold. Pony + Fortran toolchains are absent in this environment, so Starting scaffold — **compiles and runs** (ponyc 0.64.0). The Ada-side shim
this is design-complete source to build where Pony exists — not yet compiled here. (`ichor_ada_shim.c`) is still a stub; wiring `Barrier.admit` to the real Ada
`Trust_Guard` is the next step.

View File

@ -1,15 +1,13 @@
""" // The blood-brain barrier (D1). `Barrier.admit` is the screening decision every
The blood-brain barrier (D1). `Barrier.admit` is the screening decision every // Brain-bound envelope must pass perfusion law L2: everything reaching the
Brain-bound envelope must pass perfusion law L2: everything reaching the Brain // Brain crosses Ada (D1) first.
crosses Ada (D1) first. //
// Real wiring crosses into Ada's `Trust_Guard` (provenance + blocklist + rate)
Real wiring crosses into Ada's `Trust_Guard` (provenance + blocklist + rate) via // via the C/Fortran seam (`ichor_ada_shim.c`). Until that binding is built, this
the C/Fortran seam (`ichor_ada_shim.c`). Until that binding is built, this mirrors // mirrors the provenance law in pure Pony so the broker is testable standalone.
the provenance law in pure Pony so the broker is testable standalone. //
// To switch to the Ada border, add `use "lib:ichor_ada"` and replace the body of
To switch to the Ada border, add `use "lib:ichor_ada"` and replace the body of // `admit` with the FFI call sketched below.
`admit` with the FFI call sketched below.
"""
primitive Barrier primitive Barrier
fun admit(envl: Envelope): Bool => fun admit(envl: Envelope): Bool =>

View File

@ -1,12 +1,10 @@
""" // The perfusion broker. Organs register, then emit envelopes by `route` the
The perfusion broker. Organs register, then emit envelopes by `route` the // broker delivers to the destination organ. Brain-bound traffic is forced through
broker delivers to the destination organ. Brain-bound traffic is forced through // the D1 Barrier first (law L2). No organ holds another's reference (law L1); the
the D1 Barrier first (law L2). No organ holds another's reference (law L1); the // broker is the only shared point.
broker is the only shared point. //
// In full deployment this actor backs a socket broker hosted on the Ada barrier;
In full deployment this actor backs a socket broker hosted on the Ada barrier; // here it routes in-process so the wiring is exercisable without sockets.
here it routes in-process so the wiring is exercisable without sockets.
"""
use "collections" use "collections"

View File

@ -1,11 +1,8 @@
""" // Ichor smoke wiring (D2 §9 test): round-trip an envelope between two stub organs
Ichor smoke wiring (D2 §9 test): round-trip an envelope between two stub organs // through the D1 admit check, and confirm an unscreened external payload is
through the D1 admit check, and confirm an unscreened external payload is rejected // rejected at the barrier.
at the barrier. //
// Build: ponyc src/ichor -o build Run: ./build/ichor
Build (where ponyc exists): ponyc src/ichor -o build
Run: ./build/ichor
"""
actor Main actor Main
new create(env: Env) => new create(env: Env) =>

View File

@ -1,8 +1,6 @@
""" // What an organ is, to Ichor: anything that can receive a perfused envelope.
What an organ is, to Ichor: anything that can receive a perfused envelope. // Organs hold no hard reference to each other (perfusion law L1) they only know
Organs hold no hard reference to each other (perfusion law L1) they only know // the Broker. `StubOrgan` is a canned receiver for standalone tests.
the Broker. `StubOrgan` is a canned receiver for standalone tests.
"""
interface tag OrganReceiver interface tag OrganReceiver
be receive(envl: Envelope) be receive(envl: Envelope)