Skip to content

test: isolate SSO default setting fallback - #1743

Closed
superdav42 wants to merge 2 commits into
mainfrom
feature/auto-20260828-215034-gh1742
Closed

test: isolate SSO default setting fallback#1743
superdav42 wants to merge 2 commits into
mainfrom
feature/auto-20260828-215034-gh1742

Conversation

@superdav42

@superdav42 superdav42 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Isolate the unset enable_sso default-path test from persisted settings.
  • Reset the Settings cache before exercising the fallback and restore the original settings afterward.

Testing

  • php -l tests/unit/SSO_Test.php
  • git diff --check
  • Not run: PHPUnit and PHPCS require unavailable Composer dependencies.

Resolves #1742


aidevops.sh v3.32.291 plugin for OpenCode v1.18.25 with gpt-5.6-terra

Summary by CodeRabbit

  • Tests
    • Improved SSO test coverage for scenarios where the default SSO setting is disabled.
    • Verified that SSO-related URL handling remains unchanged when settings are customized.
    • Tests now safely preserve and restore application settings, preventing configuration changes from affecting other test cases.

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

coderabbitai Bot commented Aug 29, 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: 97d6d64d-8722-4f20-a9cc-fb757b6503a5

📥 Commits

Reviewing files that changed from the base of the PR and between f256bcf and df5b344.

📒 Files selected for processing (1)
  • tests/unit/SSO_Test.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unit/SSO_Test.php

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The SSO unit test now disables enable_sso explicitly, clears the cached settings instance, verifies that the URL remains unchanged, and restores the original settings after the assertion.

Changes

SSO test isolation

Layer / File(s) Summary
Settings isolation and cleanup
tests/unit/SSO_Test.php
The test snapshots and modifies settings before calling SSO::with_sso. A finally block restores the original settings and clears the cached settings property.

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

Merge Risk: ⚪ Minimal · up to df5b3

This localized test-only change isolates the SSO default-setting fallback without altering production behavior, so no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: isolating the SSO default-setting fallback test.
Linked Issues check ✅ Passed The changes satisfy issue #1742 by removing the persisted enable_sso setting, clearing the Settings cache, testing the unset-setting fallback, and restoring the original settings.
Out of Scope Changes check ✅ Passed The changes are limited to the SSO unit test and directly support the linked issue objective. No unrelated code changes are shown.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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-20260828-215034-gh1742

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 29, 2026 03:56
@superdav42

Copy link
Copy Markdown
Collaborator Author

Merge summary

Isolates the SSO default-setting fallback test by removing any saved enable_sso value, clearing the Settings cache, and restoring the original settings after the assertion.

Verification

  • php -l tests/unit/SSO_Test.php
  • git diff --check
  • PHPUnit and PHPCS could not run because vendor/autoload.php is absent.

aidevops.sh v3.32.291 plugin for OpenCode v1.18.25 with gpt-5.6-terra spent 4m and 89,402 tokens on this as a headless worker.

@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

Copy link
Copy Markdown
Collaborator Author

CI repair feedback routed to issue #1742

This worker PR had terminal failed CI checks. The check details have been appended
to the linked issue body so the next worker can address them.

Terminal failed checks:

  • PHP 8.5: failure — check URLprimary failing-check evidence
  • PHP 8.4: failure — check URLprimary failing-check evidence
  • PHP 8.2: failure — check URLprimary failing-check evidence

Closed by deterministic merge pass (pulse-merge.sh).

@superdav42 superdav42 closed this Aug 29, 2026
@superdav42 superdav42 added the ci-feedback-routed Worker PR with failing CI routed to linked issue for re-dispatch label Aug 29, 2026
@superdav42 superdav42 reopened this Aug 29, 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

@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

@github-actions

Copy link
Copy Markdown

Performance Test Results

Performance test results for bb00597 are in 🛎️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-feedback-routed Worker PR with failing CI routed to linked issue for re-dispatch hold-for-review 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 #1741 — fix(sso): disable SSO by default

1 participant