Skip to content

test: reproduce incorrect parent detection in nested aggregates - #279

Merged
zachdaniel merged 1 commit into
ash-project:mainfrom
jechol:test/aggregate-parent-scope
Nov 3, 2026
Merged

zachdaniel merged 1 commit into
ash-project:mainfrom
jechol:test/aggregate-parent-scope

Conversation

@jechol

@jechol jechol commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

The aggregate grouping check can mistake a parent reference inside a nested aggregate for an outer parent reference, causing can_group?/3 to reject grouping.

The test counts posts with comments meeting each post's min_score. The inner parent(min_score) refers to Post, so it should not prevent grouping the post count. This is similar to ash-project/ash#3105.

Adds a failing regression test only. The existing 21 tests in aggregate_test.exs pass.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T08:51:29.825920Z 396477f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zachdaniel
zachdaniel merged commit 10bc447 into ash-project:main Nov 3, 2026
25 of 26 checks passed
@zachdaniel

Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

@jechol
jechol deleted the test/aggregate-parent-scope branch November 4, 2026 04:18
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