Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 25, 2026

Query schema evolved from array-based to object-based filter syntax (MongoDB-style operators), but tests still used old array format causing 40+ validation failures.

Changes

Removed obsolete schema references

  • Deleted imports and tests for FilterOperator and LogicOperator (removed from schema)

Migrated join ON clauses (35 instances)

// Before
on: ['order.customer_id', '=', 'c.id']

// After  
on: { 'order.customer_id': { $eq: { $field: 'c.id' } } }

// Complex conditions
on: { $and: [
  { 'order.customer_id': { $eq: { $field: 'c.id' } } },
  { 'order.status': 'active' }
] }

Migrated HAVING clauses (8 instances)

// Before
having: ['order_count', '>', 5]

// After
having: { order_count: { $gt: 5 } }

Fixed field name

  • sortorderBy (schema property)

Result: 105/105 query tests passing

Original prompt

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


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

@vercel
Copy link

vercel bot commented Jan 25, 2026

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

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 25, 2026 5:15am

Request Review

Copilot AI and others added 2 commits January 25, 2026 05:09
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 issue in step 8 of the action run Fix query tests after schema migration to object-based filter syntax Jan 25, 2026
Copilot AI requested a review from hotlong January 25, 2026 05:13
@hotlong hotlong marked this pull request as ready for review January 25, 2026 05:17
Copilot AI review requested due to automatic review settings January 25, 2026 05:17
@hotlong hotlong merged commit 03a1654 into copilot/fix-action-step-issue-another-one Jan 25, 2026
6 checks passed
Copy link
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 updates the query tests to align with the new object-based filter DSL and the current QuerySchema (notably orderBy and FilterConditionSchema-based joins and havings), resolving the validation failures introduced by the schema migration.

Changes:

  • Removed obsolete tests and imports for the now-absent FilterOperator and LogicOperator enums.
  • Migrated all join on clauses from array-based syntax to FilterConditionSchema object syntax, including support for $and and $field references.
  • Migrated all having clauses from array-based comparison tuples to object-based filter conditions and updated tests to use orderBy instead of sort where applicable.

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.

2 participants