Skip to content

planning and tasks for expanded order_by support in schemas#9344

Draft
ajtmccarty wants to merge 3 commits into
developfrom
infp-530-schema-order-by-metadata
Draft

planning and tasks for expanded order_by support in schemas#9344
ajtmccarty wants to merge 3 commits into
developfrom
infp-530-schema-order-by-metadata

Conversation

@ajtmccarty
Copy link
Copy Markdown
Contributor

@ajtmccarty ajtmccarty commented May 22, 2026

Summary by cubic

Adds design specs, contracts, and a task plan to extend schema order_by to support node metadata fields and explicit sort direction, ensuring uniform ordering across list queries. Aligns with INFP-530 to let schemas default to newest-first (e.g., created_at DESC) for cases like Documentation Notes.

  • New Features
    • Grammar: supports <attr>__value[__asc|__desc], <rel>__<attr>__value[__asc|__desc], and node_metadata__{created_at|updated_at}[__asc|__desc] (wire shape stays list[str]).
    • Validation: clear load-time errors with remediation; node_metadata reserved; duplicate targets rejected; inheritance unchanged and rename helper skips metadata entries.
    • Behavior: query-time order replaces schema defaults; consistent UUID ASC tiebreaker across top-level, relationship-peer, and hierarchy lists.
    • Plan/Docs: central parser (ParsedOrderByEntry in core/schema/order_by.py), contracts for grammar/errors/list paths, a quickstart, and detailed tasks/tests including changelog coverage for the precedence change.

Written for commit db9e134. Summary will update on new commits. Review in cubic

@github-actions github-actions Bot added the type/spec A specification for an upcoming change to the project label May 22, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

5 issues found across 8 files

Confidence score: 4/5

  • This PR looks safe to merge with low-to-moderate risk: the reported issues are documentation/spec accuracy problems (mostly 4–5/10), not direct runtime regressions in application code.
  • The most significant concern is in dev/specs/infp-530-order-by-metadata-direction/data-model.md, where OrderDirection is described as an existing enum even though it is not present in the codebase; this can mislead follow-up implementation work.
  • dev/specs/infp-530-order-by-metadata-direction/plan.md includes dependency/version mismatches (Neo4j driver 5.28 vs project 6.0.3, Pydantic 2.10 vs supported >=2.12,<2.13) plus an unsupported Strawberry GraphQL claim, which increases planning ambiguity.
  • Pay close attention to dev/specs/infp-530-order-by-metadata-direction/data-model.md, dev/specs/infp-530-order-by-metadata-direction/plan.md, dev/specs/infp-530-order-by-metadata-direction/tasks.md - align dependency/version references and task sequencing guidance before implementation.

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread dev/specs/infp-530-order-by-metadata-direction/tasks.md Outdated
Comment thread dev/specs/infp-530-order-by-metadata-direction/data-model.md Outdated
Comment thread dev/specs/infp-530-order-by-metadata-direction/plan.md Outdated
Comment thread dev/specs/infp-530-order-by-metadata-direction/plan.md Outdated
Comment thread dev/specs/infp-530-order-by-metadata-direction/plan.md Outdated
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 3 files (changes from recent commits).

Shadow auto-approve: would auto-approve. This PR adds only specification and planning documents (markdown files) for a future schema feature; no code changes, no risk of breaking production logic or data integrity.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/spec A specification for an upcoming change to the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant