Skip to content

test: cover unset multiple-account query context - #1723

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260811-133737-gh1722
Aug 11, 2026
Merged

test: cover unset multiple-account query context#1723
superdav42 merged 1 commit into
mainfrom
feature/auto-20260811-133737-gh1722

Conversation

@superdav42

@superdav42 superdav42 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add regression coverage for an unset $wpdb->func_call context.

Testing

  • php -l tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php

Runtime Testing

  • Self-assessed: test-only change; no local WordPress runtime is available.

Resolves #1722


aidevops.sh v3.32.252 plugin for OpenCode v1.18.9 with gpt-5.6-terra spent 2m and 61,594 tokens on this as a headless worker. Overall, 32m since this issue was created.

Summary by CodeRabbit

  • Tests
    • Added coverage to verify user queries remain intact when database call metadata is unavailable.
    • Confirmed database state is restored after compatibility checks.

@superdav42 superdav42 added the origin:worker Auto-created by pulse labelless backfill (t2112) label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7619c8bf-493f-4e66-8574-f4fd5a453d71

📥 Commits

Reviewing files that changed from the base of the PR and between 0a1c399 and 12092f6.

📒 Files selected for processing (1)
  • tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php

📝 Walkthrough

Walkthrough

The test suite adds regression coverage for fix_user_query() when $wpdb->func_call is unset. The test verifies that the original query is returned and restores the database property afterward.

Changes

Multiple accounts compatibility

Layer / File(s) Summary
Unset func_call regression test
tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php
Adds a test for an unset $wpdb->func_call, verifies the unchanged query, and restores the original property state in a finally block.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels: review-feedback-scanned

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the added test coverage for an unset multiple-account query context.
Linked Issues check ✅ Passed The test unsets $wpdb->func_call, verifies the original query, and preserves cleanup as required by issue #1722.
Out of Scope Changes check ✅ Passed The pull request contains only targeted regression-test coverage related to issue #1722.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-20260811-133737-gh1722

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

Comment @coderabbitai help to get the list of available commands.

@superdav42
superdav42 marked this pull request as ready for review August 11, 2026 19:42
@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42

superdav42 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

Completion Summary

  • What: Added regression coverage for unset database query context.
  • Issue: Review followup: PR #1714 — fix: guard multiple accounts query context #1722
  • Files changed: tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php
  • Testing: vendor/bin/phpcs tests/WP_Ultimo/Multiple_Accounts_Compat_Test.php; vendor/bin/phpunit --filter Multiple_Accounts_Compat_Test.php
  • Key decisions: Kept the existing finally restoration pattern while covering the unset-property fallback.

aidevops.sh v3.32.252 plugin for OpenCode v1.18.9 with gpt-5.6-terra spent 4m and 70,610 tokens on this as a headless worker. Solved in 34m.


Merged via PR #1723 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

Routing feedback

  • Route: standard; 1 attempt, 26 LLM requests, 0 capability escalations, 0 same-tier fallbacks.
  • Usage: 1,283,386 tokens; $0.6231 estimated cost.
  • Recommendation: No routing change is recommended from this sample.

@ultimate-multisite ultimate-multisite Bot added the status:in-review PR open, awaiting review/merge label Aug 11, 2026
@superdav42
superdav42 merged commit 8080bcf into main Aug 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Auto-created by pulse labelless backfill (t2112) status:in-review PR open, awaiting review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review followup: PR #1714 — fix: guard multiple accounts query context

1 participant