| 53 | } |
| 54 | |
| 55 | function 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 | |
| 81 | describe('buildContinuityStatusView', () => { |
| 82 | it('reports healthy continuity for a usable lease that is not due for renewal', () => { |