15. Qualify the invariants the code outgrew - #77
Open
nikolaystrikhar wants to merge 1 commit into
Open
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: qualifies the three AGENTS.md invariants stated absolutely where the code holds them conditionally — the provider's host-wins guard, the string-callable rule, and the
Absorber-naming rule — corrects the docblocks that contradict their own code, drops a stale@throwsclause fromResolver_Interface, records the capability gate's residual risk beside the ordering that mitigates it, and fills three host-developer gaps indocs/configuration.mdanddocs/extending.md.Usage: a maintainer now reads that
Provider::bind_once()protects the seven interface ids and re-binds the ten class-name ones, so a host replacingLoaderorNotices\Storebinds afterboot(); and that onlyconflict_policyand the two message keys refuse a string callable, whileenabled,dependency_checkandactivation_callbackinvoke one on purpose. A host developer now finds why thestatic functionaroundactivation_callbackis load-bearing, and that a site added to a network later never receives the callback.Why this way:
An invariant that is false in ten of seventeen cases is worse than no invariant.
bind_once()'s own docblock has been honest about theclass_exists()trade-off all along anddocs/extending.mddocuments the real rule correctly; only the durable document promised something the code never did — the one place a maintainer checks before deciding a rebinding is safe.Scoped, not deleted. The string-callable rule is load-bearing for the three keys
resolve_deferred()reads, so the fix is a qualifier plus the counter-case, not a struck line that leaves the next reader to rediscover whydateis refused underconflict_policyand called underdependency_check.The residual risk is recorded where its mitigation is argued. The paragraph explaining why the detector runs before the capability check is exactly where a reader concludes the problem is solved, so the qualifier belongs in the same breath — along with the checked-and-false claim that a pinned user is bounced to
wp-login.php.