docs: state the bundle's worker-mode contract - #79
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #79 +/- ##
==========================================
Coverage 99.52% 99.52%
Complexity 205 205
==========================================
Files 15 15
Lines 834 834
==========================================
Hits 830 830
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
turegjorup
force-pushed
the
docs/worker-mode-compatibility
branch
from
August 26, 2026 12:59
8b0d884 to
88dda85
Compare
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.
Documentation only. Says what the bundle guarantees under a worker runtime, what it shares between requests and why, and what a consuming application has to do to hold up its end.
Changes
igor-php.Why
The behaviour landed in #77 —
getProvider()returning a fresh provider, the Guzzle client cached in its place — but the contract was only stated in the PR description and in code comments. A consumer deploying under FrankenPHP has no way to know from the README whether the bundle is safe there, and no statement of what their own authenticator must avoid, which is the part the bundle cannot enforce for them.What it claims, and where that is pinned
getProvider()returns a fresh providertestGetProviderReturnsAFreshInstance()testNoRequestStateSurvivesOnTheNextProvider()testTheHttpClientIsReusedAcrossProviders()testAStatelessFirewallIsNamedAsTheProblem()The three shared values are the Guzzle clients, the derived callback paths, and the authenticator's logger. Nothing else in
src/holds non-readonly state.Verified with igor-php
igor-phpv0.9.5, a static analyser for worker-mode state leaks, run againstsrc/:Its four findings are exactly the three values documented here plus
Bundle::getContainerExtension()'s lazy init — all build-time or deliberate, none a request-data leak. Full evaluation in the thread; it is not wired into CI in this PR.One thing I could not do
CLAUDE.mdis gitignored (.gitignore:23,/CLAUDE.md) and untracked, so it cannot go in a PR.I have made the corresponding edits to my local copy — a
Worker mode: services hold no request datasection under Architecture, the same table of shared values, the rule for new code, plus fixes to two now-stale descriptions (supports()still said "triggers onstate+code", andLoginControllerdid not mention scopes or the PKCE verifier) and three new configuration invariants.If that file is meant to be shared, say so and I will add the
.gitignorechange and the content to this PR. If it is deliberately local, the README section carries the same contract for consumers and nothing is lost.