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(); });