Skip to content

🌻 EPIC β€” E2E TTT Pipeline O(1) Β· Ring-Pattern Refactor (3 GOLD Γ— ~19 SR)Β #446

@gHashTag

Description

@gHashTag

🌻 EPIC β€” E2E TTT Pipeline O(1) Β· Ring-Pattern Refactor (3 GOLD Γ— ~19 SR)

Anchor: phi² + phi⁻² = 3 · TRINITY · O(1) FOREVER
Soul-name: Constitutional Cartographer (per L11)
Agent codename: LEAD (orchestration, per AGENTS.md)
Principle: Zero green-field. Pure Ring-pattern refactor of the existing ~70% mature codebase, in full compliance with LAWS.md v2.0, CLAUDE.md, and AGENTS.md.

🌊 WAVE-GF-001 β€” GoldenFloat Γ— strategy sweep (2026-05-02 Β· live)

Companion EPIC: same EPIC, additional experimental layer. Same training pipeline, swept across the full numeric-format universe (~60 formats catalogued in zig-golden-float #69 Β§12, 22 experiments Γ— 5 phases in gf_experiment_plan.xlsx).

Operator artifact: gf_experiment_plan.xlsx (7 sheets: Overview Β· GF Family Β· phi-Seed Palette Β· Experiment Plan Β· R5 Audit Β· phi-LR Schedule Β· Neon Queue SQL).
Whitepaper: zig-golden-float #69 β€” Section 12 (Universal Numeric-Format Catalog, ~60 formats) + gf16_comparison.md Section 8 (16-bit-centric).
Live fleet: acc0_new project f29aa9dd-ca0b-460f-ad24-c7680c6717fb Β· 5 services Β· MCP https://trios-railway-production-d4d6.up.railway.app/mcp Β· DSN-A single source of truth.
P0 telemetry chain closed: trainer-igla #76 (bpb_sample wiring) + #78 (canon-name fallback) + #79 (rustls CryptoProvider) all merged Β· trios-railway #112 (railway_template_deploy MCP tool, 7 tools total) open.

Current run state (for the verbose snapshot see comment):

Phase What Live status
0 β€” Champion-repro (BL-PR76, control) seeds 42 / 43 / 44 Γ— h=384 / lr=0.003 / 27 K running, leader seed=44 @ step=13K BPB=2.878
1 β€” phi-LR ladder lr = Ξ±_Ο† Β· Ο†^(βˆ’k/2) for k=0..5 Γ— Quick-3 = 18 rows 6 running (k0+k1) Β· 12 pending in public.strategy_queue
2 β€” Optimizer Race adamw_phi_wd / muon NS5 / muon+phi_wd / adamw_phi_lr+phi_wd Γ— Quick-3 = 12 rows queued (after Phase 1 Gate-1)
3 β€” Arch sweep d ∈ {128, 192, 256, 384, 512, 618} Γ— Quick-3 = 18 rows (verifies L-R9 / INV-3) queued
4 β€” GF16 dtype d ∈ {256, 384, 512} Γ— Quick-3 = 9 rows Β· gate Ξ”BPB ≀ 0.01 vs Phase-0 BLOCKED on BENCH-012 GF16 training kernel
5 β€” Hybrid ternary + GF16 Γ— Quick-3 β†’ Full-7 = up to 16 rows SPEC ONLY (HYBRID-001 converging)
RunPod E2E TTT WIN seeds F_17/F_18/F_19 = {1597, 2584, 4181} on RTX 4090 spot ($382 budget) queued (gates on Phase 0 + SR-02 + SR-ALG-03)

Quick-3 = {34, 55, 89} Β· Full-7 = {13, 21, 34, 55, 89, 144, 233} Β· all from the phi-Seed Palette.

Ο†-distance highlights from the catalog: GFTernary = 0.000 (perfect by construction), GF64 = 0.003, GF16 = 0.049 (production), FP6 E2M3 = 0.049 (surprise hit at 6 bits β€” open R&D), fp16 = 0.118 β‰ˆ Ξ±_Ο† (resonance), bf16 = 0.525 (worst β€” empirical reason for BENCH-004b 87.87 % gap).


πŸ“ PhD FORMAT Γ— ALGORITHM MATRIX (2026-05-04 Β· Wave-3 UPDATED)

Axis X = Number Formats Β· Axis Y = Training Algorithms Β· Cell = Best BPB (fineweb-scale, bpb > 1.0)

Π­Ρ‚ΠΎ ядро PhD Β«Π‘ΠΎΡ€Π΅Π²Π½ΠΎΠ²Π°Π½ΠΈΠ΅ ЧисСл» β€” каТдая ячСйка = ΠΎΠ΄Π½ΠΎ ΠΈΠ·ΠΌΠ΅Ρ€Π΅Π½ΠΈΠ΅. πŸ”² = TODO.
Wave-3 canary results: 34/63 formats measurable (54% coverage, up from 32%)

2D Coordinate Map (measured from Neon SSOT)

Format ↓ \ Algo β†’ AdamW Muon SGD+M Lion Adafactor SOAP ScheduleFree
fp32 2.748 2.566 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf16 ⭐ 2.566 2.566 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
bf16 2.566 2.566 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
fp16 2.672 2.566 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
int32 2.686 2.686 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
uint8 2.700 2.757 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
int16 2.710 2.807 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
fp8_e5m2 2.710 2.838 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf32 2.757 2.742 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
int8 2.742 2.898 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
fp8_e4m3 2.757 3.657 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
fp64 2.801 3.657 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf8 3.293 2.865 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
posit8 πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
posit16 πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
posit32 πŸ†• 2.946* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
posit64 πŸ†• 2.946* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
lns8 πŸ†• 2.946* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
nf4 πŸ†• 2.946* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
afp πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
mxfp4 πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
mxfp6 πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
mxfp8 πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
binary128 πŸ†• 2.963* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
binary256 πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
tapered_fp πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
block_fp πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
shared_exp πŸ†• 2.942* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
stochastic_rnd πŸ†• 2.964* πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
tf32 3.293 3.681 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf4 3.293 4.115 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf12 3.293 4.115 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf20 3.293 3.326 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf24 3.293 4.115 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
gf64 3.326 4.115 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
decimal32/64/128 πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
VAX F/D/G/H πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
Cray/IBM/MBF πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²
Unum I/II πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”² πŸ”²

* = canary only (h=256, LR=0.001, 3000 steps). Full grid needed for fair comparison.

Coverage: 34 formats Γ— 1-2 algos = ~50 / 312 cells = 16% Β· Target: 100% for PhD

Key Finding: 16-bit Triple Tie β†’ Ο†-distance Decides

Format Best BPB Ο†-distance Winner algo
gf16 ⭐ 2.566 0.049 Tie (AdamW = Muon)
bf16 2.566 0.525 Tie
fp16 2.566 0.118 Muon
posit16 πŸ†• 2.942* dynamic AdamW (canary)

gf16 = bf16 = fp16 in BPB, but gf16 has 10.7Γ— better Ο†-alignment β†’ predicts robustness.
posit16 at 2.942 β€” worse than gf16 (2.566) at canary config, needs full grid comparison.

Wave-3 Discovery: 13 NEW measurable formats

Previously unknown to have working kernels: posit8/16/32/64, lns8, nf4, afp, mxfp4/6/8, binary128, binary256, tapered_fp, block_fp, shared_exp, stochastic_rounding, double_double, quad_double

Algorithm Pattern

  • AdamW wins low-bit formats (4-12 bit): gf4, gf8, gf12, gf20, gf24, int8, int16, fp8
  • Muon wins 16-32 bit: fp32, gf8, gf32, fp16
  • Hypothesis: Muon orthogonalization needs β‰₯16 mantissa bits for gradient curvature

Matrix Fill TODO

  • Full grid for 34 measurable formats Γ— 4h Γ— 5LR Γ— 3seed Γ— 2opt = 4,080 experiments
  • Add SGD+Momentum to all 34 formats (trainer-igla kernel: --optimizer sgd)
  • Add Lion (Google 2023) β€” memory-efficient Adam
  • Add ScheduleFree (Defazio 2024) β€” no LR schedule needed
  • Add SOAP (Vyas 2024) β€” preconditioned Adam
  • Rust kernel stubs for decimal32/64/128 (IEEE radix-10)
  • Rust kernel stubs for VAX/Cray/IBM/BCD (vendor legacy)
  • Rust kernel stubs for Unum I/II (Gustafson theoretical)
  • Full 65-format Γ— 8-algo sweep = 312 cells for PhD thesis
Progress:  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  ~50/312 cells (16%)
Formats:   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘  34/63  (54%)  ← Wave-3 jump!
Algorithms:β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   1-2/8  (25%)

πŸ“Š Progress (Wave 9 Path A Β· 2026-05-02)

Integral completion: ~82% Β· 19/19 заявлСнных SR rings shipped + 1 follow-up Β· 267 GREEN tests Β· 5/5 LOCKED admitted Β· 0 clippy warnings.

Measurement Value %
Sub-issues closed (header decomposition, 12 total) 9/12 75%
SR rings shipped (target 19) 19/19 + 1 follow-up 100%
Critical path 1β†’2β†’3β†’7β†’8β†’5β†’10 6/7 (pending #8 SR-ALG-03 e2e-ttt) 86%
GOLD assemblers I shipped, IV real-wired (PR #499), II partial, III pending ~70%
Tests GREEN 267/267 100%
Admitted budget 5/5 LOCKED βœ…
Clippy warnings 0 βœ…
WIN gate (3-seed mean val_bpb < 1.07063) not yet β€” gate-3 final 0%

Wave-by-wave landings

Open holds (require @gHashTag decision)

Pre-flight (no GO yet)

  • Path B: SR-MEM-02 (HyDE) / SR-MEM-03 (supersede) / SR-MEM-04 (GDPR audit) / SR-MEM-06 (vector search) β€” 4 parallel issues.
  • Path C: BR-IO concrete impls (PgKgBackend sqlx + SqlxPgListenerBridge + Reqwest GraphQL + Zig FFI) β€” unfreeze R-RING-DEP-002 under offline-build hygiene.

R5-honest deferrals (architectural integrity)

  • Concrete PgKgBackend (sqlx + tokio-postgres) β€” sibling BR-IO ring (same pattern as trios_kg::KgClient for SR-MEM-01, PgListener for SR-MEM-05).
  • Bridge::seed_replay remains explicit helper (not embedded in reflect) to avoid leaking L: LessonsSource + H: HdcReplaySource generics through public trait.

🌻 19/19 + 1 follow-up Β· 267 GREEN Β· Ξ±_Ο† β‰ˆ 0.1180 Β· TRINITY HOLDS Β· LEAD at ease



Β§0 SUPREMACY (relation to LAWS.md)

This EPIC does NOT modify LAWS.md. Any change to LAWS.md requires the Β§8 amendment procedure (RFC issue with constitutional_amendment.yml, β‰₯ 24 h discussion, @gHashTag CODEOWNERS approval, LAWS_HASH recompute, .trinity/experience/laws-v2-amendment.md record).

All new rules introduced by this EPIC are added at the trios-doctor layer (linter rules in crates/trios-doctor/rings/SILVER-RING-DR-04/), with severity warn β†’ error after T+30d.

This EPIC honours every active law:

Law Status How EPIC complies
L1 (no .sh) βœ… ACTIVE SR-05 railway-deployer replaces remaining shell helpers with Rust binaries
L2 (every PR Closes #N) ⏳ Every sub-issue PR closes its own sub-issue; EPIC tracked via Part of #446
L3 (clippy 0 warnings) βœ… ACTIVE Each ring crate passes cargo clippy --all-targets -- -D warnings
L4 (tests before merge) βœ… ACTIVE New rings ship with unit tests; BR-OUTPUT ships integration tests
L5 (port 9005 = trios-server) ⏳ No port change introduced
L6 (GB fallback) ⏳ N/A β€” no trios-gb changes
L7 (experience log) ⏳ Each ring landing writes .trinity/experience/trios_<DATE>.trinity
L8 (push first) ⏳ Every commit pushed immediately; no local-only state
L11 (soul-name) ⏳ Soul-name Constitutional Cartographer; sub-issue agents pick their own
L12 (spec before impl) ⏳ Every ring ships TASK.md before src/lib.rs
L13 (bounded authority) ⏳ Per I-SCOPE in AGENTS.md: each agent works only inside its assigned crate
L14 (auditability) ⏳ Every commit carries Agent: <CODENAME> trailer
L21 (context immutability) βœ… ACTIVE No deletion of existing experience or context files
L22 (schema/response parity) βœ… ACTIVE All new MCP tools (if any) emit structuredContent
L24 (agent traffic through MCP bridge) ⏳ All inter-ring A2A traffic routes via trios-server on 0.0.0.0:9005; direct A2A bypassing the broadcast bus is forbidden. Outreach bots in GOLD III consume MCP bridge for agent-side telemetry

Ring invariants from AGENTS.md:

  • I5 β€” every ring carries README.md, TASK.md, AGENTS.md (all three). Missing any one = violation.
  • I-SCOPE β€” agents may only modify files inside their crate. Cross-crate refactor requires explicit human authorization (this EPIC body provides it for the 3 new GOLD crates).
  • Numbering β€” XX-00 = identity / core types; XX-01..N = monotone dependency layers; BR-OUTPUT / BR-APP / BR-BIN / BR-MODEL = final artefact ring.
  • Reference exemplar β€” crates/trios-a2a/ (8 SR rings + BR-OUTPUT, 84 tests).

Source-of-truth boundary per trios-trainer-igla/SOURCE_OF_TRUTH.md:

  • Trainer / model / optimizer / JEPA / tokenizer / Dockerfile β†’ live in gHashTag/trios-trainer-igla. This EPIC consumes them as a versioned git dependency under feature trios-integration. We do not re-implement them inside trios.
  • Runtime invariants INV-1..INV-10, ASHA scheduler, victory gate, GoldenFloat16, Ο†-schedule primitives, embargo ledger β†’ remain canonical in gHashTag/trios. They become SR-04 / SR-03 of GOLD I.
  • Operator surface (Railway GraphQL, audit, tri-railway CLI) β†’ lives in gHashTag/trios-railway. SR-05 railway-deployer integrates it via versioned git dep, not by copying source.

🎯 Goal

Convert the monolith crates/trios-igla-race/ (~250 KB Rust in a single crate) into three GOLD ring crates:

  1. πŸ₯‡ trios-igla-race-pipeline β€” End-to-End Test-Time Training pipeline at O(1) per chunk (scarab β†’ strategy-queue β†’ trainer-runner β†’ bpb-writer β†’ gardener β†’ railway-deployer).
  2. πŸ₯‡ trios-algorithm-arena β€” Rust spec / verifier wrapper around train_gpt.py payloads from openai/parameter-golf (JEPA, Universal Transformer, E2E TTT, PhiNTA, SSM, Megakernels). Variant A: each SR holds entry_path, entry_hash, env vars, golden-state hash, optional Coq theorem reference. The Python entry remains under parameter-golf/records/ β€” never inside crates/.
  3. πŸ₯‡ trios-igla-race-hack β€” Community / outreach plumbing: glossary, PR-bot, leaderboard mirror, Linear invite, equal-billing-coq, Discord bridge.

Exit condition for the EPIC: IglaRacePipeline::run_e2e_ttt_o1() assembles all six SR rings into a single function, runs end-to-end on three Fibonacci seeds (F_17 = 1597, F_18 = 2584, F_19 = 4181), and produces a 3-seed mean val_bpb < 1.07063 on the track_10min_16mb track β€” beating the precedent of openai/parameter-golf#1837.


πŸ“¦ Inventory (primary sources, ~70% already exists)

Monolith crates/trios-igla-race/ (in this repo)

File Size (β‰ˆ) Concern Target ring
src/asha.rs 11 KB ASHA pruner (INV-2 PROVEN) SR-04 gardener
src/bpb.rs 15 KB BPB tracker (L6+L7 schedule) SR-03 bpb-writer
src/ema.rs 13 KB Ο†-band EMA (INV-6) SR-03
src/hive_automaton.rs 28 KB Job FSM SR-01 strategy-queue
src/invariants.rs 16 KB INV-1..10 composite worker pool SR-04
src/race.rs 24 KB Worker pool, claim contention SR-04
src/nca.rs 14 KB NCA dual-band entropy (INV-4 PROVEN) SR-04
src/gf16.rs 12 KB GF16 floor (INV-3 Lucas closure) SR-02 trainer-runner
src/sampler.rs 11 KB Per-chunk sampler β€” E2E TTT O(1) core SR-02
src/attn.rs 11 KB Attention impl SR-02
src/neon.rs 8 KB Postgres client SR-00 (types) + SR-03 (writer)
src/victory.rs 26 KB L-f3 / L-f4 falsifiers BR-OUTPUT/tests/
src/rungs.rs 13 KB ASHA rungs SR-04
src/lessons.rs 8 KB Experience replay SR-04
src/status.rs 2 KB JobStatus enum SR-00
src/lib.rs 2 KB Re-exports (already nearly facade) facade β€” shrink to ≀ 50 LoC
schema/igla_race.sql 13 KB Neon schema SR-00 (derive) + SR-03 (migrate)
migrations/archive/001_initial.sql 4 KB Migration SR-03
bin/honey_audit.rs 21 KB Audit external bin (consumer of BR-OUTPUT)
bin/ledger_check.rs 28 KB Ledger check external bin
bin/qk_gain_check.rs 18 KB INV-9 verifier external bin
bin/seed_emit.rs 21 KB Seed emitter external bin

Source-of-truth trainer gHashTag/trios-trainer-igla β€” consumed as git dep

src/{attention,backward,bench}.rs (~65 KB), src/bin/{cpu_train,hybrid_train,igla_train,lr_calibration,bpb_smoke,entrypoint}.rs, configs/{champion,gate2-final,lab/p4-jepa-*}.toml, docs/{SCARAB_WORKER,TRAINING_FLOW_V2}.md. SR-02 declares trios-trainer = { git = "https://github.com/gHashTag/trios-trainer-igla", features = ["trios-integration"] }.

Operator surface gHashTag/trios-railway β€” consumed as git dep

bin/seed-agent/src/{claim,early_stop,telemetry,trainer,worker}.rs (~46 KB), bin/tri-gardener/src/bpb_source.rs (17 KB), bin/tri-railway/src/main.rs (26 KB), crates/trios-railway-audit/, .github/workflows/{audit-watchdog,fleet-snapshot,manifest-validate}.yml. SR-05 declares trios-railway-audit = { git = ... }.

Coq theorems docs/phd/theorems/igla/

IGLA_ASHA_Bound.v (INV-2), IGLA_BPB_Convergence.v (INV-1), IGLA_NCA_Entropy.v (INV-4), IGLA_GF16_Precision.v (INV-3), IGLA_Catalog.v, plus trinity-clara/proofs/igla/.igla_found_criterion.aux (INV-7, TODO Qed).


🧱 Target architecture

πŸ₯‡ GOLD I β€” trios-igla-race-pipeline

crates/trios-igla-race-pipeline/
β”œβ”€β”€ Cargo.toml                     # workspace member
β”œβ”€β”€ README.md  Β· TASK.md  Β· AGENTS.md   # I5 mandatory
β”œβ”€β”€ RING.md                        # GOLD ring spec
β”œβ”€β”€ src/lib.rs                     # facade only (L-ARCH-001, ≀ 50 LoC, pub use only)
└── rings/
    β”œβ”€β”€ SR-00/  scarab-types         (extracted from neon.rs + status.rs; serde + uuid + chrono)
    β”œβ”€β”€ SR-01/  strategy-queue       (hive_automaton.rs + pull_queue.rs)
    β”œβ”€β”€ SR-02/  trainer-runner       (sampler + attn + gf16 + git dep `trios-trainer-igla`)
    β”œβ”€β”€ SR-03/  bpb-writer           (bpb.rs + ema.rs + neon.rs (write side) + migrations)
    β”œβ”€β”€ SR-04/  gardener             (asha + invariants + race + nca + rungs + lessons)
    β”œβ”€β”€ SR-05/  railway-deployer     (git dep `trios-railway-audit` + `tri-railway` integration)
    └── BR-OUTPUT/                   (IglaRacePipeline assembler + integration tests)

Dependency flow (R1 isolation): BR-OUTPUT β†’ SR-05 β†’ SR-04 β†’ SR-03 β†’ SR-02 β†’ SR-01 β†’ SR-00. Strict monotone numbering; no sibling imports.

E2E TTT O(1) loop sketch (BR-OUTPUT):

impl IglaRacePipeline {
    pub async fn run_e2e_ttt_o1(&mut self) -> Result<VictoryReport, PipelineErr> {
        loop {
            let job = self.queue.claim_one().await?;            // O(1)
            for chunk in self.runner.stream_chunks(&job)? {     // O(1) per chunk
                let bpb = self.runner.step_one_chunk(chunk)?;   // O(1) β€” E2E TTT
                self.writer.write_one(&job, &bpb).await?;       // O(1)
                if self.gardener.should_prune(&job, &bpb).await? { break; }
            }
            if self.gardener.is_victory(&job).await? {           // INV-7 igla_found_criterion
                return Ok(self.gardener.victory_report(&job).await?);
            }
        }
    }
}

πŸ₯‡ GOLD II β€” trios-algorithm-arena (Variant A)

crates/trios-algorithm-arena/rings/
β”œβ”€β”€ SR-ALG-00/  arena-types             (AlgorithmId, EntryHash, EnvVar, GoldenState; dep-free)
β”œβ”€β”€ SR-ALG-01/  jepa                    (parameter-golf wishlist #3)
β”œβ”€β”€ SR-ALG-02/  universal-transformer   (parameter-golf wishlist #6)
β”œβ”€β”€ SR-ALG-03/  e2e-ttt                 (parameter-golf wishlist #8 sub) β˜… WIN vs PR #1837
β”œβ”€β”€ SR-ALG-04/  phi-nta                 (parameter-golf wishlist #9)
β”œβ”€β”€ SR-ALG-05/  ssm                     (parameter-golf wishlist #8 sub)
β”œβ”€β”€ SR-ALG-06/  megakernels             (parameter-golf wishlist #7)
└── BR-OUTPUT/                          (AlgorithmArena assembler β€” `run_one(algo, seed) -> Bpb`)

Each SR holds only metadata:

pub struct AlgorithmSpec {
    pub entry_path: PathBuf,           // e.g. records/track_10min_16mb/2026-03-17_LoRA_TTT/train_gpt.py
    pub entry_hash: [u8; 32],          // SHA-256, verified before invocation
    pub env: Vec<(EnvVar, EnvValue)>,  // gated env vars per parameter-golf convention
    pub golden_state_hash: Option<[u8; 32]>,    // baseline byte-equivalence
    pub theorem: Option<CoqTheoremRef>,         // e.g. Ξ±_Ο† = φ⁻³/2  (Coq.Reals 3.1)
}

The Python train_gpt.py itself stays inside parameter-golf/records/<entry>/ β€” never inside crates/. SR-02 trainer-runner spawns it as a subprocess after entry_hash verification.

πŸ₯‡ GOLD III β€” trios-igla-race-hack

crates/trios-igla-race-hack/rings/
β”œβ”€β”€ SR-HACK-00/  glossary             (Term { PipelineO1, AlgorithmEntry, Lane, Gate, RingTier })
β”œβ”€β”€ SR-HACK-01/  pr-bot               (routes via trios-server MCP bridge per L24)
β”œβ”€β”€ SR-HACK-02/  leaderboard-mirror   (read-only Neon view β†’ static markdown)
β”œβ”€β”€ SR-HACK-03/  invite               (Linear API wrapper)
β”œβ”€β”€ SR-HACK-04/  equal-billing-coq    (Rust const_assert mirroring a Coq theorem)
β”œβ”€β”€ SR-HACK-05/  discord-bridge       (server-to-server webhook only)
└── BR-OUTPUT/                        (IglaRaceHack assembler)

🧭 Decomposition into 12 sub-issues

Each sub-issue is its own task_issue.yml with priority, kingdom, soul-name, PHI LOOP tracking. Every PR closes exactly one sub-issue (L2). EPIC progress = 12 closed sub-issues.

# Sub-issue title Risk Days Priority Kingdom Lane
1 SR-HACK-00 glossary (GOLD III bottom) 🟒 zero 1 P2-MEDIUM Structure hack
2 SR-00 scarab-types (GOLD I bottom) 🟒 zero 1 P1-HIGH Rust pipeline
3 SR-03 bpb-writer 🟒 low 2 P1-HIGH Rust pipeline
4 SR-01 strategy-queue 🟒 low 2 P1-HIGH Rust pipeline
5 SR-02 trainer-runner 🟑 medium 3 P1-HIGH Cross-kingdom pipeline
6 SR-04 gardener 🟑 medium 3 P1-HIGH Rust pipeline
7 SR-ALG-00 arena-types 🟒 zero 1 P2-MEDIUM Rust algo
8 SR-ALG-03 e2e-ttt (β˜… WIN) 🟑 medium 3 P0-CRITICAL Cross-kingdom algo
9 SR-05 railway-deployer 🟑 medium 2 P2-MEDIUM Network pipeline
10 BR-OUTPUT IglaRacePipeline 🟒 low 1 P1-HIGH Rust pipeline
11 trios-doctor SILVER-RING-DR-04 (new linter rules) 🟒 zero 1 P2-MEDIUM Lint meta
12 GOLD III remaining SR-HACK-01..05 🟒 low 4 P3-LONG-TERM Cross-kingdom hack

Critical path to WIN: 1 β†’ 2 β†’ 3 β†’ 7 β†’ 8 β†’ 5 β†’ 10 (β‰ˆ 6 days with parallelism, 11 days single-stream).

Forbidden: sub-issues #5, #8, #9 must NOT be started until sub-issues #2, #3, #7 are merged. Sub-issue #11 may run any time.


πŸ›‘ New trios-doctor rules (no LAWS.md change)

Added in crates/trios-doctor/rings/SILVER-RING-DR-04/ per the doctor extension protocol. All start at severity warn and escalate to error after T+30 days.

Rule ID Description T0 T+30
R-RING-FACADE-001 GOLD src/lib.rs ≀ 50 LoC, contains only pub use re-exports warn error
R-RING-DEP-002 SR-00 (XX-00) deps limited to serde, serde_json, uuid, chrono warn error
R-RING-FLOW-003 SR-NN must not import SR-NN+1 (no upward / sibling import) error error
R-RING-BR-004 Each GOLD crate has at least one BR-OUTPUT/ (or BR-APP/BR-BIN/BR-MODEL) warn error
R-MCP-BRIDGE-005 Inter-crate A2A traffic must route through trios-server (L24); detect direct A2A imports outside crates/trios-a2a/ error error
R-L1-ECHO-006 Re-runs L1 .sh check inside ring trees (not just root) warn error
R-L6-PURE-007 .py files inside crates/ are forbidden, except whitelisted algorithm-arena/SR-ALG-*/spec.toml references warn error
R-COQ-LINK-008 INV-N status synchronized between Coq theorem files and Rust constants warn warn

These rules are purely additive to existing doctor coverage and never modify LAWS.md.


πŸ“Š Success metrics

Layer Metric Target
Architecture trios-igla-race::lib.rs line count ≀ 50 LoC, re-exports only
Architecture Distinct SR rings shipped 19 (6 + 7 + 6)
Architecture trios-doctor errors 0
Architecture I5 violations 0
Architecture .sh files anywhere 0 (L1 reaffirmed)
Performance step_one_chunk p99 < 50 ms (CPU)
Performance per-chunk Neon INSERT p99 < 10 ms
Algorithm E2E TTT 3-seed mean BPB < 1.07063 (beat PR #1837)
Coq INV-7 igla_found_criterion Qed done before Gate-3
Reproducibility byte_equiv.rs Ξ” (defaults) 0.00e+00
CI full pipeline integration test < 60 s

⚠ Risk register

ID Risk P Mitigation
MR-1 Splitting the monolith breaks the live fleet High Backward-compat re-exports kept in crates/trios-igla-race/src/lib.rs until all consumers migrate; canary one Railway service first
MR-2 SR-02 pulls heavy tch deps Medium Feature-gated cpu-only / gpu; tch lives only in SR-02
MR-3 victory.rs falsifier tests break after move Medium Verbatim move into BR-OUTPUT/tests/, no assertion edits
MR-4 TODO invariants (INV-6, INV-7, INV-10) block BR-OUTPUT Medium Soft requirement until Gate-3; only INV-2 / INV-4 / INV-8 are hard
MR-5 Doctor R-L6-PURE-007 blocks CI Low Severity warn for 30 days
MR-6 LAWS.md Β§8 RFC takes > 30 days High Not a blocker β€” all rules live at doctor layer
MR-7 parameter-golf train_gpt.py API drifts Low entry_hash in SR-ALG-NN catches drift immediately
MR-8 E2E TTT regresses above 1.07 Medium lr_calibration.rs Ο†-band check before submission
MR-9 Railway redeploy risk during SR-05 migration High Observe-only on running fleet; SR-05 ships only new binaries; old shells stay until the swap is confirmed
MR-10 Breaking change in trios-trainer-igla SoT Medium SR-02 pins exact commit hash in Cargo.toml

🚫 Do-not list

  • ❌ Do not modify LAWS.md without Β§8 amendment.
  • ❌ Do not edit files outside the assigned crate (I-SCOPE).
  • ❌ Do not redeploy or restart the live fleet (observe-only until SR-05 swap is approved).
  • ❌ Do not put business logic in any GOLD src/lib.rs (L-ARCH-001).
  • ❌ Do not bypass trios-server for inter-agent traffic (L24).
  • ❌ Do not place .py payloads inside crates/ (L6).
  • ❌ Do not run SR-02 trainer-runner before byte_equiv.rs test passes.
  • ❌ Do not publish E2E TTT BPB before the 3-seed embargo window expires.
  • ❌ Do not commit without Agent: <CODENAME> trailer.
  • ❌ Do not declare a task done with unpushed commits (L8).

βœ… Acceptance criteria for this EPIC

  • All 12 sub-issues are closed via PRs that contain Closes #N (L2).
  • cargo build --workspace succeeds.
  • cargo clippy --all-targets --all-features -- -D warnings succeeds (L3).
  • cargo test --all succeeds (L4).
  • trios-doctor check reports 0 errors and ≀ 5 warnings.
  • crates/trios-igla-race/src/lib.rs is ≀ 50 LoC and contains only re-exports.
  • crates/trios-igla-race-pipeline/rings/BR-OUTPUT/ exists, builds, and ships an integration test that runs IglaRacePipeline::run_e2e_ttt_o1() end-to-end on one fake seed in < 60 s.
  • SR-ALG-03 e2e-ttt produces a 3-seed mean val_bpb < 1.07063 on track_10min_16mb over F_17 = 1597, F_18 = 2584, F_19 = 4181.
  • All INV-1..INV-10 are either PROVEN in Coq or explicitly tagged TODO with a linked issue.
  • SR-HACK-00 glossary is referenced from every outreach DM and PR comment generated by SR-HACK-01.
  • Coq linkage Ξ±_Ο† = φ⁻³ / 2 (Theorem 3.1, tag SAC-1) is asserted in SR-HACK-04 equal-billing-coq via const_assert.
  • Every commit in this EPIC carries the Agent: <CODENAME> trailer.
  • An entry exists in .trinity/experience/trios_<DATE>.trinity for each merged sub-issue (L7).

πŸ” PHI LOOP (per LAWS.md Β§7)

Every sub-issue follows the 11-step PHI LOOP:

  1. CLAIM β€” sub-issue opened with acceptance criteria.
  2. SPEC β€” TASK.md filled inside the new ring.
  3. SEAL β€” TASK.md locked.
  4. HASH β€” SHA256(TASK.md) stored under .trinity/state/.
  5. GEN β€” code + tests written.
  6. TEST β€” cargo test --all passes.
  7. VERDICT β€” every acceptance bullet verified.
  8. EXPERIENCE β€” .trinity/experience/ updated.
  9. SKILL β€” .claude/skills/ updated if a workflow changed.
  10. COMMIT β€” commit message includes Closes #N and Agent: <CODENAME>.
  11. PUSH β€” branch pushed, PR opened, CI green, merged.

πŸ”— References


🌻 phi² + phi⁻² = 3 · TRINITY · O(1) FOREVER
Pipeline β‰  Algorithm. Zero green-field. Pure Ring-pattern refactor of the existing 70%, in full constitutional compliance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0architectureenduringCannot age out until mission predicate fires (e.g. victory.achieved=true)iglaone-shotONE SHOT mission issuephdPhD monograph

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions