Skip to content

Fix check attribute pending - #1067

Merged
abnegate merged 1 commit into
mainfrom
fix-check-attribute-pending
Nov 16, 2026
Merged

abnegate merged 1 commit into
mainfrom
fix-check-attribute-pending

Conversation

@fogelito

@fogelito fogelito commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Attribute limit checks now account for attributes being added together, helping prevent collections from exceeding their configured limits.
    • These checks do not save pending attributes to the collection.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

checkAttribute accepts an optional list of pending attributes and includes them with the requested attribute when checking collection limits. The check uses a cloned collection. A unit test covers the attribute-count limit.

Changes: Attribute limit checks

Layer / File(s) Summary
Pending attribute validation
src/Database/Trait/Attributes.php, tests/unit/Attributes/CheckAttributeTest.php
checkAttribute includes pending attributes in its existing limit checks. A unit test verifies that the check throws LimitException when pending and requested attributes exceed the attribute limit.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: abnegate

Merge Risk: Minimal · up to 28390

This change makes attribute limit checks count pending attributes, and the new unit test covers the attribute-count limit. Existing callers that omit the new optional argument keep their current behavior. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Fix check attribute pending" names the changed method (checkAttribute) and the new pending-attributes behavior. The change adds an optional pending list to checkAttribute so pending attribu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Fix check attribute pending" names the changed method (checkAttribute) and the new pending-attributes behavior. The change adds an optional pending list to checkAttribute so pending attributes count toward the attribute-count and row-width limits, and adds a test for that case. The title is short and specific, though it is terse and does not state the effect of the fix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b494b76 and 28390a6.

Files selected for processing: 2

  • src/Database/Trait/Attributes.php
  • tests/unit/Attributes/CheckAttributeTest.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@appwrite

appwrite Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

This adds an optional pending-attributes list to checkAttribute and includes those attributes when checking adapter limits. It also adds a unit test showing that pending attributes count toward the attribute limit.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 2
File Change
src/Database/Trait/Attributes.php Added optional pending attributes to the limit-check simulation.
tests/unit/Attributes/CheckAttributeTest.php Added coverage for pending attributes exceeding the attribute-count limit.
🔇 Filtered out · 1

Findings Hansi considered but did not post.

Finding Why
Cover pending attributes against the row-width limit too Verifier: This is a request for more test coverage, not a bug. Pending attributes are appended to the same $definition that both the count check and the width check read. The new unit test for the count limit already exercises that loop. A separate width test would add little.

Reviewed 28390a6 · Details · Comment @appwrite review to re-run, or mention @appwrite with a question.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@abnegate
abnegate merged commit 74a59b3 into main Nov 16, 2026
22 checks passed
@abnegate
abnegate deleted the fix-check-attribute-pending branch November 16, 2026 07:14
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