Skip to content

[WIP] Fix issue in job step execution - #433

Merged
hotlong merged 2 commits into
copilot/update-examples-and-test-platformfrom
copilot/resolve-job-step-issue
Jan 31, 2026
Merged

hotlong merged 2 commits into
copilot/update-examples-and-test-platformfrom
copilot/resolve-job-step-issue

Conversation

Copilot AI commented Jan 31, 2026 •

Copy link
Copy Markdown
Contributor

Fix TypeScript Compilation Errors in examples/basic

  • Analyze compilation errors from CI build
  • Check missing exports in spec packages (API, Hub, System, Integration)
  • Add missing type exports to spec package index files
    • Added ODataConfig, RealtimeConfig, BatchConfig to API module
    • Added MarketplaceListing, Space, ComposerConfig aliases to Hub module
    • Added JobSchedule alias to System module
    • Added SaaSConnector alias to Integration module
    • Added integration and permission exports to package.json
  • Fix incorrect type usages in example files (passthrough schemas)
  • Verify all changes with build
  • Run tests to ensure no regressions
Original prompt

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


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

@vercel

vercel Bot commented Jan 31, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jan 31, 2026 5:28am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong
hotlong marked this pull request as ready for review January 31, 2026 05:20
Copilot AI review requested due to automatic review settings January 31, 2026 05:20
@hotlong
hotlong merged commit 91314b1 into copilot/update-examples-and-test-platform Jan 31, 2026
4 of 5 checks passed
Copilot AI requested a review from hotlong January 31, 2026 05:21
Copilot stopped work on behalf of hotlong due to an error January 31, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds missing type exports and configuration schemas to fix TypeScript compilation errors in the examples/basic package. The changes introduce new configuration schemas for API modules (OData, Realtime, Batch) and add backwards-compatible type aliases across multiple modules (Hub, System, Integration).

Changes:

  • Added package.json exports for integration and permission modules
  • Added type aliases for backwards compatibility (JobSchedule, SaaSConnector, Space, MarketplaceListing, ComposerConfig)
  • Added new configuration schemas (ODataConfig, RealtimeConfig, BatchConfig) with corresponding JSON schemas and documentation

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
packages/spec/package.json Added exports for integration and permission modules
packages/spec/src/system/job.zod.ts Added JobSchedule type alias for backwards compatibility
packages/spec/src/integration/connector/saas.zod.ts Added SaaSConnector type alias for alternative capitalization
packages/spec/src/hub/space.zod.ts Added Space type alias for backwards compatibility
packages/spec/src/hub/marketplace.zod.ts Added MarketplaceListing type alias for backwards compatibility
packages/spec/src/hub/composer.zod.ts Added ComposerConfig type alias for configuration context
packages/spec/src/api/realtime.zod.ts Added RealtimeConfigSchema for realtime API configuration
packages/spec/src/api/odata.zod.ts Added ODataConfigSchema for OData API configuration
packages/spec/src/api/batch.zod.ts Added BatchConfigSchema for batch operations configuration
packages/spec/json-schema/api/RealtimeConfig.json Generated JSON schema for RealtimeConfig
packages/spec/json-schema/api/ODataConfig.json Generated JSON schema for ODataConfig
packages/spec/json-schema/api/BatchConfig.json Generated JSON schema for BatchConfig
content/docs/references/api/realtime.mdx Updated documentation with RealtimeConfig schema
content/docs/references/api/odata.mdx Updated documentation with ODataConfig schema
content/docs/references/api/batch.mdx Updated documentation with BatchConfig schema


/** Default subscriptions */
subscriptions: z.array(SubscriptionSchema).optional().describe('Default subscriptions'),
}).passthrough(); // Allow additional properties

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The use of .passthrough() here is inconsistent with the rest of the codebase. No other schemas in the spec package use .passthrough() or .strict(), relying instead on Zod's default .strip() behavior.

Using .passthrough() on configuration schemas can lead to:

  1. Silent acceptance of typos in configuration keys
  2. Difficulty in catching configuration errors at validation time
  3. Inconsistency with established patterns in the codebase

Consider removing .passthrough() to align with the codebase conventions. If additional properties are genuinely needed for extensibility, this should be documented and applied consistently across all configuration schemas, or handled through a more explicit mechanism like an extensions or metadata field.

Copilot uses AI. Check for mistakes.
Comment on lines +455 to +466
export const ODataConfigSchema = z.object({
/** Enable OData endpoint */
enabled: z.boolean().default(true).describe('Enable OData API'),

/** OData endpoint path */
path: z.string().default('/odata').describe('OData endpoint path'),

/** Metadata configuration */
metadata: ODataMetadataSchema.optional().describe('OData metadata configuration'),
}).passthrough(); // Allow additional properties for flexibility

export type ODataConfig = z.infer<typeof ODataConfigSchema>;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The new ODataConfigSchema lacks test coverage. The odata.test.ts file has comprehensive tests for other schemas in odata.zod.ts, but no tests have been added for the new ODataConfigSchema.

Consider adding tests to verify:

  • Default values (enabled=true, path='/odata')
  • Optional metadata field
  • Integration with ODataMetadataSchema

Copilot uses AI. Check for mistakes.
Comment on lines +109 to +120
export const RealtimeConfigSchema = z.object({
/** Enable realtime sync */
enabled: z.boolean().default(true).describe('Enable realtime synchronization'),

/** Transport protocol */
transport: TransportProtocol.default('websocket').describe('Transport protocol'),

/** Default subscriptions */
subscriptions: z.array(SubscriptionSchema).optional().describe('Default subscriptions'),
}).passthrough(); // Allow additional properties

