Files
stack/packages/bus/tests/proxy-model-join.test.mjs
jason.woltje 362893d043 feat: integrate reviewed proxy page and managed model keys
Source-candidate: poe d9a564e6d20f5f0fd75ce45b12cbbf8bb4c9d568\nSource-candidate: magica38ba5762b06716db1dee00d0afec162656488f5c\nValidated321whole-file phase plus whole bus1349/model-proxy100/webui490; final gate tooling checks pending, not landed.
2026-10-26 12:04:21 -05:00

18 lines
993 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import {revocationFixture} from './model-revocation-fixture.mjs';
// Join control: the real runtime supplies P2's cached metadata to P4. This
// fixture's seeded record is read evidence only, not issuance/ownership proof.
test('Console key view uses the same runtime model record without exposing its value', {timeout:30000}, async t=>{
const f=await revocationFixture(t,{runtime:true});
const record=f.seed({valid:true,matchingTmp:false});
const human=f.bus.broker.bindHuman({business:'demo',human:'jason',via:'cli',outsideAgent:true});
const result=await f.bus.broker.request(human,{verb:'proxy.keys',args:{}});
assert.deepEqual(result.keys.find(row=>row.keyId===record.keyId),{
keyId:record.keyId,management:'stack-managed',agent:'aide',issuedAt:record.issuedAt,state:'valid',
});
assert.equal(JSON.stringify(result).includes(record.key),false,'no model value enters the Console result');
f.valueFree();
});