README: infrastructure boundary and per-technology learning spine; commit architecture/runtime/schemas/style papers

This commit is contained in:
nyx committed 2026-11-06 14:12:49 +01:00
1 parent 529a411cb8
commit f6aad467e2
9 files changed
+647 -167

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
# Schemas
Canonical contracts for the runtime.
## Identity
| ID | Assigned at |
|---|---|
| event_uuid | sensor, at impulse creation |
| cycle_uuid | lemniscate, at cycle open |
| decision_uuid | L1 gate decision |
UUID v7. 48-bit timestamp prefix; sort order = causal order. No record enters Phoebe without causal UUIDs.
## Impulse row
`(event_uuid, gate, timestamp, payload)`
Created at sensor; UUID v7; immutable.
## Gate state row
| Field | Meaning |
|---|---|
| gate | registry name |
| window_start | aggregation window start |
| counters | per-gate counters (JSONB) |
| threshold | value shifted by L1 |
| last_opened | cycle index of last opening |
| last_decision_cycle | cycle_uuid of last shifting decision |
| l1_rtt_ewma / l2_rtt_ewma | sliding means used for cycle interval |
Stored in Phoebe; checkpointed after each cycle; restored on restart.
## Gate tag row
`(gate, tier, why, mode_overrides)`
| Field | Meaning |
|---|---|
| tier | T0 critical / T1 relational / T2 standard / T3 ambient |
| why | declared reason and audit string |
| mode_overrides | per-mode tier shifts (UUID-logged decision) |
T0/T1 registry-declared, runtime-immutable. T2/T3 may shift per mode.
## Evidence request
| Field | Meaning |
|---|---|
| request_uuid | v7, issued at L1 |
| gate | registry name, validated |
| since | cycle boundary |
| returned_from | buffer lower bound; truncation recorded |
## Message schemas
Per subsystem: gates, director, clients.
Version: 0.4 | Updated: 2026-11-04
+39
View File
@@ -0,0 +1,39 @@
# Gate Table
PostgreSQL schema in Phoebe. Registry row per gate; state row per gate.
## gate_registry
| Field | Type | Rationale |
|---|---|---|
| gate | TEXT PK, max 64, dot-namespaced | stable wire/registry key |
| tier | TEXT CHECK IN ('T0','T1','T2','T3') | declared role label |
| tier_locked | BOOLEAN | runtime refuses tier writes when true |
| why | TEXT NOT NULL, max 200 | reason attention argues, audit string |
| mode_overrides | JSONB default {} | per-mode tier shifts |
| created_by, created_at | TEXT, TIMESTAMPTZ | registry provenance |
## gate_state
| Field | Type | Rationale |
|---|---|---|
| gate | TEXT PK FK gate_registry | identity |
| window_start | TIMESTAMPTZ | aggregation boundary |
| counters | JSONB default {} | per-gate counters |
| threshold | NUMERIC(4,1) default 5.0 | attention value; numeric avoids float drift |
| last_opened | BIGINT (cycle index) | starvation counts cycles, not time |
| last_decision_cycle | UUID | replay handle |
| last_l1_rtt_ms, last_l2_rtt_ms | INTEGER | last completed cycle probes |
| l1_rtt_ewma, l2_rtt_ewma | NUMERIC(10,1) | sliding means with hysteresis |
## Wire identity
| ID | Assigned at |
|---|---|
| event_uuid | sensor, at impulse |
| cycle_uuid | lemniscate, at cycle open |
| decision_uuid | L1 decision |
UUID v7; native UUID type; canonical display = v7 hex string.
Version: 0.2 | Updated: 2026-11-04