Skip to content

[WIP] Update action step configuration for improved performance#301

Merged
hotlong merged 3 commits intomainfrom
copilot/update-action-step-configuration
Jan 27, 2026
Merged

[WIP] Update action step configuration for improved performance#301
hotlong merged 3 commits intomainfrom
copilot/update-action-step-configuration

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 27, 2026

Fix Build Failure in @objectstack/ai-bridge ✅

Issue

The CI build fails at step 8 (Build packages) with error:

packages/ai-bridge build: src/generator/ts-generator.ts(1,27): error TS2307: Cannot find module '@objectstack/spec/data' or its corresponding type declarations.

Reference: https://github.com/objectstack-ai/spec/actions/runs/21386032082/job/61562547811#step:8:1

Root Cause

  1. The @objectstack/ai-bridge package imports FieldType from @objectstack/spec/data but doesn't declare @objectstack/spec as a dependency in its package.json.
  2. The tsconfig.json uses moduleResolution: "node" (inherited from root) which doesn't support package.json exports properly.
  3. The code references an invalid field type 'geolocation' which doesn't exist in the FieldType enum (only 'location' is valid).

Changes Made

  • Investigate the CI failure and identify the root cause
  • Add @objectstack/spec: workspace:* as a dependency to packages/ai-bridge/package.json
  • Update packages/ai-bridge/tsconfig.json to extend root config and override moduleResolution to "bundler" (consistent with objectql package)
  • Remove invalid 'geolocation' case from the switch statement in ts-generator.ts
  • Verify the fix by building ai-bridge package successfully
  • Verify all packages build successfully
  • Address code review feedback about extending root tsconfig
  • Run security checks (no issues found)
  • Complete the task

Security Summary

No security vulnerabilities were introduced or discovered.

Files Changed

  1. packages/ai-bridge/package.json - Added @objectstack/spec dependency
  2. packages/ai-bridge/tsconfig.json - Added moduleResolution override
  3. packages/ai-bridge/src/generator/ts-generator.ts - Removed invalid field type
  4. pnpm-lock.yaml - Updated lockfile with new dependency
Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21386032082/job/61562547811#step:8:1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 27, 2026

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

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 27, 2026 6:38am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review January 27, 2026 06:39
Copilot AI review requested due to automatic review settings January 27, 2026 06:39
@hotlong hotlong merged commit f9f3741 into main Jan 27, 2026
5 checks passed
Copilot AI requested a review from hotlong January 27, 2026 06:39
Copilot stopped work on behalf of hotlong due to an error January 27, 2026 06:39
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

This PR fixes a CI build failure in the @objectstack/ai-bridge package by addressing missing dependencies, module resolution configuration, and removing an invalid field type reference.

Changes:

  • Added @objectstack/spec as a workspace dependency to ai-bridge package
  • Updated TypeScript configuration to use bundler module resolution
  • Removed invalid 'geolocation' case from field type switch statement

Reviewed changes

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

File Description
packages/ai-bridge/package.json Added missing @objectstack/spec dependency
packages/ai-bridge/tsconfig.json Added module and moduleResolution overrides for better package.json exports support
packages/ai-bridge/src/generator/ts-generator.ts Removed invalid 'geolocation' field type case
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

"outDir": "./dist",
"rootDir": "./src"
"rootDir": "./src",
"module": "ES2020",
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The PR description mentions updating moduleResolution to bundler for consistency with objectql package, but doesn't explain why module is being set to ES2020. Consider documenting the reason for this module setting in the PR description or removing it if unnecessary.

Suggested change
"module": "ES2020",

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