Repository navigation
fix(structure-test): stop pinning the swoole patch version - #118
Merged
Merged
Conversation
The weekly updater bumps PHP_SWOOLE_VERSION in the Dockerfile, but tests.yaml asserted the exact patch release, so every Swoole bump (#112, #114, #117) failed structure_test until someone edited the assertion by hand. The Dependency domain treats the Dockerfile as the single source of truth: Updater refuses any other target, and Plan carries one file's content. Teaching it to also rewrite tests.yaml would mean a second target, a YAML-shaped rewrite and a non-atomic two-file write, all to keep a duplicate of a pin in sync. The exact version is already guaranteed by building from PHP_SWOOLE_COMMIT, so the duplicate adds nothing. The assertion now requires Swoole to load and report a stable 6.x.y release. Selector never crosses a major version, so every automated bump passes, while a major bump, a dev build or a missing extension still fails and needs a deliberate edit. StructureTest guards both halves: no structure-test config may hold a version the updater rewrites, and the Swoole expectation must accept same-major patch and minor bumps and reject a new major or a dev build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🟢 Tier S · Ready to merge
The Swoole structure test now matches any stable
📂 Walkthrough · 2
Merged |
…test # Conflicts: # tests.yaml
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.
Summary
tests.yamlasserted the exact Swoole patch release, but the dependency updater only rewritesPHP_SWOOLE_VERSIONin the Dockerfile, so every automated Swoole bump (chore: update dependencies #112, chore: update dependencies #114, chore: update dependencies #117) failedstructure_test.6.x.yrelease (.*swoole version 6\.[0-9]+\.[0-9]+ .*).StructureTest: no structure-test config may hold a version the updater rewrites, and the Swoole expectation must accept same-major patch/minor bumps while rejecting a new major or a-devbuild. Both tests fail onmain.Why not teach the updater to rewrite tests.yaml
The Dependency domain treats the Dockerfile as the single source of truth:
Updaterrefuses any other target andPlancarries one file's content. Rewritingtests.yamltoo would add a second target, a YAML-shaped rewrite and a non-atomic two-file write just to keep a duplicate pin in sync. The exact version is already guaranteed by building fromPHP_SWOOLE_COMMIT, andSelectornever crosses a major, so a major-version assertion holds across every automated bump.Test plan
composer verify(lint, PHPStan, 158 tests, parity)StructureTestfails againstmain'stests.yamlstructure_testCI passes against the built image🤖 Generated with Claude Code