fix: StubGeocoderTest fails on every forked PR - #910
Merged
Merged
Conversation
CI writes GEOCODER_STUB=true into .env when it has no geocoding key, which is every forked PR. The test asserted the live config was false, so it failed on exactly the runs the stub exists for (#906 build 5844). Check the config file's default with the variable cleared instead, and add the converse so the default check can't pass vacuously. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Sep 23, 2026
|
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.




Follow-up to #908, which introduced this.
On forked PRs CircleCI has no
GOOGLE_API_CONSOLE_KEY, so the setup step writesGEOCODER_STUB=trueinto.env.testStubIsOffUnlessDeliberatelyEnabledthen asserted the live config was false, so it failed on precisely the runs the stub exists for. This is the only PHPUnit failure on #906 (build 5844: 568 tests, 1 failure), and #900 will hit it too once it mergesdevelop.The test now reads
config/restarters.php's default withGEOCODER_STUBcleared, which is the actual production property. A newtestStubCanBeEnabledchecks the other direction, so the default check can't pass vacuously.Checked locally by booting the app with
GEOCODER_STUB=truein.env: the live config wastrue(so the old assertion would fail), the cleared default wasfalse, andGEOCODER_STUB=truegavetrue. The full suite hasn't been run locally; CI on this PR is the gate.🤖 Generated with Claude Code