export type RealtimeConfig = z.infer<typeof RealtimeConfigSchema>;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The new RealtimeConfigSchema lacks test coverage. The realtime.test.ts file has comprehensive tests for other schemas in realtime.zod.ts, but no tests have been added for the new RealtimeConfigSchema.

Consider adding tests to verify:

  • Default values (enabled=true, transport='websocket')
  • Optional subscriptions field
  • Integration with SubscriptionSchema and TransportProtocol

Copilot uses AI. Check for mistakes.

/** Metadata configuration */
metadata: ODataMetadataSchema.optional().describe('OData metadata configuration'),
}).passthrough(); // Allow additional properties for flexibility

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The use of .passthrough() here is inconsistent with the rest of the codebase. No other schemas in the spec package use .passthrough() or .strict(), relying instead on Zod's default .strip() behavior.

Using .passthrough() on configuration schemas can lead to:

  1. Silent acceptance of typos in configuration keys
  2. Difficulty in catching configuration errors at validation time
  3. Inconsistency with established patterns in the codebase

Consider removing .passthrough() to align with the codebase conventions. If additional properties are genuinely needed for extensibility, this should be documented and applied consistently across all configuration schemas, or handled through a more explicit mechanism like an extensions or metadata field.

Copilot uses AI. Check for mistakes.

/** Default options */
defaultOptions: BatchOptionsSchema.optional().describe('Default batch options'),
}).passthrough(); // Allow additional properties

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The use of .passthrough() here is inconsistent with the rest of the codebase. No other schemas in the spec package use .passthrough() or .strict(), relying instead on Zod's default .strip() behavior.

Using .passthrough() on configuration schemas can lead to:

  1. Silent acceptance of typos in configuration keys
  2. Difficulty in catching configuration errors at validation time
  3. Inconsistency with established patterns in the codebase

Consider removing .passthrough() to align with the codebase conventions. If additional properties are genuinely needed for extensibility, this should be documented and applied consistently across all configuration schemas, or handled through a more explicit mechanism like an extensions or metadata field.

Copilot uses AI. Check for mistakes.
export type CronSchedule = z.infer<typeof CronScheduleSchema>;
export type IntervalSchedule = z.infer<typeof IntervalScheduleSchema>;
export type OnceSchedule = z.infer<typeof OnceScheduleSchema>;
export type JobSchedule = Schedule; // Alias for backwards compatibility

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

There's a discrepancy between the PR title "[WIP] Fix issue in job step execution" and the actual changes, which are focused on adding missing type exports and configuration schemas to fix TypeScript compilation errors in examples/basic. The PR title should be updated to accurately reflect the changes being made, such as "Add missing type exports and config schemas to fix compilation errors".

Copilot uses AI. Check for mistakes.

// Validate data
const result = ODataErrorSchema.parse(data);
const result = ODataConfigSchema.parse(data);

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The example code has been changed from parsing ODataErrorSchema to ODataConfigSchema. This change doesn't make sense in the context of the documentation - the example should demonstrate the primary use case of the API module. If ODataConfigSchema is more important, this is a reasonable change, but if ODataErrorSchema was the better example before, changing it just because a new schema was added is inconsistent.

Consider whether this change is intentional or if it should revert to the original example while still documenting the new ODataConfigSchema elsewhere in the file.

Suggested change
const result = ODataConfigSchema.parse(data);
const result = ODataErrorSchema.parse(data);

Copilot uses AI. Check for mistakes.

// Validate data
const result = BatchOperationResultSchema.parse(data);
const result = BatchConfigSchema.parse(data);

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The example code has been changed from parsing BatchOperationResultSchema to BatchConfigSchema. This change doesn't make sense in the context of the documentation - the example should demonstrate the primary use case of the API module. If BatchConfigSchema is more important, this is a reasonable change, but if BatchOperationResultSchema was the better example before, changing it just because a new schema was added is inconsistent.

Consider whether this change is intentional or if it should revert to the original example while still documenting the new BatchConfigSchema elsewhere in the file.

Suggested change
const result = BatchConfigSchema.parse(data);
const result = BatchOperationResultSchema.parse(data);

Copilot uses AI. Check for mistakes.
Comment on lines +231 to +242
export const BatchConfigSchema = z.object({
/** Enable batch operations */
enabled: z.boolean().default(true).describe('Enable batch operations'),

/** Maximum records per batch */
maxRecordsPerBatch: z.number().int().min(1).max(1000).default(200).describe('Maximum records per batch'),

/** Default options */
defaultOptions: BatchOptionsSchema.optional().describe('Default batch options'),
}).passthrough(); // Allow additional properties

export type BatchConfig = z.infer<typeof BatchConfigSchema>;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

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

The new BatchConfigSchema lacks test coverage. The batch.test.ts file has comprehensive tests for all other schemas in batch.zod.ts, but no tests have been added for the new BatchConfigSchema.

Consider adding tests to verify:

  • Default values (enabled=true, maxRecordsPerBatch=200)
  • Min/max constraints on maxRecordsPerBatch
  • Optional defaultOptions field
  • Integration with BatchOptionsSchema

Copilot uses AI. Check for mistakes.
This was referenced Oct 31, 2026

This branch was successfully deployed

1 active deployment
Preview — dbc25a6c Deployed Jan 31, 2026 by vercel[bot]
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