Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_odoo_tables.py +9 -24
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v75",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "cade17e",
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v75",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
cade17e
|
api/routes_odoo_tables.py
CHANGED
|
@@ -251,7 +251,8 @@ def odoo_tables_status(brief: bool = Query(False),
|
|
| 251 |
else:
|
| 252 |
n = -1 # unknown, and never reported as zero
|
| 253 |
mirror_refreshed = mirror_stamp(
|
| 254 |
-
spec or {}, cur=cur, table_key=key, rt=session.runtime
|
|
|
|
| 255 |
except Exception: # noqa: BLE001
|
| 256 |
n = -1
|
| 257 |
connection_id = str(((table.get("connector") or {}).get("connectionId")
|
|
@@ -2959,21 +2960,8 @@ def odoo_table_rows(table_key: str,
|
|
| 2959 |
# is a page of* - and that is provable only while there is one of it. What stays here is what
|
| 2960 |
# a WINDOW alone needs: the total order, the projection, the overlay merge and the two
|
| 2961 |
# sentences a page earns (`window_clamped`, the deep-page walk).
|
| 2962 |
-
# HOTFIX 2026-09-23: staging served a 50-row page of order lines in 5-7 s while its SQL runs in
|
| 2963 |
-
# ~80 ms, so every phase of this door reports its own milliseconds in `timing` (read-only, and
|
| 2964 |
-
# the client ignores it). A lag you cannot attribute is a lag nobody fixes.
|
| 2965 |
-
_t0 = time.perf_counter()
|
| 2966 |
-
_timing = {}
|
| 2967 |
-
|
| 2968 |
-
def _lap(name):
|
| 2969 |
-
nonlocal _t0
|
| 2970 |
-
now = time.perf_counter()
|
| 2971 |
-
_timing[name] = round((now - _t0) * 1000)
|
| 2972 |
-
_t0 = now
|
| 2973 |
-
|
| 2974 |
read = _compiled_read(table_key, session, filters=filters, filterConj=filterConj,
|
| 2975 |
sorts=sorts, search=search, related=related)
|
| 2976 |
-
_lap("compiled_read")
|
| 2977 |
defn, fields, cur, spec = read["defn"], read["fields"], read["cur"], read["spec"]
|
| 2978 |
cols, limits, frm = read["cols"], read["limits"], read["frm"]
|
| 2979 |
base_where, wall_params = read["base_where"], read["wall_params"]
|
|
@@ -2993,7 +2981,6 @@ def odoo_table_rows(table_key: str,
|
|
| 2993 |
win = datastore.window(select=f'{spec["id"]} AS "_pid", {select}',
|
| 2994 |
where=where, params=tuple(params), order_by=order,
|
| 2995 |
offset=offset, limit=(limit or None), cur=cur, **frm)
|
| 2996 |
-
_lap("window")
|
| 2997 |
if win["clamped"]:
|
| 2998 |
limits.append({
|
| 2999 |
"subject": "limit", "effect": "window_clamped",
|
|
@@ -3021,9 +3008,8 @@ def odoo_table_rows(table_key: str,
|
|
| 3021 |
# β D-155 β the freshness stamp rides the SAME builder, so both read-through doors answer the
|
| 3022 |
# `refreshed` column identically instead of one of them leaving it blank.
|
| 3023 |
rows_src = _pool_from_window(spec, win,
|
| 3024 |
-
stamp=mirror_stamp(spec, cur, table_key,
|
| 3025 |
session.runtime))
|
| 3026 |
-
_lap("pool_and_stamp")
|
| 3027 |
overlays = {str(r["pid"]): {k: v for k, v in r.items() if k != "pid"} for r in rows_src}
|
| 3028 |
|
| 3029 |
# ββ W30-T28 β THE TENANT-WIDE OVERLAY, ON A READ-THROUGH GRID.
|
|
@@ -3050,7 +3036,6 @@ def odoo_table_rows(table_key: str,
|
|
| 3050 |
# in an overlay column that reads a hidden mirror column was outside its reach - and a formula
|
| 3051 |
# carrying a hidden value is the leak `hidden_keys` exists to close, wearing a second door's
|
| 3052 |
# name. Same wall, asked once the field list is whole.
|
| 3053 |
-
_lap("shared_overlay")
|
| 3054 |
_hidden = perm_scope.hidden_keys(session.user, table_key, fields)
|
| 3055 |
if _hidden:
|
| 3056 |
# BOTH WIRES, and the field list is narrowed BEFORE the rows are built so a hidden column
|
|
@@ -3063,20 +3048,17 @@ def odoo_table_rows(table_key: str,
|
|
| 3063 |
for pid, cells in overlays.items()}
|
| 3064 |
rows = aios_grid.rows_from_pool(rows_src, fields, overlays)
|
| 3065 |
|
| 3066 |
-
_lap("hidden_and_rows")
|
| 3067 |
unfiltered = win["total"] if where == base_where else datastore.window(
|
| 3068 |
select="1", where=base_where, params=tuple(wall_params), order_by=spec["id"],
|
| 3069 |
limit=1, cur=cur, **frm)["total"]
|
| 3070 |
|
| 3071 |
-
_lap("unfiltered_count")
|
| 3072 |
return {"ok": True, "fields": fields, "rows": rows,
|
| 3073 |
# β FROM THE COUNT STATEMENT. Never `len(rows)`.
|
| 3074 |
"total": win["total"], "totalUnfiltered": unfiltered,
|
| 3075 |
"offset": win["offset"], "limit": win["limit"], "limits": limits,
|
| 3076 |
"today": _today(), "identity": {"pid": "pid"},
|
| 3077 |
"scope": {"table": table_key, "readThrough": True},
|
| 3078 |
-
"recordsMutable": bool(defn.get("recordMode") != _ut().AUTOMATION_RECORD_MODE)
|
| 3079 |
-
"timing": _timing}
|
| 3080 |
|
| 3081 |
|
| 3082 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -3390,7 +3372,7 @@ def odoo_table_aggregates(table_key: str, body: dict = Body(default=None),
|
|
| 3390 |
return body_out
|
| 3391 |
|
| 3392 |
|
| 3393 |
-
def mirror_stamp(spec, cur=None, table_key="", rt=None):
|
| 3394 |
"""β D-155 β WHEN THIS READ-THROUGH GRID'S DATA WAS LAST RECONCILED AGAINST ODOO, as a date.
|
| 3395 |
|
| 3396 |
β THE COLUMN EXISTED AND THE BINDING DID NOT, which is the whole of D-155. Every Odoo table
|
|
@@ -3435,9 +3417,12 @@ def mirror_stamp(spec, cur=None, table_key="", rt=None):
|
|
| 3435 |
# the materialised carve-out above, made structural. β Fail-QUIET to `""`: when we cannot
|
| 3436 |
# tell whether this grid stores rows, the safe answer is the behaviour that shipped (blank),
|
| 3437 |
# never a stamp that might overwrite a per-row one.
|
|
|
|
|
|
|
|
|
|
| 3438 |
if table_key:
|
| 3439 |
try:
|
| 3440 |
-
if _ut().materialises(str(table_key), st=rt):
|
| 3441 |
return ""
|
| 3442 |
except Exception: # noqa: BLE001
|
| 3443 |
return ""
|
|
|
|
| 251 |
else:
|
| 252 |
n = -1 # unknown, and never reported as zero
|
| 253 |
mirror_refreshed = mirror_stamp(
|
| 254 |
+
spec or {}, cur=cur, table_key=key, rt=session.runtime,
|
| 255 |
+
defn=(table if isinstance(table, dict) and table else None))
|
| 256 |
except Exception: # noqa: BLE001
|
| 257 |
n = -1
|
| 258 |
connection_id = str(((table.get("connector") or {}).get("connectionId")
|
|
|
|
| 2960 |
# is a page of* - and that is provable only while there is one of it. What stays here is what
|
| 2961 |
# a WINDOW alone needs: the total order, the projection, the overlay merge and the two
|
| 2962 |
# sentences a page earns (`window_clamped`, the deep-page walk).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2963 |
read = _compiled_read(table_key, session, filters=filters, filterConj=filterConj,
|
| 2964 |
sorts=sorts, search=search, related=related)
|
|
|
|
| 2965 |
defn, fields, cur, spec = read["defn"], read["fields"], read["cur"], read["spec"]
|
| 2966 |
cols, limits, frm = read["cols"], read["limits"], read["frm"]
|
| 2967 |
base_where, wall_params = read["base_where"], read["wall_params"]
|
|
|
|
| 2981 |
win = datastore.window(select=f'{spec["id"]} AS "_pid", {select}',
|
| 2982 |
where=where, params=tuple(params), order_by=order,
|
| 2983 |
offset=offset, limit=(limit or None), cur=cur, **frm)
|
|
|
|
| 2984 |
if win["clamped"]:
|
| 2985 |
limits.append({
|
| 2986 |
"subject": "limit", "effect": "window_clamped",
|
|
|
|
| 3008 |
# β D-155 β the freshness stamp rides the SAME builder, so both read-through doors answer the
|
| 3009 |
# `refreshed` column identically instead of one of them leaving it blank.
|
| 3010 |
rows_src = _pool_from_window(spec, win,
|
| 3011 |
+
stamp=mirror_stamp(spec, cur, table_key, defn=defn, rt=
|
| 3012 |
session.runtime))
|
|
|
|
| 3013 |
overlays = {str(r["pid"]): {k: v for k, v in r.items() if k != "pid"} for r in rows_src}
|
| 3014 |
|
| 3015 |
# ββ W30-T28 β THE TENANT-WIDE OVERLAY, ON A READ-THROUGH GRID.
|
|
|
|
| 3036 |
# in an overlay column that reads a hidden mirror column was outside its reach - and a formula
|
| 3037 |
# carrying a hidden value is the leak `hidden_keys` exists to close, wearing a second door's
|
| 3038 |
# name. Same wall, asked once the field list is whole.
|
|
|
|
| 3039 |
_hidden = perm_scope.hidden_keys(session.user, table_key, fields)
|
| 3040 |
if _hidden:
|
| 3041 |
# BOTH WIRES, and the field list is narrowed BEFORE the rows are built so a hidden column
|
|
|
|
| 3048 |
for pid, cells in overlays.items()}
|
| 3049 |
rows = aios_grid.rows_from_pool(rows_src, fields, overlays)
|
| 3050 |
|
|
|
|
| 3051 |
unfiltered = win["total"] if where == base_where else datastore.window(
|
| 3052 |
select="1", where=base_where, params=tuple(wall_params), order_by=spec["id"],
|
| 3053 |
limit=1, cur=cur, **frm)["total"]
|
| 3054 |
|
|
|
|
| 3055 |
return {"ok": True, "fields": fields, "rows": rows,
|
| 3056 |
# β FROM THE COUNT STATEMENT. Never `len(rows)`.
|
| 3057 |
"total": win["total"], "totalUnfiltered": unfiltered,
|
| 3058 |
"offset": win["offset"], "limit": win["limit"], "limits": limits,
|
| 3059 |
"today": _today(), "identity": {"pid": "pid"},
|
| 3060 |
"scope": {"table": table_key, "readThrough": True},
|
| 3061 |
+
"recordsMutable": bool(defn.get("recordMode") != _ut().AUTOMATION_RECORD_MODE)}
|
|
|
|
| 3062 |
|
| 3063 |
|
| 3064 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 3372 |
return body_out
|
| 3373 |
|
| 3374 |
|
| 3375 |
+
def mirror_stamp(spec, cur=None, table_key="", rt=None, defn=None):
|
| 3376 |
"""β D-155 β WHEN THIS READ-THROUGH GRID'S DATA WAS LAST RECONCILED AGAINST ODOO, as a date.
|
| 3377 |
|
| 3378 |
β THE COLUMN EXISTED AND THE BINDING DID NOT, which is the whole of D-155. Every Odoo table
|
|
|
|
| 3417 |
# the materialised carve-out above, made structural. β Fail-QUIET to `""`: when we cannot
|
| 3418 |
# tell whether this grid stores rows, the safe answer is the behaviour that shipped (blank),
|
| 3419 |
# never a stamp that might overwrite a per-row one.
|
| 3420 |
+
# HOTFIX 2026-09-23: `defn` is LENT by a caller already holding the definition. Without it
|
| 3421 |
+
# `materialises` falls through to a whole-document `user_tables` read, measured on staging
|
| 3422 |
+
# at ~3 s of every 50-row page of order lines (the `timing` phase `pool_and_stamp`).
|
| 3423 |
if table_key:
|
| 3424 |
try:
|
| 3425 |
+
if _ut().materialises(str(table_key), st=rt, defn=defn):
|
| 3426 |
return ""
|
| 3427 |
except Exception: # noqa: BLE001
|
| 3428 |
return ""
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
24627497711b660cc5ce36e5660e35df53eb33d42f84b28e6089009067805003
|