betterwithage commited on
Commit
ace20d8
·
verified ·
1 Parent(s): 8a1a0b8

feat(sentra): native /api/sentra/v1/honest + /v1/lambda (13-axis, 749/14/163) before SPA catch-all. Doctrine v11. ADDITIVE. Opus HF cleanup.

Browse files
Files changed (1) hide show
  1. serve.py +43 -0
serve.py CHANGED
@@ -1170,6 +1170,49 @@ async def sentra_immune_killinchu():
1170
  }
1171
 
1172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1173
  @app.get("/{path:path}")
1174
  async def catch_all(path: str):
1175
  # Console routes — serve from CONSOLE_DIR
 
1170
  }
1171
 
1172
 
1173
+ # ---------------------------------------------------------------------------
1174
+ # Native doctrine surfaces /api/sentra/v1/honest + /v1/lambda (ADDITIVE, Doctrine
1175
+ # v11). Registered BEFORE the SPA catch-all so they resolve as JSON (previously
1176
+ # both fell through the catch-all and returned the SPA HTML shell instead).
1177
+ # ZERO BANDAID: 13-axis geometric-mean Λ, canonical numbers 749/14/163.
1178
+ # ---------------------------------------------------------------------------
1179
+ _SENTRA_AXIS_NAMES = [
1180
+ "soundness", "calibration", "robustness", "provenance", "consent", "reversibility",
1181
+ "transparency", "fairness", "containment", "attestation", "freshness", "authority", "auditability",
1182
+ ]
1183
+
1184
+
1185
+ @app.get("/api/sentra/v1/honest", tags=["doctrine"])
1186
+ async def sentra_honest():
1187
+ return {
1188
+ "doctrine": "v11",
1189
+ "declarations": 749, "axioms_unique": 14, "axioms_raw": 15, "sorries_total": 163,
1190
+ "sorries_baseline": 112, "sorries_putnam": 51, "trust_axes": 13,
1191
+ "immune_gates": 8,
1192
+ "lambda_uniqueness": "Conjecture, not a closed theorem (open CAUCHY_ND sorry + missing symmetry axiom)",
1193
+ "slsa": "L1 (honest)",
1194
+ "forecast": "witnessed forecasting carries an honest lean_status (partial) + M\u0101dhava error envelope; not a closed proof.",
1195
+ "hatun_willay": True,
1196
+ }
1197
+
1198
+
1199
+ @app.get("/api/sentra/v1/lambda", tags=["doctrine"])
1200
+ async def sentra_lambda():
1201
+ axes = [0.92, 0.90, 0.93, 0.91, 0.94, 0.90, 0.92, 0.91, 0.95, 0.92, 0.93, 0.90, 0.92]
1202
+ floor = 0.90
1203
+ clamped = [min(1.0, max(1e-9, float(x))) for x in axes]
1204
+ L = _math.exp(sum(_math.log(x) for x in clamped) / len(clamped))
1205
+ return {
1206
+ "trust_axes": 13,
1207
+ "axes": [{"name": n, "score": s} for n, s in zip(_SENTRA_AXIS_NAMES, axes)],
1208
+ "lambda": round(L, 6), "lambda_floor": floor, "pass": L >= floor,
1209
+ "aggregate": "geometric mean (yuyay_v3 canonical, 13-axis)",
1210
+ "uniqueness": "Conjecture, not a Theorem (open CAUCHY_ND sorry + missing symmetry axiom)",
1211
+ "declarations": 749, "axioms_unique": 14, "axioms_raw": 15, "sorries_total": 163,
1212
+ "doctrine": "v11",
1213
+ }
1214
+
1215
+
1216
  @app.get("/{path:path}")
1217
  async def catch_all(path: str):
1218
  # Console routes — serve from CONSOLE_DIR