MCPcopy Create free account
hub / github.com/Noumena-Network/code / makeLease

Function makeLease

src/auth/runtime/continuity.test.ts:55–79  ·  view source on GitHub ↗
(
  overrides: Partial<IssuedRuntimeLease> = {},
)

Source from the content-addressed store, hash-verified

53}
54
55function makeLease(
56 overrides: Partial<IssuedRuntimeLease> = {},
57): IssuedRuntimeLease {
58 const nowMs = Date.now()
59 return {
60 leaseKind: 'local_first_party',
61 leaseId: 'local:managed_oauth:org-1:acct-1',
62 sessionId: null,
63 state: 'usable',
64 renewable: true,
65 renewalOwner: 'local_runtime',
66 issuedAt: nowMs,
67 expiresAt: nowMs + 60 * 60 * 1000,
68 renewAfter: nowMs + 30 * 60 * 1000,
69 graceUntil: nowMs + 65 * 60 * 1000,
70 organizationUuid: 'org-1',
71 capabilities: ['first_party_api', 'inference'],
72 executionTarget: 'local',
73 providerMode: 'noumena_managed',
74 degradationMode: 'none',
75 recoveryMessage: null,
76 metadata: {},
77 ...overrides,
78 }
79}
80
81describe('buildContinuityStatusView', () => {
82 it('reports healthy continuity for a usable lease that is not due for renewal', () => {

Callers 1

continuity.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected