Skip to content

GH#1715: isolate admin bar test filter - #1721

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260810-170246-gh1715
Aug 10, 2026
Merged

GH#1715: isolate admin bar test filter#1721
superdav42 merged 1 commit into
mainfrom
feature/auto-20260810-170246-gh1715

Conversation

@superdav42

@superdav42 superdav42 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Ensure the magic-link test removes its temporary filter even when menu modification throws.

Testing

  • vendor/bin/phpcs tests/WP_Ultimo/SSO/Admin_Bar_Magic_Links_Test.php
  • vendor/bin/phpunit --filter Admin_Bar_Magic_Links_Test (9 tests, 29 assertions)

Runtime Testing

  • Self-assessed: low-risk test-only cleanup. The focused WordPress PHPUnit suite exercised the affected test class.

Resolves #1715


aidevops.sh v3.32.250 plugin for OpenCode v1.18.9 with gpt-5.6-terra spent 2m and 112,344 tokens on this as a headless worker.

Summary by CodeRabbit

  • Bug Fixes
    • Improved test cleanup to ensure temporary settings are always removed, even when an operation encounters an error.

@coderabbitai

coderabbitai Bot commented Aug 10, 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: 3e4855e6-6b77-462e-9fcb-35aa162c5bbd

📥 Commits

Reviewing files that changed from the base of the PR and between af3f981 and cbdf4e0.

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

📝 Walkthrough

Walkthrough

The admin-bar magic-link test now uses try/finally to ensure the wu_magic_link_url filter is removed if menu modification throws.

Changes

SSO test stability

Layer / File(s) Summary
Exception-safe filter cleanup
tests/WP_Ultimo/SSO/Admin_Bar_Magic_Links_Test.php
The test wraps modify_my_sites_menu() and remove_filter() in try/finally while preserving the existing filter setup and assertions.

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

Possibly related PRs

Suggested labels: status:in-review, origin:worker

🚥 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 issue and the main change: isolating the admin-bar test filter.
Linked Issues check ✅ Passed The PR implements issue #1715 by removing the temporary filter in a finally block after modify_my_sites_menu().
Out of Scope Changes check ✅ Passed The PR changes only the targeted test and keeps the modifications limited to filter cleanup required by issue #1715.
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-20260810-170246-gh1715

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.

@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 marked this pull request as ready for review August 10, 2026 23:06
@superdav42

superdav42 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Completion Summary

  • What: Isolated the temporary admin-bar magic-link filter with try/finally cleanup.
  • Issue: Review followup: PR #1712 — fix(sso): lazily generate admin-bar magic links #1715
  • Files changed: tests/WP_Ultimo/SSO/Admin_Bar_Magic_Links_Test.php
  • Testing: PHPCS and focused PHPUnit passed (9 tests, 29 assertions).
  • Key decisions: Kept the fix limited to the outstanding review finding; existing test assertions remain unchanged.

aidevops.sh v3.32.250 plugin for OpenCode v1.18.9 with gpt-5.6-terra spent 2m and 112,344 tokens on this as a headless worker.


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

Routing feedback

  • Route: standard; 1 attempt, 0 capability escalations, 0 same-tier fallbacks.
  • 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 10, 2026
@superdav42
superdav42 merged commit 0a1c399 into main Aug 10, 2026
11 checks passed
@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback status:in-review PR open, awaiting review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review followup: PR #1712 — fix(sso): lazily generate admin-bar magic links

1 participant