fix: resolve CI test failures in MetadataPlugin, auth trustedOrigins, client Hono test, and docs build#1153
Conversation
… client test timeouts Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/0c89186e-7d01-4390-b9c7-0e874e5dba72 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@copilot ci test 还有很多报错。AssertionError: expected { …(11) } to not have property "trustedOrigins" |
…ost wildcard behavior Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/1b8ff0d3-1dc6-4600-93f4-466e46d2bc56 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Fixed in Note: |
|
fix ./content/docs/getting-started/architecture.mdx.js:410:1 |
…ocs app directory Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/03ea1b05-404b-40c7-a907-706e31be7a1c Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
... Fixed in |
|
@copilot src/client.hono.test.ts (3 tests) 30253ms ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/client.hono.test.ts > ObjectStackClient (with Hono Server) |
…hang in CI Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/3f029c4b-ebf6-4b3d-8bbc-00f3c9cb400e Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Fixed in |
CI failures across four packages — fixes all test/build errors introduced or exposed by the better-auth CORS support merge (PR #1152).
MetadataPlugin driver bridging (
packages/metadata/src/plugin.ts)The
driver.*service fallback was nested inside acatchblock, only reached whenctx.getService('objectql')threw. When ObjectQL returnednull(the common case when ObjectQL isn't loaded), execution fell through without ever scanning for driver services.Restructured to use a
driverBridgedflag so the fallback runs whenever ObjectQL doesn't provide a driver — whether it returns null, doesn't resolve, or throws:Auth trustedOrigins tests (
packages/plugins/plugin-auth/src/auth-manager.test.ts)PR #1152 added auto-default
http://localhost:*totrustedOriginswhen none are configured (development convenience for CSRF protection). Two tests still expectedtrustedOriginsto be absent in this case, causingAssertionError: expected { …(11) } to not have property "trustedOrigins".Updated both tests to verify the new default
["http://localhost:*"]value is correctly set whentrustedOriginsis not provided or is empty.Docs build: lucide-react module resolution (
apps/docs/next.config.mjs)MDX content files in
content/docs/(at the monorepo root) importlucide-reacticons, but Turbopack resolves modules starting from the file's directory. Sincelucide-reactis only installed inapps/docs/node_modules/, it's unreachable from the content directory, causing 33Module not found: Can't resolve 'lucide-react'errors.Added
turbopack.resolveAliasinnext.config.mjsto aliaslucide-reactto the app's local./node_modules/lucide-react, allowing Turbopack to resolve the import from any file location.Client Hono test timeout (
packages/client/src/client.hono.test.ts)The
afterAllhook was hanging in CI becausekernel.shutdown()awaitspinoLogger.flush(callback)internally, and pino's worker-thread transport callback may never fire in CI environments, causing the promise to hang indefinitely.Fixed by racing
kernel.shutdown()against a 10-second hard deadline usingPromise.race(). TheafterAllhook now always completes well within the 30s vitest limit, even when the pino flush hangs: