AI Unit Tests & Type Check #19
Annotations
4 errors and 1 warning
|
test
Process completed with exit code 1.
|
|
src/sql/functions.test.ts > title > title matches content:
packages/ai-commands/src/sql/functions.ts#L167
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/error.ts:76:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:462:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:526:24
❯ titleSql src/sql/functions.ts:167:32
❯ src/sql/functions.test.ts:50:36
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '9ef03b95bae59b3f-FRA', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 20 Apr 2026 01:04:03 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=ZJcnQbDY3nP.2ljZg2ter3xne4zSIpBgoFduaRy9WPQ-1776647043.4747632-1.0.1.1-ryokhnzvMsWiQ3jkmQoFHA96jNvR_gWleEporOFZja4QOSOY7B5zRgl27s1eCzzQAs6rjuaqRR4TlmHQvC18h5f17mM7WVNXpllxLaMazKh27XTfP4PNSQOcK_L39SFL; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Mon, 20 Apr 2026 01:34:03 GMT, _cfuvid=ElviDULkcaFVihmQORONgnMVR.uoqgoLSudPLUl8_zQ-1776647043.4747632-1.0.1.1-uy8RugrtSKHWd9h10L3_pcn6SyH2r7popoC8rIDRnnA; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-openai-proxy-wasm': 'v0.1', 'x-request-id': 'req_d47a8fbfb1114bb4a3f63c158257ff29' }, request_id: 'req_d47a8fbfb1114bb4a3f63c158257ff29', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/functions.test.ts > debug > fix typos:
packages/ai-commands/src/sql/functions.ts#L107
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/error.ts:76:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:462:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:526:24
❯ debugSql src/sql/functions.ts:107:32
❯ src/sql/functions.test.ts:35:31
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '9ef03b945a569b3f-FRA', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 20 Apr 2026 01:04:03 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=FBkbrPDHm9tuhfhx3UTHQBQ77qSJ5YDhJuBCi7l2rdM-1776647043.261264-1.0.1.1-bs3m1zfd5RH1gD.Z5.zBTRtSmkYPX2a6XJxjJcXguGM55TIYGaoqZFmxH4u47L8YB2iyX66mwNJbDMGZvlXRwkZ.TUHLvIHC0c4NEYn9VjdU0XUQJDjpdCQ4cbVBAzeX; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Mon, 20 Apr 2026 01:34:03 GMT, _cfuvid=8_GCoCwfyMNr71PxFpq_7AqqrHTLmfm4Vy5AWJYz710-1776647043.261264-1.0.1.1-AeyCUZLGauSjKH5EyX9hXL6xMqo5G4ernPfYLMzJ300; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-openai-proxy-wasm': 'v0.1', 'x-request-id': 'req_2de4aa6b6573480db8f4974153226cb8' }, request_id: 'req_2de4aa6b6573480db8f4974153226cb8', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
src/sql/functions.test.ts > debug > fix order of operations:
packages/ai-commands/src/sql/functions.ts#L107
Error: 401 You didn't provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
❯ Function.generate ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/error.ts:76:14
❯ OpenAI.makeStatusError ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:462:21
❯ OpenAI.makeRequest ../../node_modules/.pnpm/openai@4.104.0_encoding@0.1.13_ws@8.18.3_zod@3.25.76/node_modules/openai/src/core.ts:526:24
❯ debugSql src/sql/functions.ts:107:32
❯ src/sql/functions.test.ts:13:21
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 401, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '9ef03b9458431d84-FRA', connection: 'keep-alive', 'content-length': '496', 'content-type': 'application/json; charset=utf-8', date: 'Mon, 20 Apr 2026 01:04:03 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=BkN_a2hZN7lsh0CWuG5.3mw4xRrzioNsKr.yS62veqQ-1776647043.2598677-1.0.1.1-7ct8h18TDtYmpbQUcBow_9HiYgwzAVzgOXsKz1tGTM8zBDLyYBH87Kq6ASMYdlkILMOyCwEkPL8r0vkZlYQSm9MoE3GxMlld_nSl.GAb0gvifMDaCdqZB39.RLzA3H1X; HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Mon, 20 Apr 2026 01:34:03 GMT, _cfuvid=VjOhIEF3G1V_hsfR_THXZV76PBzBtgae372L_4jCxNo-1776647043.2598677-1.0.1.1-EyX3y0KXb0j3kJcJLNA5Glv2zEct6mvPoX.Fq.8KvH0; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-openai-proxy-wasm': 'v0.1', 'x-request-id': 'req_5688bde198084b6881954654b3e7d680' }, request_id: 'req_5688bde198084b6881954654b3e7d680', error: { message: 'You didn\'t provide an API key. You need to provide your API key in an Authorization header using *** (i.e. Authorization: *** or as the password field (with blank username) if you\'re accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
|
test
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955, actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020, pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|