Skip to content

Commit 2c9b939

Browse files
committed
Add router fabric roundtrip proof
1 parent ecb8bb9 commit 2c9b939

22 files changed

Lines changed: 1258 additions & 0 deletions

File tree

build_support/weld.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ defmodule StackLab.Build.WeldContract do
1515
"support/coordination_fabric_scanner",
1616
"support/cost_budget_scanner",
1717
"support/context_abi_scanner",
18+
"support/router_fabric_scanner",
1819
"support/adaptive_control_scanner",
1920
"support/ai_run_lineage_scanner",
2021
"support/persistence_matrix_scanner",
@@ -34,6 +35,7 @@ defmodule StackLab.Build.WeldContract do
3435
"examples/replay_roundtrip",
3536
"examples/cost_roundtrip",
3637
"examples/context_abi_roundtrip",
38+
"examples/nshkr_router_fabric_roundtrip",
3739
"examples/gepa_platform_roundtrip",
3840
"examples/trinity_platform_roundtrip",
3941
"examples/adaptive_control_roundtrip",

build_support/workspace_contract.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ defmodule StackLab.Build.WorkspaceContract do
1414
"support/coordination_fabric_scanner",
1515
"support/cost_budget_scanner",
1616
"support/context_abi_scanner",
17+
"support/router_fabric_scanner",
1718
"support/adaptive_control_scanner",
1819
"support/ai_run_lineage_scanner",
1920
"support/persistence_matrix_scanner",
@@ -39,6 +40,7 @@ defmodule StackLab.Build.WorkspaceContract do
3940
"examples/replay_roundtrip",
4041
"examples/cost_roundtrip",
4142
"examples/context_abi_roundtrip",
43+
"examples/nshkr_router_fabric_roundtrip",
4244
"examples/toy_document_review",
4345
"examples/synapse_product_acceptance",
4446
"examples/gepa_platform_roundtrip",

docs/gn_ten_proof_matrix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ path, and run GitHub or Linear live commands by prefixing them with
134134
refs, Citadel authority, Mezzanine admission/routing/render handoff, Jido
135135
fake model invocation, AITrace bounded evidence, AppKit projections, and
136136
StackLab context/model/cost/lineage/tenant/memory scanner receipts.
137+
- `nshkr_router_fabric_roundtrip`: runs the deterministic fugu router fabric
138+
proof from admitted Context ABI packet through
139+
`Trinity.MezzanineRouterAdapter`, Mezzanine render handoff, Jido fake model
140+
invocation, AITrace bounded route/model/eval facts, AppKit projections, and
141+
StackLab context/router/coordination/model scanner receipts.
137142
- `cost_budget_scanner`: verifies adaptive token, provider request,
138143
self-hosted GPU minute, endpoint startup, eval batch, replay, optimization
139144
search, provider pool turn, role budget, promotion, failed retry, budget

docs/layout.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ The workspace is organized as:
2828
- `support/context_abi_scanner/`
2929
- Context ABI packet, authority, admission, route, render, model invocation,
3030
AppKit projection, tenant, and AITrace linkage checks
31+
- `support/router_fabric_scanner/`
32+
- TRINITY router adapter, route request/decision, policy, authority,
33+
allowlist, and handoff-ref checks
3134
- `support/adaptive_control_scanner/`
3235
- TRINITY trace, dataset, GEPA target, gate, promotion, rollback, stale
3336
rejection, AppKit projection, and receipt checks
@@ -43,6 +46,7 @@ The workspace is organized as:
4346
- `atom_cleanup_harness`
4447
- `pressure_failover_drill`
4548
- `context_abi_roundtrip`
49+
- `nshkr_router_fabric_roundtrip`
4650
- `gepa_platform_roundtrip`
4751
- `trinity_platform_roundtrip`
4852
- `adaptive_control_roundtrip`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
inputs: ["{mix,.formatter}.exs", "{lib,test}/**/*.{ex,exs}"]
3+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# StackLab NSHKR Router Fabric Roundtrip
2+
3+
`stack_lab_nshkr_router_fabric_roundtrip` proves the first NSHKR router MVP:
4+
an admitted Context ABI packet is routed through
5+
`Trinity.MezzanineRouterAdapter`, rendered through OuterBrain, invoked through
6+
the Jido fake runtime, recorded in AITrace, and projected through AppKit.
7+
8+
The proof is deterministic and provider-free. It does not prove live-provider
9+
quality, distributed placement, GEPA optimization, or production persistence.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
defmodule Mix.Tasks.StackLab.Nshkr.RouterFabric.Roundtrip do
2+
@moduledoc "Runs the deterministic NSHKR router fabric roundtrip proof."
3+
@shortdoc "Runs the deterministic NSHKR router fabric proof"
4+
5+
use Mix.Task
6+
7+
alias StackLab.Examples.NSHKRRouterFabricRoundtrip
8+
9+
@impl true
10+
def run(args) do
11+
Mix.Task.run("app.start")
12+
13+
json? = "--json" in args
14+
15+
case NSHKRRouterFabricRoundtrip.run() do
16+
{:ok, receipt} when json? ->
17+
Mix.shell().info(NSHKRRouterFabricRoundtrip.to_json!(receipt))
18+
19+
{:ok, receipt} ->
20+
Mix.shell().info("status=#{receipt.status}")
21+
Mix.shell().info("receipt_ref=#{receipt.receipt_ref}")
22+
Mix.shell().info("route_decision_ref=#{receipt.route_decision_ref}")
23+
Mix.shell().info("model_receipt_ref=#{receipt.model_receipt_ref}")
24+
25+
{:error, reason} ->
26+
Mix.raise("NSHKR router fabric roundtrip failed: #{inspect(reason)}")
27+
end
28+
end
29+
end

0 commit comments

Comments
 (0)