Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/application_registry.py +24 -2
- api/odoo_relational.py +2 -0
- api/routes_external.py +2 -3
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "8bd5e4b1a9",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
8bd5e4b1a9
|
api/application_registry.py
CHANGED
|
@@ -485,8 +485,27 @@ def _application_key(runtime, app_id):
|
|
| 485 |
return _KEY
|
| 486 |
|
| 487 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 488 |
def load(runtime, *, strict=False):
|
| 489 |
"""The read door: a Routing or Catalog App carries its C1 binding (`app_templates.bound`)."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 490 |
try:
|
| 491 |
doc = _clean_doc(runtime.get(_KEY))
|
| 492 |
for record in _record_documents(runtime).values():
|
|
@@ -496,8 +515,11 @@ def load(runtime, *, strict=False):
|
|
| 496 |
raise
|
| 497 |
raise_if_resource_error(exc)
|
| 498 |
return blank_doc()
|
| 499 |
-
doc["applications"] = {
|
| 500 |
-
for
|
|
|
|
|
|
|
|
|
|
| 501 |
return doc
|
| 502 |
|
| 503 |
|
|
|
|
| 485 |
return _KEY
|
| 486 |
|
| 487 |
|
| 488 |
+
def _request_memo():
|
| 489 |
+
"""`(accumulator, table, epoch)` for one registry read per request, or None outside a request.
|
| 490 |
+
|
| 491 |
+
The epoch is taken before the read: a store write moves it, so a later load reads again."""
|
| 492 |
+
from core import request_timing
|
| 493 |
+
acc = request_timing.CURRENT.get()
|
| 494 |
+
if acc is None or acc.closed or acc.read_memo_ended:
|
| 495 |
+
return None
|
| 496 |
+
with acc.lock:
|
| 497 |
+
return acc, acc.__dict__.setdefault("application_registry_memo", {}), acc.read_memo_epoch
|
| 498 |
+
|
| 499 |
+
|
| 500 |
def load(runtime, *, strict=False):
|
| 501 |
"""The read door: a Routing or Catalog App carries its C1 binding (`app_templates.bound`)."""
|
| 502 |
+
memo, key = _request_memo(), (getattr(runtime, "key", None), id(runtime))
|
| 503 |
+
if memo is not None:
|
| 504 |
+
acc, table, epoch = memo
|
| 505 |
+
with acc.lock:
|
| 506 |
+
hit = table.get(key)
|
| 507 |
+
if hit and hit[0] == epoch == acc.read_memo_epoch:
|
| 508 |
+
return copy.deepcopy(hit[1])
|
| 509 |
try:
|
| 510 |
doc = _clean_doc(runtime.get(_KEY))
|
| 511 |
for record in _record_documents(runtime).values():
|
|
|
|
| 515 |
raise
|
| 516 |
raise_if_resource_error(exc)
|
| 517 |
return blank_doc()
|
| 518 |
+
doc["applications"] = {app_id: _app_projection(app)
|
| 519 |
+
for app_id, app in doc["applications"].items()}
|
| 520 |
+
if memo is not None:
|
| 521 |
+
with acc.lock:
|
| 522 |
+
table[key] = (epoch, copy.deepcopy(doc))
|
| 523 |
return doc
|
| 524 |
|
| 525 |
|
api/odoo_relational.py
CHANGED
|
@@ -5989,6 +5989,8 @@ def plan(cur, rt=None, connection_id=None, buckets=None):
|
|
| 5989 |
# be eligible FOR), but the law is written without an exception, so this lends the evaluator
|
| 5990 |
# the definition instead of taking one. `_ensure_table_inplace` writes exactly this stamp, so
|
| 5991 |
# what is lent is the document as it stands the moment this plan applies.
|
|
|
|
|
|
|
| 5992 |
for k in READ_THROUGH_KEYS:
|
| 5993 |
tk = table_key_for(k, connection_id)
|
| 5994 |
existing[tk] = {**(existing.get(tk) or {}), "readThrough": True}
|
|
|
|
| 5989 |
# be eligible FOR), but the law is written without an exception, so this lends the evaluator
|
| 5990 |
# the definition instead of taking one. `_ensure_table_inplace` writes exactly this stamp, so
|
| 5991 |
# what is lent is the document as it stands the moment this plan applies.
|
| 5992 |
+
# A shallow copy: plan() only reads, so its stamps must never land in the object the store lent.
|
| 5993 |
+
existing = dict(existing)
|
| 5994 |
for k in READ_THROUGH_KEYS:
|
| 5995 |
tk = table_key_for(k, connection_id)
|
| 5996 |
existing[tk] = {**(existing.get(tk) or {}), "readThrough": True}
|
api/routes_external.py
CHANGED
|
@@ -3565,9 +3565,8 @@ def _database_record_write_guard(session, database, *, field_keys=None):
|
|
| 3565 |
|
| 3566 |
guard = routes_tables._records_or_refuse
|
| 3567 |
if field_keys is not None and not user_tables.records_mutable(database, st=session.runtime):
|
| 3568 |
-
#
|
| 3569 |
-
|
| 3570 |
-
return guard(session, database, field_keys=field_keys)
|
| 3571 |
return guard(session, database)
|
| 3572 |
|
| 3573 |
|
|
|
|
| 3565 |
|
| 3566 |
guard = routes_tables._records_or_refuse
|
| 3567 |
if field_keys is not None and not user_tables.records_mutable(database, st=session.runtime):
|
| 3568 |
+
# The shared wall admits a locked database's update only when every key is an authored field.
|
| 3569 |
+
return guard(session, database, cell_updates=dict.fromkeys(field_keys))
|
|
|
|
| 3570 |
return guard(session, database)
|
| 3571 |
|
| 3572 |
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
f0879a891b8aab7580d3286655e7666fe8af421e6e75b059aa02097fc1c00b79
|