Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_geo.py +7 -1
- platform/core/user_tables.py +0 -26
RELEASES.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v53",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "4579959",
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v53",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
4579959
|
api/routes_geo.py
CHANGED
|
@@ -189,8 +189,14 @@ def _clean_zone(raw, previous=None, *, zone_id=""):
|
|
| 189 |
memberships = raw.get("memberships") if "memberships" in raw else previous.get("memberships") or []
|
| 190 |
if not isinstance(memberships, list):
|
| 191 |
raise ValueError("Zone memberships must be a list of record IDs")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
member_ids, seen = [], set()
|
| 193 |
-
for value in memberships
|
| 194 |
try:
|
| 195 |
pid = int(value)
|
| 196 |
except (TypeError, ValueError):
|
|
|
|
| 189 |
memberships = raw.get("memberships") if "memberships" in raw else previous.get("memberships") or []
|
| 190 |
if not isinstance(memberships, list):
|
| 191 |
raise ValueError("Zone memberships must be a list of record IDs")
|
| 192 |
+
# A Zone drives both map selection and scheduled routing. Keeping the first 10,000 ids
|
| 193 |
+
# would make a saved Zone look valid while silently dropping stops from a route, so the
|
| 194 |
+
# request must refuse at the boundary instead. Callers can split an intentionally larger
|
| 195 |
+
# territory into explicit Zones; they must never receive a truncated success response.
|
| 196 |
+
if len(memberships) > MAX_ZONE_MEMBERSHIPS:
|
| 197 |
+
raise ValueError(f"a Zone can contain at most {MAX_ZONE_MEMBERSHIPS:,} record IDs")
|
| 198 |
member_ids, seen = [], set()
|
| 199 |
+
for value in memberships:
|
| 200 |
try:
|
| 201 |
pid = int(value)
|
| 202 |
except (TypeError, ValueError):
|
platform/core/user_tables.py
CHANGED
|
@@ -1365,32 +1365,6 @@ def delete_zone(table_key, zone_id, st=None):
|
|
| 1365 |
return bool(removed)
|
| 1366 |
|
| 1367 |
|
| 1368 |
-
def legacy_route_census(tenant, fields, exact_legacy_names):
|
| 1369 |
-
"""Census exact, tenant-declared legacy route columns without selecting by prefix/pattern.
|
| 1370 |
-
|
| 1371 |
-
This is intentionally a reporting primitive, not a deletion API. A caller must supply the
|
| 1372 |
-
exact legacy names confirmed for this tenant; ``route_*`` and arbitrary columns merely
|
| 1373 |
-
containing the word "route" cannot enter this result. The unified route-order fields stay
|
| 1374 |
-
explicit in the report so retirement code can prove its replacement before it writes.
|
| 1375 |
-
"""
|
| 1376 |
-
tenant = str(tenant or '').strip()
|
| 1377 |
-
names = (exact_legacy_names.get(tenant, ()) if isinstance(exact_legacy_names, dict)
|
| 1378 |
-
else exact_legacy_names)
|
| 1379 |
-
exact = {str(name).strip().casefold() for name in (names or ()) if str(name).strip()}
|
| 1380 |
-
candidates, unified = [], []
|
| 1381 |
-
for field in fields or ():
|
| 1382 |
-
if not isinstance(field, dict):
|
| 1383 |
-
continue
|
| 1384 |
-
key, label = str(field.get('key') or ''), str(field.get('label') or '')
|
| 1385 |
-
if field.get('kind') == 'route_order':
|
| 1386 |
-
unified.append(key)
|
| 1387 |
-
if exact and (key.casefold() in exact or label.casefold() in exact):
|
| 1388 |
-
candidates.append(key)
|
| 1389 |
-
return {'tenant': tenant, 'exactNames': sorted(exact),
|
| 1390 |
-
'candidates': candidates, 'unifiedRouteFields': unified,
|
| 1391 |
-
'retirementReady': bool(candidates and unified)}
|
| 1392 |
-
|
| 1393 |
-
|
| 1394 |
def is_user_table(table_key, st=None):
|
| 1395 |
"""THE permission predicate for row writes. Cheap and total: a key that is not in this store
|
| 1396 |
is not a user table, so it cannot accept invented rows."""
|
|
|
|
| 1365 |
return bool(removed)
|
| 1366 |
|
| 1367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1368 |
def is_user_table(table_key, st=None):
|
| 1369 |
"""THE permission predicate for row writes. Cheap and total: a key that is not in this store
|
| 1370 |
is not a user table, so it cannot accept invented rows."""
|