Spaces:
Running
Running
chore(sync): mirror backend .py + Dockerfile to Space (hf-sync-backend)
Browse filesAutomated backend sync from szl-holdings/a11oy main via hf-sync-backend.
Updated (differed from the Space): serve.py
Deleted (gone from the repo + Dockerfile COPY set): (none)
Keeps the Space-built backend (serve.py + the Dockerfile-COPY'd .py
modules) identical to GitHub main so the Space never rebuilds from a
stale backend, new endpoints don't 404 there, and orphaned modules
removed from the repo don't linger in the Space tree.
serve.py
CHANGED
|
@@ -376,6 +376,28 @@ try:
|
|
| 376 |
except Exception as _szl_im_e: # pragma: no cover
|
| 377 |
print(f"[a11oy] Immune NOT registered: {_szl_im_e!r}; SPA + API unaffected", file=__import__("sys").stderr)
|
| 378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
# -- Energy LEDGER (signed, hash-chained JouleCharge receipts) -- REGRESSION RESTORE.
|
| 380 |
# Route /api/a11oy/v1/energy/ledger (+ receipt/{idem}) is the read surface for the
|
| 381 |
# metering ledger the /energy tab consumes. Its registration was dropped during a
|
|
|
|
| 376 |
except Exception as _szl_im_e: # pragma: no cover
|
| 377 |
print(f"[a11oy] Immune NOT registered: {_szl_im_e!r}; SPA + API unaffected", file=__import__("sys").stderr)
|
| 378 |
|
| 379 |
+
# -- Fabric / Tawantin + Auto-review — HONEST /status SUMMARY surfaces -- doctrine v11 (sweep D5).
|
| 380 |
+
# The /fabric + /tawantin + /autoreview PAGES are live, but a page-vs-api sweep
|
| 381 |
+
# found no honest /api/a11oy/v1/{tawantin,fabric}/status summary (404) and no
|
| 382 |
+
# /api/a11oy/v1/autoreview/status (the autoreview module registers
|
| 383 |
+
# classify/policy/metrics/dial/recent, not /status). The REAL data already lives
|
| 384 |
+
# at /api/a11oy/v1/compute-pool-hardened (nodes/reachability/sovereignty, LIVE),
|
| 385 |
+
# /api/a11oy/v1/energy/operator/status (MEASURED joules, LIVE),
|
| 386 |
+
# /api/a11oy/v1/energy/provenance (signed chain head, LIVE) and the live
|
| 387 |
+
# autoreview metrics/dial/policy. szl_fabric_surface mounts honest SUMMARY
|
| 388 |
+
# endpoints that AGGREGATE those live sources (short loopback self-call, cheap/
|
| 389 |
+
# cached) and report ONLY what they truly say — it duplicates NO node data and
|
| 390 |
+
# fabricates NO joule/node value (UNKNOWN when a source is unreachable).
|
| 391 |
+
# HORIZONTAL scale only (NEVER a fused-VRAM claim); orbital ROADMAP; NO codename;
|
| 392 |
+
# locked=8; the underlying sources already sign (Khipu receipt optional here).
|
| 393 |
+
# Additive, try/except-guarded, registered BEFORE the SPA catch-all.
|
| 394 |
+
try:
|
| 395 |
+
import szl_fabric_surface as _szl_fabric_surface
|
| 396 |
+
_szl_fabric_surface.register(app, ns="a11oy")
|
| 397 |
+
print("[a11oy] Fabric/Tawantin + Auto-review summaries registered: /api/a11oy/v1/{tawantin,fabric}/status + /api/a11oy/v1/autoreview/status", file=__import__("sys").stderr)
|
| 398 |
+
except Exception as _szl_fab_e: # pragma: no cover
|
| 399 |
+
print(f"[a11oy] Fabric/Tawantin + Auto-review summaries NOT registered: {_szl_fab_e!r}; SPA + API unaffected", file=__import__("sys").stderr)
|
| 400 |
+
|
| 401 |
# -- Energy LEDGER (signed, hash-chained JouleCharge receipts) -- REGRESSION RESTORE.
|
| 402 |
# Route /api/a11oy/v1/energy/ledger (+ receipt/{idem}) is the read surface for the
|
| 403 |
# metering ledger the /energy tab consumes. Its registration was dropped during a
|