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**.
## 2. Status / certainty
SCAFFOLD · named **Ichor**, Pony starting scaffold at `src/ichor/` (envelope + broker + D1 barrier +
C seam). Not yet compiled here (no `ponyc` in-env). Backing/transport now C3.
SCAFFOLD · named **Ichor**, Pony scaffold at `src/ichor/` (envelope + broker + D1 barrier + C seam).
**Compiles & runs** on ponyc 0.64.0 (smoke wiring green). Backing/transport now C3.
## 3. Language & location
**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.
- `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
```
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
`use "lib:ichor_ada"` + the `admit_via_ada` body in `barrier.pony`, and point the
shim at an Ada `Trust_Guard.Screen_Inbound` export.
## Status
Starting scaffold. Pony + Fortran toolchains are absent in this environment, so
this is design-complete source to build where Pony exists — not yet compiled here.
Starting scaffold — **compiles and runs** (ponyc 0.64.0). The Ada-side shim
(`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
Brain-bound envelope must pass perfusion law L2: everything reaching the Brain
crosses Ada (D1) first.
Real wiring crosses into Ada's `Trust_Guard` (provenance + blocklist + rate) via
the C/Fortran seam (`ichor_ada_shim.c`). Until that binding is built, this mirrors
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
`admit` with the FFI call sketched below.
"""
// The blood-brain barrier (D1). `Barrier.admit` is the screening decision every
// Brain-bound envelope must pass perfusion law L2: everything reaching the
// Brain crosses Ada (D1) first.
//
// Real wiring crosses into Ada's `Trust_Guard` (provenance + blocklist + rate)
// via the C/Fortran seam (`ichor_ada_shim.c`). Until that binding is built, this
// mirrors 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
// `admit` with the FFI call sketched below.
primitive Barrier
fun admit(envl: Envelope): Bool =>

View File

@ -1,12 +1,10 @@
"""
The perfusion broker. Organs register, then emit envelopes by `route` the
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
broker is the only shared point.
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.
"""
// The perfusion broker. Organs register, then emit envelopes by `route` the
// 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
// broker is the only shared point.
//
// 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.
use "collections"

View File

@ -1,11 +1,8 @@
"""
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 rejected
at the barrier.
Build (where ponyc exists): ponyc src/ichor -o build
Run: ./build/ichor
"""
// 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
// rejected at the barrier.
//
// Build: ponyc src/ichor -o build Run: ./build/ichor
actor Main
new create(env: Env) =>

View File

@ -1,8 +1,6 @@
"""
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
the Broker. `StubOrgan` is a canned receiver for standalone tests.
"""
// 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
// the Broker. `StubOrgan` is a canned receiver for standalone tests.
interface tag OrganReceiver
be receive(envl: Envelope)