Skip to content

fix(auth): avoid repeated passwordless table checks - #1710

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260809-224354
Aug 10, 2026
Merged

fix(auth): avoid repeated passwordless table checks#1710
superdav42 merged 1 commit into
mainfrom
feature/auto-20260809-224354

Conversation

@superdav42

@superdav42 superdav42 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove the passwordless manager's request-time custom table existence loop
  • rely on the versioned BerlinDB admin_init upgrade hooks already registered through Table_Loader
  • add regression coverage confirming all three passwordless tables use the standard lifecycle

Verification

  • vendor/bin/phpunit --filter Passwordless_Auth_Test (8 tests, 44 assertions)
  • vendor/bin/phpcs inc/auth/class-passwordless-auth-manager.php tests/WP_Ultimo/Auth/Passwordless_Auth_Test.php
  • vendor/bin/phpstan analyse inc/auth/class-passwordless-auth-manager.php tests/WP_Ultimo/Auth/Passwordless_Auth_Test.php --no-progress
  • .githooks/pre-commit

aidevops.sh v3.32.247 plugin for OpenCode v1.18.9 with gpt-5.6-sol spent 8m and 165,549 tokens on this with the user in an interactive session.

Summary by CodeRabbit

  • Bug Fixes

    • Authentication tables now use the standard upgrade lifecycle, improving consistency and reliability during updates.
    • Removed the legacy on-demand table installation behavior.
  • Tests

    • Added coverage confirming authentication tables register their standard upgrade callbacks correctly.

@superdav42 superdav42 added the origin:interactive Created by interactive user session label Aug 10, 2026
@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 05:29
@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: a40b630e-ae42-4b67-9a99-e69da1774e9a

📥 Commits

Reviewing files that changed from the base of the PR and between d6b419d and 9b53d27.

📒 Files selected for processing (2)
  • inc/auth/class-passwordless-auth-manager.php
  • tests/WP_Ultimo/Auth/Passwordless_Auth_Test.php
💤 Files with no reviewable changes (1)
  • inc/auth/class-passwordless-auth-manager.php

📝 Walkthrough

Walkthrough

The passwordless authentication manager no longer performs lazy table installation during initialization. Authentication tables use their standard versioned upgrade hooks. Tests verify the removed method and the admin_init registrations.

Changes

Passwordless authentication table upgrades

Layer / File(s) Summary
Standard table upgrade lifecycle
inc/auth/class-passwordless-auth-manager.php, tests/WP_Ultimo/Auth/Passwordless_Auth_Test.php
The manager no longer registers maybe_install_tables() or contains its table-existence helpers. Tests verify that the passkey, WebAuthn challenge, and email OTP tables register maybe_upgrade on admin_init at priority 10.

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

🚥 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 summarizes the main change: removing repeated passwordless authentication table checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ 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-20260809-224354

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 merged commit 30e57a8 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

origin:interactive Created by interactive user session review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant