You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SortNode (spec/data/query.zod.ts) takes `order: 'asc'|'desc'` (default asc);
Zod strips an unknown `direction:` key, so every desc sort using it silently
returned ascending. Same bug class fixed in plugin-approvals via #1769.
Behavior-changing (desc was silently asc):
- plugin-reports listReports: most-recently-updated first
- plugin-sharing listShares: newest grant first
- service-job listExecutionsByStatus: "latest run" actually returned the
OLDEST run
- service-queue listFailed: newest message first
Cosmetic (asc default made behavior accidentally right, key still wrong):
- plugin-reports listSchedules, plugin-sharing listRules,
share-link-routes messages sort, service-queue claimBatch
Doc/template sites (schema-verified):
- cli explain: query example sort key — FindOptions.sort takes SortNode[]
- cli generate + spec benchmark: list-view template used a phantom
`defaultSort:` key (ListViewSchema only has `sort: [{field, order}]`);
benchmark validQuery used `sort:` which QuerySchema doesn't have → orderBy
Left alone: plugin-auth objectql-adapter (better-auth's own sortBy.direction,
already translated to {field, order}); graphql.zod.ts defaultSort
(a separate schema that legitimately uses direction: 'ASC'|'DESC').
Tests: all four fake-engine mocks now honor ONLY the canonical `order` key
(honoring both is how the approvals bug stayed hidden), plus a descending-
order regression test per package; mutation-checked that reverting the
service-job fix fails its new test.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments