Skip to content

Fix CI build failures: lockfile mismatch and TypeScript type errors#587

Merged
hotlong merged 4 commits intomainfrom
copilot/fix-ci-build-test
Feb 10, 2026
Merged

Fix CI build failures: lockfile mismatch and TypeScript type errors#587
hotlong merged 4 commits intomainfrom
copilot/fix-ci-build-test

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 10, 2026

CI broken after merging #586pnpm install --frozen-lockfile fails and @objectstack/objectql has two type errors.

  • Lockfile out of date: examples/metadata-objectql/package.json was added to the workspace but pnpm-lock.yaml was never regenerated
  • protocol.ts type mismatch: endpoints typed as Record<string, string> but GetDiscoveryResponseSchema expects ApiRoutes (required data + metadata keys). Replaced with properly typed object and explicit service→endpoint key mapping:
    const endpoints: ApiRoutes = {
      data: '/api/data',
      metadata: '/api/meta',
      ...optionalEndpoints,
    };
  • plugin.ts missing method: SchemaRegistry.listObjects() does not exist → SchemaRegistry.getAllObjects()

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-play Canceled Canceled Feb 10, 2026 10:35am
spec Ready Ready Preview, Comment Feb 10, 2026 10:35am

Request Review

Copilot AI and others added 3 commits February 10, 2026 10:22
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI build and test issues Fix CI build failures: lockfile mismatch and TypeScript type errors Feb 10, 2026
Copilot AI requested a review from hotlong February 10, 2026 10:29
@hotlong hotlong marked this pull request as ready for review February 10, 2026 10:33
Copilot AI review requested due to automatic review settings February 10, 2026 10:33
@hotlong hotlong merged commit 210534a into main Feb 10, 2026
4 of 5 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes CI failures caused by an out-of-date pnpm lockfile (missing new workspace importer) and resolves TypeScript type errors in @objectstack/objectql related to discovery endpoint typing and SchemaRegistry API usage.

Changes:

  • Regenerate pnpm-lock.yaml to include examples/metadata-objectql as a workspace importer.
  • Update ObjectQL protocol discovery response to build endpoints as a properly typed ApiRoutes.
  • Replace non-existent SchemaRegistry.listObjects() usage with SchemaRegistry.getAllObjects().

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pnpm-lock.yaml Adds workspace importer entry for examples/metadata-objectql and updates dependency snapshot resolution accordingly.
packages/objectql/src/protocol.ts Fixes discovery endpoints typing by constructing an ApiRoutes object and mapping service names to route keys.
packages/objectql/src/plugin.ts Fixes runtime/type error by switching from listObjects() to getAllObjects() for registry counts.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +106 to +107
// Map service names to ApiRoutes keys
const serviceToEndpointKey: Record<string, keyof ApiRoutes> = {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serviceToEndpointKey is typed as Record<string, keyof ApiRoutes>, which implies every service name maps to a valid ApiRoutes key. Only a subset is actually mapped (unknown services yield undefined at runtime). Consider typing this as a partial mapping (e.g. Partial<Record<string, keyof ApiRoutes>> or a satisfies-based object) so the type matches behavior and keeps type-safety as services are added.

Suggested change
// Map service names to ApiRoutes keys
const serviceToEndpointKey: Record<string, keyof ApiRoutes> = {
// Map service names to ApiRoutes keys (only a subset of services are mapped)
const serviceToEndpointKey: Partial<Record<string, keyof ApiRoutes>> = {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants