Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion loopx/canary/module_metric_baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"loopx/chat_runtime.py": {
"any_count": 37,
"dict_any_count": 0,
"lines": 2320
"lines": 2333
},
"loopx/chat_server.py": {
"any_count": 25,
Expand Down
4 changes: 3 additions & 1 deletion loopx/capabilities/native_chat/steward_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ def _commit_poll(self, host, request, turn, context, argv):
with self.controller.lock, commit():
host._admit(request, turn=self.controller.store.load_turn(turn["session_id"], turn["turn_id"]))
return self._native_poll(argv)
observed = host._observe(request["actor"])
with self.controller.lock, exclusive_file_lock(self.bindings.path, operation="commit_steward_monitor"):
admitted = host._admit(request, turn=self.controller.store.load_turn(turn["session_id"], turn["turn_id"]))
admitted = host._admit(request, observed=observed,
turn=self.controller.store.load_turn(turn["session_id"], turn["turn_id"]))
if not context.get("authorization_scope_id") or admitted["observed_scope_id"] != context["authorization_scope_id"]:
raise ValueError("the portfolio scope changed after observation")
return self._native_poll(argv)
Expand Down
Loading
Loading