fsanyoto commited on
Commit
f5dd7ca
·
verified ·
1 Parent(s): 62d663e

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
Files changed (3) hide show
  1. VERSION +1 -0
  2. api/main.py +7 -1
  3. api/routes_admin.py +5 -0
VERSION ADDED
@@ -0,0 +1 @@
 
 
1
+ v1 (19e7a35)
api/main.py CHANGED
@@ -161,7 +161,13 @@ def _store_unavailable(request: Request, exc: grid_events.StoreUnavailable):
161
  def health():
162
  """Unauthenticated LIVENESS only — it must answer before anyone can sign in, so it may not
163
  reveal anything about the deployment beyond "the process is up". No version, no tenant list,
164
- no config: a health endpoint is the one URL every scanner finds first."""
 
 
 
 
 
 
165
  return {"ok": True}
166
 
167
 
 
161
  def health():
162
  """Unauthenticated LIVENESS only — it must answer before anyone can sign in, so it may not
163
  reveal anything about the deployment beyond "the process is up". No version, no tenant list,
164
+ no config: a health endpoint is the one URL every scanner finds first.
165
+
166
+ ⛔ THE VERSION DOES NOT GO HERE, and it was asked to (2026-08-04, when LIVE became a pinned
167
+ release and "what is LIVE running" needed an answer). A build identifier tells an unauthenticated
168
+ caller exactly which commit's known issues apply. It rides `GET /api/v1/settings` instead, behind
169
+ a session — and the authoritative copy is the `VERSION` file in the Space repo, which
170
+ `deploy_web.space_version()` reads without needing the app to be up at all."""
171
  return {"ok": True}
172
 
173
 
api/routes_admin.py CHANGED
@@ -28,6 +28,7 @@ read semantics are untouched — the seam is write-strict / read-unchanged.
28
  one level down, and serving that as `{"users": []}` would tell an administrator their tenant has no
29
  accounts. Same rule as the write path: an empty 200 is never how this API says "something is wrong".
30
  """
 
31
  import re
32
 
33
  from fastapi import APIRouter, Body, Depends, Response
@@ -755,6 +756,10 @@ def settings(session: Session = Depends(require_session)):
755
  """
756
  modules = perms.allowed_modules(session.user)
757
  return {
 
 
 
 
758
  "user": _public_user(session.user),
759
  "scope": {
760
  "bus": perms.allowed_bu_labels(session.user),
 
28
  one level down, and serving that as `{"users": []}` would tell an administrator their tenant has no
29
  accounts. Same rule as the write path: an empty 200 is never how this API says "something is wrong".
30
  """
31
+ import os
32
  import re
33
 
34
  from fastapi import APIRouter, Body, Depends, Response
 
756
  """
757
  modules = perms.allowed_modules(session.user)
758
  return {
759
+ # The build this Space is running. Behind the session on purpose — see `main.py::health`,
760
+ # which refuses it for being the first URL a scanner finds. `deploy_web.py` stamps it as a
761
+ # Space secret at every deploy; absent means "somebody started this container by hand".
762
+ "version": os.environ.get("AIOS_VERSION") or "unknown",
763
  "user": _public_user(session.user),
764
  "scope": {
765
  "bus": perms.allowed_bu_labels(session.user),