fix: complete ordinary channel runtime paths
This commit is contained in:
parent
40501233ef
commit
2e48b7d768
12 changed files with 158 additions and 40 deletions
|
|
@ -33,6 +33,7 @@ test('numbered IPC registry is a closed unique route graph', async () => {
|
|||
assert.equal(contract.runtime.grant_single_use, true)
|
||||
assert.equal(contract.runtime.payload_bound_grants, true)
|
||||
assert.equal(contract.runtime.authority_binding_issued_server_side, true)
|
||||
assert.equal(contract.runtime.ordinary_user_local_channel_authority, 'EXPLICIT_INITIALIZATION_PLUS_ACCOUNT_SCOPED_SESSION_PLUS_KEYCHAIN_SECRET')
|
||||
assert.equal(contract.runtime.persona_binding_claimed, false)
|
||||
assert.equal(contract.runtime.unknown_route, 'FAIL_CLOSED')
|
||||
assert.ok(contract.operations.length >= 60)
|
||||
|
|
@ -65,6 +66,19 @@ test('numbered IPC registry is a closed unique route graph', async () => {
|
|||
assert.deepEqual([...payloadAliases].sort(), [...aliases].sort())
|
||||
})
|
||||
|
||||
test('ordinary user local channels receive account-scoped IPC authority without claiming a Guanghu number', async () => {
|
||||
const source = await readFile(path.join(rustRoot, 'numbered_ipc.rs'), 'utf8')
|
||||
const dispatcher = await readFile(dispatcherPath, 'utf8')
|
||||
assert.match(source, /AUTHENTICATED_LOCAL_HUMAN:PERSONAL_CHANNEL/)
|
||||
assert.match(source, /session\.domain == "PERSONAL_CHANNEL"/)
|
||||
assert.match(source, /session\.host == "local\.hololake"/)
|
||||
assert.match(source, /current_login_session\(app\)/)
|
||||
assert.match(source, /HOLOLAKE_NUMBERED_IPC_VERIFIED_HUMAN_REQUIRED/)
|
||||
assert.match(dispatcher, /fn authenticated_human_subject/)
|
||||
assert.match(dispatcher, /identity_for_channel_runtime\(app\)/)
|
||||
assert.match(dispatcher, /external_ai_gateway::get_gateway_status[\s\S]*authenticated_human_subject/)
|
||||
})
|
||||
|
||||
test('the webview has one IPC entrance and cannot invoke legacy commands', async () => {
|
||||
const contract = JSON.parse(await readFile(contractPath, 'utf8'))
|
||||
const aliases = new Set(contract.operations.map((operation) => operation.alias))
|
||||
|
|
|
|||
Loading…
Reference in a new issue