Skip to content

7B. Report a host basename no installed plugin answers to - #65

Open
nikolaystrikhar wants to merge 1 commit into
48-conflict-sees-the-load-gatefrom
54-host-basename-validated
Open

7B. Report a host basename no installed plugin answers to#65
nikolaystrikhar wants to merge 1 commit into
48-conflict-sees-the-load-gatefrom
54-host-basename-validated

Conversation

@nikolaystrikhar

Copy link
Copy Markdown
Contributor

What: Conflict\Detector::deactivation_would_strand_sites() reports through _doing_it_wrong() and the error action when Config::set_host_plugin_basename() names no installed plugin.

Usage:

Config::set_host_plugin_basename( __FILE__ ); // instead of plugin_basename( __FILE__ )
// error: 'The host plugin basename "…" names no installed plugin' — instead of a
// stranding notice that recurs on every admin GET with nothing to act on.

Why this way:

The check belongs at the point of use, not in the setter. set_host_plugin_basename() is static and a host calls it at plugin-file scope, where get_plugins() does not exist. The detector asks on the request where the value is about to decide whether a standalone is deactivated.

The answer is not changed, only reported. A typo, an mu-plugin host or a symlinked directory all answer "not network-active" for ever, which is indistinguishable from the guard working — but a name we cannot resolve is not consent to pull a plugin from every site on a network. An unset basename stands the guard down exactly as before.

Once per request, on the instance. The detector is a singleton, so one report and one get_plugins() per request. A static flag would go quiet for the rest of the worker's life and would need a reset seam in src/.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Enterprise

Run ID: e402e15b-d5c5-4a06-8600-81153929f41d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@nikolaystrikhar
nikolaystrikhar force-pushed the 54-host-basename-validated branch from b4f04cf to e53b1e5 Compare August 24, 2026 13:41
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.

1 participant