Skip to content

9B. Prove the recorder that pins the guard check ahead of the dependency check - #69

Open
nikolaystrikhar wants to merge 1 commit into
51-guard-constant-verifiedfrom
56-ordering-test-recorder
Open

9B. Prove the recorder that pins the guard check ahead of the dependency check#69
nikolaystrikhar wants to merge 1 commit into
51-guard-constant-verifiedfrom
56-ordering-test-recorder

Conversation

@nikolaystrikhar

Copy link
Copy Markdown
Contributor

What: LoaderTest::test_an_already_loaded_sub_plugin_is_not_dependency_checked proves its recorder before trusting it.

Usage:

$this->assertSame( 0, $checked );

$check();

$this->assertSame( 1, $checked, 'The recorder must catch a call that really happened.' );

Why this way:

A "did not happen" assertion needs a live recorder. assertSame( 0, $checked ) passed equally for a mistyped config key, a fixture trait that dropped the override, or a load path that stopped reading dependency_check at all. Twelve other sites in this suite already invoke the recorder once afterwards; this one did not.

It is the only test pinning the gate order. That the guard constant is checked ahead of the dependency check is what carries the re-declaration guarantee and keeps a plugin the admin can watch working from raising a requirements notice.

The shape is the suite's, not a new one. Hoisting the closure into $check and calling it once matches test_a_skipped_load_runs_no_activation_callback exactly.

@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: 370f5797-93a8-4485-8ce8-9d0d8738c897

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.

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