chore: checkpoint turso and ai runtime work
This commit is contained in:
@@ -4,7 +4,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const openHubRoot =
|
||||
process.env.OPENHUB_RESEARCH_ROOT || '/tmp/mnote-openhub-research/OpenHub';
|
||||
process.env.OPENHUB_RESEARCH_ROOT || '/mnt/Data1T/Mnote_data/openhub/OpenHub';
|
||||
const backendRoot = path.join(openHubRoot, 'smart-query-backend');
|
||||
|
||||
function read(relativePath) {
|
||||
@@ -43,21 +43,28 @@ assertCheck(
|
||||
'MNOTE_HOST_TRUTH = "mnote_controlled_headers"',
|
||||
'def derive_mnote_user',
|
||||
'def resolve_user_workspace',
|
||||
'def resolve_user_asset_workspace',
|
||||
'def get_mnote_scope_metadata',
|
||||
'X-MNote-Display-Name',
|
||||
...requiredHeaders,
|
||||
])
|
||||
);
|
||||
|
||||
assertCheck(
|
||||
'derived user is stable and not a shared singleton',
|
||||
'derived user is stable per MNote user and not tied to workspace scope',
|
||||
includesAll(mnoteScope, [
|
||||
'def _stable_openhub_user_id',
|
||||
'def _stable_openhub_user_id(user_key: str)',
|
||||
'mnote_openhub_user_id',
|
||||
'user_key',
|
||||
'workspace_key',
|
||||
'display_name',
|
||||
'get_user_by_username',
|
||||
'"openhub_user_id"',
|
||||
'"openhub_username"',
|
||||
]) && !mnoteScope.includes('mnote_shared_user')
|
||||
]) &&
|
||||
!mnoteScope.includes('def _stable_openhub_user_id(user_key: str, workspace_key: str)') &&
|
||||
!mnoteScope.includes('_stable_openhub_user_id(user_key, workspace_key)') &&
|
||||
!mnoteScope.includes('mnote_shared_user')
|
||||
);
|
||||
|
||||
assertCheck(
|
||||
@@ -78,6 +85,7 @@ assertCheck(
|
||||
includesAll(mnoteScope, [
|
||||
'tool_permission_scope',
|
||||
'weknora_tool_scope',
|
||||
'provisioned_workspace_path',
|
||||
'_parse_scope_header',
|
||||
'"mnote_scope"',
|
||||
'"source_headers"',
|
||||
@@ -101,7 +109,7 @@ assertCheck(
|
||||
'query/session entries consume derived workspace and scope',
|
||||
query.includes('resolve_user_workspace(current_user)') &&
|
||||
query.includes('not current_user.get("mnote_host_mode")') &&
|
||||
query.includes('mnote_scope=get_mnote_scope_metadata(current_user)') &&
|
||||
query.includes('mnote_scope = get_mnote_scope_metadata(current_user)') &&
|
||||
session.includes('resolve_user_workspace(current_user)') &&
|
||||
session.includes('mnote_scope=get_mnote_scope_metadata(current_user)')
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user